Fandom

武装突袭 Wiki

DialogControls-CheckBox

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 分享

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here.

Checkboxes 编辑

The Checkboxes are a set of state change buttons, ordered by columns and rows. Unlike the Toolbox Control more than one button can become active.

Properties
Name Type Remark
idc integer the unique ID number of this dialog. Can be -1 if you don't require access to the dialog itself from within a script.
colorText color array color of the control text.
color color array color of border from selected entry, if other control has focus.
colorTextSelect color array color of text if selected
colorSelect color array color of border from selected entry.
colorTextDisable color array color of control text, if control is disabled.
colorDisable color array seems nothing to change, but define it to avoid errors.
font float the font to use. See the list of available fonts for possible values
sizeEx float the font size of text (0 to 1)
rows integer amount of rows to display
columns integer amount of columns to display
color color array color of the control surrounding lines.
strings string array text for each toolbox entry

Checkboxes corresponding type property is CT_CHECKBOXES.

File:CheckboxesControl.jpg
  • Example:

class MyRscCheckBoxes { idc = 200; type = CT_CHECKBOXES; // defined contant (7) style = ST_CENTER; // defined constat (0) x = 0.1; y = 0.18; w = 0.15; h = 0.15; colorText[] = {1, 0, 0, 1}; color[] = {0, 1, 0, 1}; //seems nothing to change, but define to avaoid errors colorTextSelect[] = {0, 0.8, 0, 1}; colorSelect[] = {0, 0, 0, 1}; colorTextDisable[] = {0.4, 0.4, 0.4, 1}; colorDisable[] = {0.4, 0.4, 0.4, 1}; font = "Zeppelin32"; sizeEx = 0.0208333; rows = 3; columns = 2; strings[] = {"Entry 1","Entry 2","Entry 3","Entry 4","Entry 5","Entry 6"}; //Simple UI event handler to show response on clicks onCheckBoxesSelChanged = "hint format[""Checkbox change:\n%1\nEntry#: %2\nNewState: %3"",(_this select 0),(_this select 1),(_this select 2)];" };

Notice: As you see in the example image, the returned entry number from the onCheckBoxesSelChanged event handler starts at zero (0)! So if you have 6 toolbox entrys, the first is 0 and the last is 5! Notice: You must add this line : coloSelectedBg[] = {0, 0, 0, 0}; (for setting the selected box color)

Functions for CheckBoxes: cbSetChecked, ctrlChecked, ctrlSetChecked, cbChecked

更多维基

随机维基