函数参考
内置辅助函数
游戏内“函数”标签页中列为内置的辅助函数。公共辅助函数直接按名称调用;其他辅助函数需绑定为依赖项(选择自动补全项,或在“依赖项”中添加),再按其完整限定名调用。
240 个辅助函数中的 22 个。 清除筛选
UI. 依赖项 | Constructs a new RM-CheckBox condition widget: a 180 by 24 frame holding a workbench check box, with SetLabel, SetValue, GetValue and SetDisabled, firing OnValueChanged when clicked. |
|---|---|
UI. 公共 | 创建一个原生的布尔条件控件。配置 SetLabel、SetValue、SetDisabled 和 OnValueChanged;使用 parent:AddChild(widget) 添加它。 |
UI. 依赖项 | Constructs a new RM-ConditionButton widget around a 200-pixel workbench button, with SetText, SetAutoWidth and SetDisabled, firing OnClick (with the mouse button), OnEnter and OnLeave only while its lease is live. |
UI. 公共 | 使用共享的条件控件生命周期和工作台主题创建一个原生按钮。SetText、SetDisabled 和 SetCallback 用于配置其标签和交互;OnClick 会收到所按的鼠标按键。将其使用 parent:AddChild(widget) 添加到回调的父级。 |
UI. 公共 | 创建原生的自动换行文本,根据其宽度和字体测量高度。SetText、SetFont 或 SetFontObject 用于配置其内容。将其使用 parent:AddChild(widget) 添加到回调的父级,以便布局能够跟踪其测得的高度。 |
UI. 公共 | 创建原生的自动换行文本,可选择带有前置图像和指针回调。SetImage 和 SetImageSize 用于配置图像;OnEnter、OnLeave 和 OnClick 使用条件回调约定。将其使用 parent:AddChild(widget) 添加到回调的父级;其租用被释放时回调会失效。 |
UI. 依赖项 | Returns the default font for condition labels and buttons: the GameFontHighlightSmall font object, or its name when the object is not defined. |
UI. 依赖项 | Constructs a new condition text widget: a plain wrapping RM-ConditionLabel, or with interactive set an RM-ConditionLink button that adds a leading image and OnEnter, OnLeave and OnClick callbacks. |
UI. 依赖项 | Constructs a new RM-ConditionIcon widget: a clickable image with an optional caption below it, with SetImage, SetImageByAtlas, SetImageSize, SetLabel and SetDisabled, firing OnClick, OnEnter and OnLeave while its lease is live. |
UI. 公共 | 使用条件控件生命周期创建一个原生图像控件。SetImage 和 SetImageSize 用于选择材质;SetText 可选地添加说明文字。OnClick、OnEnter 和 OnLeave 使用共享的回调约定。将该控件使用 parent:AddChild(widget) 添加到回调的父级。 |
UI. 依赖项 | Constructs a new condition input widget: an RM-ConditionEditBox text box, or with numeric set an RM-ConditionSlider pairing a slider with a numeric box (with range, step and percent display). |
UI. 公共 | 使用条件控件约定创建一个原生文本输入框。SetLabel、SetText、SetDisabled 和 SetCallback 用于配置它;OnEnterPressed 提交文本。使用 parent:AddChild(widget) 将其添加到回调的父级。 |
UI. 公共 | 创建一个带有滑块和数字输入框的原生数值条件输入控件。配置 SetSliderValues、SetValue、SetIsPercent 和 SetCallback;OnValueChanged 报告已提交的值。使用 parent:AddChild(widget) 添加它。 |
UI. 依赖项 | True when value is a number that is neither NaN nor infinite; the condition inputs use it to validate entered and slider values. |
UI. 依赖项 | Constructs a new RM-ConditionGroup container that stacks condition widgets in List, Table or RM-SpellField layout, resizing itself to its contents and relaying out its parent. |
UI. 公共 | 创建一个条件字段容器,使用 RM 自有的 List、Table 和自适应法术字段布局。它接受已注册的原生条件控件;使用 AddChild 添加子项,并将该组附加到回调的父级。 |
UI. 依赖项 | Lays out the "RM-IconRows" container: an icon on the left, vertically centered beside the rows of fields, and an optional side widget (marked with the side user data) that sits beside the last row when there is room and below the rows when there is not. |
UI. 依赖项 | Converts a table cell's alignV setting to a vertical offset fraction for the condition group's Table layout: 0 for nil, start or top, 0.5 for middle or center, and 1 for end or bottom (case-insensitive prefixes). |
UI. 依赖项 | Constructs a new RM-ConditionPositionPad widget around the shared workbench directional pad, with SetDisabled, firing OnOffsetChanged (horizontal and vertical direction, whether Center was pressed, and the step) only while its lease is live and it is enabled. |
UI. 公共 | 使用共享的方向控件创建一个原生位置面板。OnOffsetChanged 报告水平和垂直方向、是否按下了“居中”,以及增量(一,或按住 Shift 时为十)。SetDisabled 控制交互;将该面板使用 parent:AddChild(widget) 添加到回调的父级。 |
UI. 公共 | 创建一个原生的条件选择器。SetList 接受键到标签或键到条目的映射;SetValue 选择一个键,OnValueChanged 报告变化。使用 parent:AddChild(widget) 添加它。 |
UI. 依赖项 | Constructs a new RM-Selector dropdown widget: an optional caption over a button that opens the workbench selector popup. |
