Check the checkbox

To check the status of the checkbox is checked or not, we can use the following function.

ui_get_checked(control);

Return: Boolean

Argument control is the handle of ui_checkbox_create(...); function to be checked.

if (ui_get_checked(soundOn))
{
  volume = 1;
}
else
{
  volume = 0;
}

The above line of code used to check the soundOn checkbox is checked, variable volume set to 1 if checked and 0 if not.

results matching ""

    No results matching ""