Thread Tools Display Modes
Prev Previous Post   Next Post Next
09-09-12, 05:51 PM   #1
Maggz
A Cyclonian
 
Maggz's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 45
Updating tooltip while tooltip is still active.

ok i am still a bit on the newb side, so im asking this question to see if this is something that is even possible. i can show a tiny snippet of my code to see what im tying to accomplish.

Lua Code:
  1. local malObject = {
  2.     type = "launcher",
  3.     icon = "Interface\\Addons\\MaggzAutoLog\\disabled",
  4.     label = "MaggzAutoLog",
  5.     OnClick = function(self, button)
  6.         if button == "RightButton" then
  7.             LOGSTATE()
  8.         end
  9.         if button == "LeftButton" then
  10.             if LoggingCombat() then
  11.                 disablelogging()
  12.             else
  13.                 enablelogging()
  14.             end
  15.         end
  16.     end,
  17.     OnTooltipShow = function(tooltip)
  18.     tooltip:AddLine("|cff00FF00MaggzAutoLog|r");
  19.     tooltip:AddLine("hold left mouse button to drag");
  20.     tooltip:AddLine("right click to enable/disable logging");
  21.     if LoggingCombat() then
  22.         tooltip:AddLine("Logging |cff00FF00Enabled|r");
  23.     else
  24.         tooltip:AddLine("Logging |cffFF0000Disabled|r");
  25.     end
  26. end,
  27. };

i used the minimap button creation tips i had found thru searching and atm it all works well for me, with one minor issue, i cant seem to find any documentation anywhere about how to update that last tooltip:AddLine("information here"); while the tooltip is still open and displaying. If this is something that cant be currently done that would be nice to know as well.

What my main goal is here is to add in some displayfunctionality to my addon to show current state of your combat logging. i do believe i have accomplished that with just this one issue perplexing me. Only reason i wanted to add this sort of ability is because i used loggerhead for a long while and liked how it functioned, however its not been updated for atleast last 2 patches. I know my addon is going to be NO WHERE near the functionality as that one.

If i need to post my entire LUA file here please let me know as well, i just wanted to atleast get some inut as to what im looking to do is capable
__________________
Maggz Turalyon-US

Last edited by Maggz : 09-09-12 at 06:09 PM.
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » Updating tooltip while tooltip is still active.


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off