Set the checkbox status

Sometimes we want to add the default value checkbox. For example if the default game the sound is ‘on’, then the checkbox should has been checked. We can use the following functions to set it.

ui_set_checked(control, checked);

Return: True if successful

Argument control is the handle of ui_checkbox_create(...); function, checked is a boolean (true or false).

soundOn = ui_checkbox_create(32, 100, ui_default, "Enable Sound");
ui_set_checked(soundOn, true);

The above line of code is used to check soundOn checkbox.

results matching ""

    No results matching ""