Applying control to sidenav

With this function you can set the control to active when sidenav is opened.

ui_sidenav_apply(sidenav, control);

Return: true

Argument sidenav is the handle of ui_sidenav_create (...); function while the control is the control you want to add on.

userMenu = ui_sidenav_create (16, 16, ui_default, ui_default);
button0 =ui_button_create(8, 128, 128, 32, "MAIL");

ui_sidenav_apply(userMenu, button0);

Aplyying control to sidenav.

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

ui_sidenav_draw(userMenu)

var surf = ui_sidenav_get_surface(userMenu);

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

Drawing control inside of sidenav.

|

results matching ""

    No results matching ""