ui CheckBox

ui Checkbox

Checkbox widget that will display a string and a checkbox sprite to the right of the text. The user can select or deselected the checkbox on mouse press.
The current sprites used for the checkbox are the sprite index 1 and 2 from the spr_ui sprite. You can change those as your default on/off sprites. They must still be 32×32 pixels in size.

Example,

 

uiTextValue=”Don’t ask again”;
uiAlign=fa_right;
uiDrawBackColor=false;
uiTextColor=c_white;

 

To get the value of the checkbox in code check the checked variable. Like this or use the event object method.

if inst_box_name.checked then show_message(‘it is checked’);

You may also like...