Pixel-Composer/objects/o_main/Draw_64.gml

30 lines
627 B
Plaintext
Raw Normal View History

2022-01-13 05:24:03 +01:00
/// @description init
2023-01-17 08:11:55 +01:00
#region widget scroll
2023-02-14 02:51:14 +01:00
if(keyboard_check_pressed(vk_tab) && key_mod_press(SHIFT))
2023-01-17 08:11:55 +01:00
widget_previous();
else if(keyboard_check_pressed(vk_tab))
widget_next();
if(keyboard_check_pressed(vk_enter))
widget_trigger();
2023-01-25 06:49:00 +01:00
if(keyboard_check_pressed(vk_escape))
widget_clear();
2023-01-17 08:11:55 +01:00
#endregion
#region register UI element
WIDGET_ACTIVE = [];
#endregion
2022-01-13 05:24:03 +01:00
#region panels
2023-02-14 02:51:14 +01:00
if(PANEL_MAIN == 0) setPanel();
2023-02-14 07:37:13 +01:00
var surf = surface_get_target();
try
PANEL_MAIN.draw();
catch(e) {
while(surface_get_target() != surf)
surface_reset_target();
noti_warning("UI error: " + exception_print(e));
}
2022-11-14 03:16:15 +01:00
#endregion