Call as
addon:CreateConditionIcon()
Available directly through addon; no dependency is needed.
What it does
Create a native image control using the condition widget lifecycle. SetImage and SetImageSize choose the texture; SetText optionally adds a caption. OnClick, OnEnter and OnLeave use the shared callback contract. Add the control to the callback parent with parent:AddChild(widget).
Arguments
| Name | Type | What it does |
|---|---|---|
self | RMAddon | Rotation Master addon instance (implicit with colon calls). |
Returns
| 1 | RMConditionIcon | Native image control with label, texture, disabled state and callbacks. |
|---|
Editions
Built In helpers are registered on every edition. What differs is the game API they read; where one is missing the helper falls back or returns nil with a reason.
It reads no game API directly.
How the addon calls it
- Shapeshift Form (widget)
local formIcon = addon:CreateConditionIcon() - Engraved Rune (widget)
runeIcon = addon:CreateConditionIcon() Conditions.talent.iconlocal widget=addon:CreateConditionIcon();widget:SetWidth(64);widget:SetImageSize(60,60)
Dependencies
constructor→UI.condition_icon.constructor
Source
UI/condition_icon.lua, line 73. Read only in game; Duplicate makes an editable copy.
UI.condition_icon.CreateConditionIcon(self)
return self:AcquireConditionWidget('RM-ConditionIcon',constructor)