mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-10 20:45:35 +01:00
77 lines
1.3 KiB
Plaintext
77 lines
1.3 KiB
Plaintext
/// @description init
|
|
#region window
|
|
//if(keyboard_check_pressed(vk_f12)) DEBUG = !DEBUG;
|
|
|
|
if(_cursor != CURSOR) {
|
|
window_set_cursor(CURSOR);
|
|
_cursor = CURSOR;
|
|
}
|
|
CURSOR = cr_default;
|
|
|
|
if((win_wp != WIN_W || win_hp != WIN_H) && (WIN_W > 1 && WIN_H > 1)) {
|
|
win_wp = WIN_W;
|
|
win_hp = WIN_H;
|
|
|
|
room_width = WIN_W;
|
|
room_height = WIN_H;
|
|
|
|
display_set_gui_size(win_wp, win_hp);
|
|
|
|
clearPanel();
|
|
setPanel();
|
|
|
|
PANEL_GRAPH.fullView();
|
|
PANEL_PREVIEW.fullView();
|
|
|
|
alarm[0] = 10;
|
|
|
|
PREF_MAP[? "window_width"] = WIN_W;
|
|
PREF_MAP[? "window_height"] = WIN_H;
|
|
PREF_SAVE();
|
|
}
|
|
#endregion
|
|
|
|
#region focus
|
|
HOVER = noone;
|
|
|
|
if(PANEL_MAIN != 0)
|
|
PANEL_MAIN.stepBegin();
|
|
DIALOG_DEPTH_HOVER = 0;
|
|
|
|
with(_p_dialog) {
|
|
checkFocus();
|
|
}
|
|
#endregion
|
|
|
|
#region nodes
|
|
for(var i = 0; i < ds_list_size(NODES); i++) {
|
|
NODES[| i].stepBegin();
|
|
}
|
|
|
|
if(UPDATE) {
|
|
renderAll();
|
|
UPDATE = false;
|
|
}
|
|
#endregion
|
|
|
|
#region clicks
|
|
DOUBLE_CLICK = false;
|
|
if(mouse_check_button_pressed(mb_left)) {
|
|
if(dc_check > 0) {
|
|
DOUBLE_CLICK = true;
|
|
dc_check = 0;
|
|
} else {
|
|
dc_check = PREF_MAP[? "double_click_delay"];
|
|
}
|
|
}
|
|
|
|
dc_check--;
|
|
#endregion
|
|
|
|
#region step
|
|
if(array_length(action_last_frame) > 0) {
|
|
ds_stack_push(UNDO_STACK, action_last_frame);
|
|
ds_stack_clear(REDO_STACK);
|
|
}
|
|
action_last_frame = [];
|
|
#endregion |