Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

DamageDisplay Example

DamageDisplay

ADDON:ImportObject(35) -- DamageDisplay
-- ADDON:ImportObject(OBJECT.DamageDisplay)
ADDON:ImportAPI(42)    -- X2Unit
-- ADDON:ImportAPI(API.X2Unit)

local damageDisplayExample = UIParent:CreateWidget("damagedisplay", "damageDisplayExample", "UIParent")
damageDisplayExample:SetUnitId(X2Unit:GetUnitId("player"), X2Unit:GetUnitId("target"))
damageDisplayExample:SetInitPos(-50, -100)
damageDisplayExample:SetText("Example Text")
damageDisplayExample:Show(true)

DamageDisplay Example