diff --git a/objects/_p_dialog/Create_0.gml b/objects/_p_dialog/Create_0.gml index a0f7e0d3c..43ffb07a1 100644 --- a/objects/_p_dialog/Create_0.gml +++ b/objects/_p_dialog/Create_0.gml @@ -3,7 +3,8 @@ #macro DIALOG_DRAW_BG draw_sprite_stretched(THEME.dialog, 0, dialog_x - 8, dialog_y - 8, dialog_w + 16, dialog_h + 16); #macro DIALOG_DRAW_FOCUS draw_sprite_stretched_ext(THEME.dialog, 1, dialog_x - 8, dialog_y - 8, dialog_w + 16, dialog_h + 16, COLORS._main_accent, 1); -#macro DIALOG_WINCLEAR if(window != noone) { winwin_draw_clear(COLORS.panel_bg_clear, 0); } +#macro DIALOG_WINCLEAR if(window != noone) { winwin_draw_clear(COLORS.panel_bg_clear, 0); } +#macro DIALOG_WINCLEAR1 if(window != noone) { winwin_draw_clear(COLORS.panel_bg_clear, 1); } #macro DIALOG_PREDRAW if(window != noone) { winwin_draw_begin(window); WINDOW_ACTIVE = window; window_drawing = true; } #macro DIALOG_POSTDRAW if(window != noone) { winwin_draw_end(); WINDOW_ACTIVE = noone; window_drawing = false; } diff --git a/objects/_p_dialog/Step_1.gml b/objects/_p_dialog/Step_1.gml index 386ac3c75..c36d3c24c 100644 --- a/objects/_p_dialog/Step_1.gml +++ b/objects/_p_dialog/Step_1.gml @@ -8,7 +8,7 @@ if !active exit; #region window control if(sFOCUS) { if(destroy_on_escape && keyboard_check_pressed(vk_escape) && checkClosable()) - instance_destroy(self); + instance_destroy(); } #endregion diff --git a/objects/o_dialog_menubox/Destroy_0.gml b/objects/o_dialog_menubox/Destroy_0.gml index cd275adc1..8f876840d 100644 --- a/objects/o_dialog_menubox/Destroy_0.gml +++ b/objects/o_dialog_menubox/Destroy_0.gml @@ -1,5 +1,6 @@ event_inherited(); -if(submenu) instance_destroy(submenu); +if(instance_exists(submenu)) + instance_destroy(submenu); if(FOCUS == noone && instance_number(o_dialog_menubox) == 1) FOCUS = FOCUS_BEFORE; \ No newline at end of file diff --git a/objects/o_dialog_menubox/Draw_64.gml b/objects/o_dialog_menubox/Draw_64.gml index 53a1de383..856f4c091 100644 --- a/objects/o_dialog_menubox/Draw_64.gml +++ b/objects/o_dialog_menubox/Draw_64.gml @@ -2,14 +2,15 @@ if(!ready) exit; DIALOG_PREDRAW -winwin_draw_clear(COLORS.panel_bg_clear, 1); +DIALOG_WINCLEAR1 #region draw var yy = dialog_y; var _lclick = sFOCUS && (!mouse_init_inside && mouse_release(mb_left)) || (keyboard_check_pressed(vk_enter) && hk_editing == noone); var _rclick = sFOCUS && !mouse_init_inside && !mouse_init_r_pressed && mouse_release(mb_right); if(!mouse_init_inside && mouse_press(mb_right) && item_sel_submenu) { - instance_destroy(item_sel_submenu); + if(instance_exists(item_sel_submenu)) + instance_destroy(item_sel_submenu); item_sel_submenu = noone; } @@ -75,9 +76,19 @@ winwin_draw_clear(COLORS.panel_bg_clear, 1); if(_menuItem.isShelf) { FOCUS_CONTENT = context; + if(instance_exists(submenu)) { + var _sfr = submenu.itemFrom; + instance_destroy(submenu); + + if(_sfr == _menuItem) { + submenu = noone; + continue; + } + } + var _res = _menuItem.func(_dat); - if(submenu) instance_destroy(submenu); submenu = _res; + submenu.itemFrom = _menuItem; } else if(remove_parents) { DIALOG_POSTDRAW diff --git a/objects/o_dialog_menubox/Step_1.gml b/objects/o_dialog_menubox/Step_1.gml index 91834d31d..6968054f0 100644 --- a/objects/o_dialog_menubox/Step_1.gml +++ b/objects/o_dialog_menubox/Step_1.gml @@ -1,6 +1,4 @@ /// @description Insert description here -event_inherited(); - if(item_sel_submenu) { if(!instance_exists(item_sel_submenu)) item_sel_submenu = noone; @@ -14,7 +12,8 @@ if(init_press_l) { } var hov = point_in(mouse_raw_x, mouse_raw_y); -if(submenu) hov |= submenu.point_in(mouse_raw_x, mouse_raw_y); +if(instance_exists(submenu)) + hov |= submenu.point_in(mouse_raw_x, mouse_raw_y); _hovering_ch = hov; if(!hov && MOUSE_POOL.lpress) instance_destroy(); \ No newline at end of file diff --git a/objects/o_dialog_preference/Create_0.gml b/objects/o_dialog_preference/Create_0.gml index 0b20e2861..5a6c7df6d 100644 --- a/objects/o_dialog_preference/Create_0.gml +++ b/objects/o_dialog_preference/Create_0.gml @@ -552,6 +552,12 @@ event_inherited(); new textBox(TEXTBOX_INPUT.number, function(val) /*=>*/ { PREFERENCES.node_3d_preview_size = clamp(val, 16, 1024); PREF_SAVE(); }) )); + ds_list_add(pref_node, new __Panel_Linear_Setting_Item_Preference( + __txtx("pref_file_watcher_delay", "File watcher delay (s)"), + "file_watcher_delay", + new textBox(TEXTBOX_INPUT.number, function(val) /*=>*/ { PREFERENCES.file_watcher_delay = val; PREF_SAVE(); }) + )); + #endregion #region theme diff --git a/scripts/node_ase_file_read/node_ase_file_read.gml b/scripts/node_ase_file_read/node_ase_file_read.gml index 2d1a87cbf..908a65f46 100644 --- a/scripts/node_ase_file_read/node_ase_file_read.gml +++ b/scripts/node_ase_file_read/node_ase_file_read.gml @@ -269,7 +269,7 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const var p_arr = []; for( var k = 0; k < array_length(plt); k++ ) - array_push(p_arr, make_color_rgb(plt[k][0], plt[k][1], plt[k][2])); + array_push(p_arr, make_color_rgba(plt[k][0], plt[k][1], plt[k][2], plt[k][3])); outputs[3].setValue(p_arr); break; @@ -325,7 +325,7 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const if(file_get_modify_s(path_current) > edit_time) { edit_time = max(edit_time, file_get_modify_s(path_current)); - run_in(5, function() /*=>*/ { updatePaths(); triggerRender(); }); + run_in_s(PREFERENCES.file_watcher_delay, function() /*=>*/ { updatePaths(); triggerRender(); }); } } diff --git a/scripts/preferences/preferences.gml b/scripts/preferences/preferences.gml index c46a7157a..4a341f0c5 100644 --- a/scripts/preferences/preferences.gml +++ b/scripts/preferences/preferences.gml @@ -50,6 +50,7 @@ PREFERENCES.keyboard_repeat_speed = 0.10; PREFERENCES.keyboard_double_delay = 0.25; + PREFERENCES.file_watcher_delay = 0.1; #endregion #region ///////////////////////////////////////////////////////////////////////// DIALOG ////////////////////////////////////////////////////////////////////////