Make a switch

In making a switch, we use the following function.

ui_switch_create (x, y, width, height, label);

Return: Ds_map

Where x and y are the position switches are placed. width and height is width and height of switch which by default is 48 X 22. And finally we can add a text label by label argument.

fullscreen = ui_switch_create (32, 256, 80, 32, "Fullscreen");

The above line of code is used to create a switch with the label "Fullscreen" in certain positions with a size of 80 X 32.

results matching ""

    No results matching ""