2022-01-13 05:24:03 +01:00
|
|
|
/// @description init
|
2023-12-18 04:40:21 +01:00
|
|
|
if(winMan_isMinimized()) exit;
|
2023-12-22 08:42:02 +01:00
|
|
|
|
|
|
|
if(APP_SURF_OVERRIDE) {
|
|
|
|
APP_SURF = surface_verify(APP_SURF, WIN_W, WIN_H);
|
|
|
|
PRE_APP_SURF = surface_verify(PRE_APP_SURF, WIN_W, WIN_H);
|
|
|
|
POST_APP_SURF = surface_verify(POST_APP_SURF, WIN_W, WIN_H);
|
|
|
|
|
|
|
|
surface_set_target(APP_SURF);
|
|
|
|
}
|
|
|
|
|
2023-06-10 13:59:45 +02:00
|
|
|
draw_clear(COLORS.bg);
|
|
|
|
|
2023-01-17 08:11:55 +01:00
|
|
|
#region widget scroll
|
2023-07-12 16:28:32 +02:00
|
|
|
if(!WIDGET_TAB_BLOCK) {
|
|
|
|
if(keyboard_check_pressed(vk_tab) && key_mod_press(SHIFT))
|
|
|
|
widget_previous();
|
|
|
|
else if(keyboard_check_pressed(vk_tab))
|
|
|
|
widget_next();
|
2023-01-17 08:11:55 +01:00
|
|
|
|
2023-07-12 16:28:32 +02:00
|
|
|
if(keyboard_check_pressed(vk_enter))
|
|
|
|
widget_trigger();
|
2023-01-25 06:49:00 +01:00
|
|
|
|
2023-07-12 16:28:32 +02:00
|
|
|
if(keyboard_check_pressed(vk_escape))
|
|
|
|
widget_clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
WIDGET_TAB_BLOCK = false;
|
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-03-11 06:40:34 +01:00
|
|
|
if(PANEL_MAIN == 0) resetPanel();
|
2023-02-14 02:51:14 +01:00
|
|
|
|
2023-02-14 07:37:13 +01:00
|
|
|
var surf = surface_get_target();
|
2023-05-08 10:50:42 +02:00
|
|
|
try {
|
2023-02-14 07:37:13 +01:00
|
|
|
PANEL_MAIN.draw();
|
2023-05-08 10:50:42 +02:00
|
|
|
} catch(e) {
|
2023-02-14 07:37:13 +01:00
|
|
|
while(surface_get_target() != surf)
|
|
|
|
surface_reset_target();
|
2023-05-03 21:42:17 +02:00
|
|
|
|
2023-02-19 02:13:19 +01:00
|
|
|
noti_warning(exception_print(e));
|
2023-02-14 07:37:13 +01:00
|
|
|
}
|
2023-02-23 07:02:19 +01:00
|
|
|
|
2023-03-11 01:40:17 +01:00
|
|
|
panelDraw();
|
2023-02-23 07:02:19 +01:00
|
|
|
#endregion
|
|
|
|
|
2023-10-15 15:04:42 +02:00
|
|
|
#region notes
|
|
|
|
for( var i = 0, n = array_length(PROJECT.notes); i < n; i++ )
|
|
|
|
PROJECT.notes[i].draw();
|
|
|
|
#endregion
|
|
|
|
|
2023-02-23 07:02:19 +01:00
|
|
|
#region window
|
2023-11-28 06:50:54 +01:00
|
|
|
winManDraw();
|
2023-12-22 08:42:02 +01:00
|
|
|
#endregion
|
|
|
|
|
|
|
|
if(APP_SURF_OVERRIDE) {
|
|
|
|
surface_reset_target();
|
|
|
|
draw_surface(POST_APP_SURF, 0, 0);
|
|
|
|
|
|
|
|
surface_set_target(PRE_APP_SURF);
|
|
|
|
draw_surface(APP_SURF, 0, 0);
|
|
|
|
surface_reset_target();
|
2023-12-25 12:51:12 +01:00
|
|
|
|
|
|
|
surface_set_target(POST_APP_SURF);
|
|
|
|
draw_surface(APP_SURF, 0, 0);
|
|
|
|
surface_reset_target();
|
2023-12-22 08:42:02 +01:00
|
|
|
}
|