Reference › Function reference › UI

UI.condition_icon.CreateConditionIcon

public

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

NameTypeWhat it does
selfRMAddonRotation Master addon instance (implicit with colon calls).

Returns

1RMConditionIconNative 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

Dependencies

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)

Back to Function reference