參考資料 › 函式參考 › UI

UI.checkbox.CreateConditionCheckBox

公用

呼叫方式

addon:CreateConditionCheckBox()

可直接透過 addon 使用,不需要相依項目。

作用

建立一個原生的布林條件控制項。設定 SetLabel、SetValue、SetDisabled 與 OnValueChanged;使用 parent:AddChild(widget) 新增它。

參數

名稱類型作用
selfRMAddonRotation Master 插件實例(使用冒號呼叫時隱含傳入)。

傳回值

1RMConditionCheckBox帶有布林值與回呼方法的核取方塊元件。

版本

內建輔助函式在每個版本上都會註冊。不同的是它們讀取的遊戲 API;某個 API 不存在時,輔助函式會改用備用方式,或傳回 nil 並附上原因。

它不會直接讀取任何遊戲 API。

插件如何呼叫它

以及另外 19 處: 距離內計數 (widget), 在隊伍中 (widget), 隊伍計數 (widget), 免疫 (widget), 物品可用 (widget), 物品冷卻 (widget), 物品在射程內 (widget), 等級 (widget), 團隊標記 (widget), 已學會法術 (widget), Stagger (widget), 武器攻擊間隔 (widget), 武器攻擊間隔剩餘時間 (widget), 存在武器附魔 (widget), 武器附魔類型 (widget), 武器附魔剩餘時間 (widget), 武器附魔層數 (widget), 區域 (widget), Conditions.common.Widget_SpellWidget

相依項目

原始碼

UI/checkbox.lua,第 46 行。在遊戲中為唯讀;「複製」會產生一份可編輯的複本。

UI.checkbox.CreateConditionCheckBox(self)
    local widget=addon:AcquireConditionWidget('RM-CheckBox',constructor)
    ---@cast widget RMConditionCheckBox
    return widget

返回函式參考