Make a button

To create a button we simply call the following function.

ui_button_create(x, y, width, height, text);

Return: Ds_map

Where x and y are the position of the button is placed, the width and height are the width and height of a button. You can use macros ui_default if you want to use autofit size corresponds to the length and width of the button text. And finally we can add text buttons with text argument.

buttonLogin = ui_button_create(32, 64, 128, ui_default, "LOG IN");

The above line of code is used to create a button with the "LOG IN" text at certain positions with a width of 128 pixels and adjust the height to the height of the text button.

results matching ""

    No results matching ""