WoW:Tooltip pseudo code: Difference between revisions

m
Move page script moved page Tooltip pseudo code to WoW:Tooltip pseudo code without leaving a redirect
({{uitech}}, formatting...)
m (Move page script moved page Tooltip pseudo code to WoW:Tooltip pseudo code without leaving a redirect)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{uitech}}
{{uitech}}
Tooltips are notoriously difficult to handle in WoW UI code. This page contains Lua-style pseudo code that attempts to represent the behaviour and interaction of various GameTooltip widget methods. (Currently it's not complete, yet to include details about line-wrapping behaviour). See [[UIOBJECT GameTooltip]] for notes about GameTooltips. See [[Widget API]] for a reference list about GameTooltip methods and their uses.
Tooltips are notoriously difficult to handle in WoW UI code. This page contains Lua-style pseudo code that attempts to represent the behaviour and interaction of various GameTooltip widget methods. (Currently it's not complete, yet to include details about line-wrapping behaviour). See [[UIOBJECT GameTooltip]] for notes about GameTooltips. See [[Widget API]] for a reference list about GameTooltip methods and their uses.


'''Note''': This is not actual working Lua code, you can't copy/paste it. It is a representation of what the game's engine does internally, to help understand tooltips' behaviour. No such Lua code actually exists anywhere.
'''Note''': This is not actual working Lua code, you can't copy/paste it. It is a representation of what the game's engine does internally, to help understand tooltips' behaviour. No such Lua code actually exists anywhere.
Line 95: Line 92:
   end
   end
    
    
   function AppendText(text, etc)
   function tooltip:AppendText(text, etc)
       AddToFirstLine(text)    -- Appends the text to the first line
       AddToFirstLine(text)    -- Appends the text to the first line
       self:Show()
       self:Show()
Anonymous user