Applying control to tab item

With this function you can set the control to check the start position from tab surface.

ui_tab_apply(tab item, control);

Return: true

Argument tab item is the handle of ui_item_create (...); function while the control is the control you want to add on.

tabMenu = ui_tab_create (16, 64, 320, 32, 256);
armorTab = ui_item_add (tabMenu, "Armor");

button0 =ui_button_create(8, 128, 128, 32, "MAIL");

ui_sidenav_apply(armorTab, button0);

Aplyying control to tab item.

ATTENTION!
ui_draw_all(...); function cannot deal with controls applied. You must draw it manually inside the surface.
ui_sidenav_apply(armorTab, button0);

ui_tab_draw(tabMenu)

var surf = ui_tab_get_surface(userMenu, 0);

surface_set_target(surf);
ui_button_draw(button0);
surface_reset_target();

Drawing control inside of tab item.

|

results matching ""

    No results matching ""