diff --git a/datafiles/data/Collections.zip b/datafiles/data/Collections.zip index b91afbcea..d076b2de7 100644 Binary files a/datafiles/data/Collections.zip and b/datafiles/data/Collections.zip differ diff --git a/datafiles/data/Nodes/Internal.zip b/datafiles/data/Nodes/Internal.zip index cf7f4acea..ac9ab11d9 100644 Binary files a/datafiles/data/Nodes/Internal.zip and b/datafiles/data/Nodes/Internal.zip differ diff --git a/objects/o_dialog_add_node/Create_0.gml b/objects/o_dialog_add_node/Create_0.gml index 917b3257c..23ad5f930 100644 --- a/objects/o_dialog_add_node/Create_0.gml +++ b/objects/o_dialog_add_node/Create_0.gml @@ -116,7 +116,7 @@ event_inherited(); return bool(_b & value_bit(junction_called.type)); } - function setPage(pageIndex) { + function setPage(pageIndex, subPageIndex = 0) { ADD_NODE_PAGE = min(pageIndex, array_length(category) - 1); subgroups = []; subgroup_index = 0; @@ -192,11 +192,13 @@ event_inherited(); array_push(subgroups, _node); } - setSubgroup(0); + + setSubgroup(subPageIndex); } function setSubgroup(_subg) { - subgroup_index = _subg; + subgroup_index = _subg; + ADD_NODE_SUBPAGE = _subg; } #endregion @@ -326,6 +328,7 @@ event_inherited(); break; } } + } #endregion @@ -872,11 +875,13 @@ event_inherited(); if(PREFERENCES.add_node_remember) { content_pane.scroll_y_raw = ADD_NODE_SCROLL; content_pane.scroll_y_to = ADD_NODE_SCROLL; - } else - ADD_NODE_PAGE = 0; + + } else { + ADD_NODE_PAGE = 0; + ADD_NODE_SUBPAGE = 0; + } - setPage(ADD_NODE_PAGE); - run_in(1, function() /*=>*/ { setPage(ADD_NODE_PAGE) }); + setPage(ADD_NODE_PAGE, ADD_NODE_SUBPAGE); #endregion #region resize diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index 463b0400e..520460d50 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -83,12 +83,13 @@ DIALOG_CLICK = true; - globalvar ADD_NODE_PAGE, ADD_NODE_SCROLL; + globalvar ADD_NODE_PAGE, ADD_NODE_SCROLL, ADD_NODE_SUBPAGE; - ADD_NODE_PAGE = 0; - ADD_NODE_SCROLL = 0; - WINDOW_ACTIVE = noone; - TOOLTIP_WINDOW = noone; + ADD_NODE_PAGE = 0; + ADD_NODE_SUBPAGE = 0; + ADD_NODE_SCROLL = 0; + WINDOW_ACTIVE = noone; + TOOLTIP_WINDOW = noone; #endregion #region macro diff --git a/scripts/node_path/node_path.gml b/scripts/node_path/node_path.gml index 2cb9174ff..e1f8b0328 100644 --- a/scripts/node_path/node_path.gml +++ b/scripts/node_path/node_path.gml @@ -48,8 +48,9 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { ["Anchors", false], ]; - output_display_list = [ 1, 0, 2 ]; - path_preview_surface = noone; + output_display_list = [ 1, 0, 2 ]; + _path_preview_surface = noone; + path_preview_surface = noone; setDynamicInput(1, false); @@ -1149,10 +1150,9 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var maxx = boundary.maxx + pad, maxy = boundary.maxy + pad; var rngx = maxx - minx, rngy = maxy - miny; var prev_s = 128; - var _surf = surface_create(prev_s, prev_s); - _surf = surface_verify(_surf, prev_s, prev_s); - surface_set_target(_surf); + _path_preview_surface = surface_verify(_path_preview_surface, prev_s, prev_s); + surface_set_target(_path_preview_surface); DRAW_CLEAR var ox, oy, nx, ny; @@ -1184,10 +1184,8 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { shader_set_f("cornerDis", 0.5); shader_set_f("mixAmo", 1); - draw_surface_safe(_surf); + draw_surface_safe(_path_preview_surface); surface_reset_shader(); - - surface_free(_surf); } static getLineCount = function() { return 1; } @@ -1349,4 +1347,10 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { } static getPreviewBoundingBox = function() { return BBOX().fromBoundingBox(boundary); } + + static onCleanUp = function() { + surface_free(_path_preview_surface); + surface_free( path_preview_surface); + } + } \ No newline at end of file diff --git a/scripts/node_path_smooth/node_path_smooth.gml b/scripts/node_path_smooth/node_path_smooth.gml index 89b4760ad..a4cf58594 100644 --- a/scripts/node_path_smooth/node_path_smooth.gml +++ b/scripts/node_path_smooth/node_path_smooth.gml @@ -34,7 +34,8 @@ function Node_Path_Smooth(_x, _y, _group = noone) : Node(_x, _y, _group) constru boundary = new BoundingBox(); cached_pos = ds_map_create(); - path_preview_surface = noone; + path_preview_surface = noone; + _path_preview_surface = noone; #endregion #region ---- editor ---- @@ -189,10 +190,9 @@ function Node_Path_Smooth(_x, _y, _group = noone) : Node(_x, _y, _group) constru var maxx = boundary.maxx + pad, maxy = boundary.maxy + pad; var rngx = maxx - minx, rngy = maxy - miny; var prev_s = 128; - var _surf = surface_create(prev_s, prev_s); - _surf = surface_verify(_surf, prev_s, prev_s); - surface_set_target(_surf); + _path_preview_surface = surface_verify(_path_preview_surface, prev_s, prev_s); + surface_set_target(_path_preview_surface); DRAW_CLEAR var ox, oy, nx, ny; @@ -224,10 +224,9 @@ function Node_Path_Smooth(_x, _y, _group = noone) : Node(_x, _y, _group) constru shader_set_f("cornerDis", 0.5); shader_set_f("mixAmo", 1); - draw_surface_safe(_surf); + draw_surface_safe(_path_preview_surface); surface_reset_shader(); - surface_free(_surf); } static getLineCount = function() { return 1; } @@ -353,4 +352,9 @@ function Node_Path_Smooth(_x, _y, _group = noone) : Node(_x, _y, _group) constru } } + static onCleanUp = function() { + surface_free(_path_preview_surface); + surface_free( path_preview_surface); + } + } \ No newline at end of file diff --git a/scripts/node_segment_filter/node_segment_filter.gml b/scripts/node_segment_filter/node_segment_filter.gml index eb2b3b430..c2a2447f1 100644 --- a/scripts/node_segment_filter/node_segment_filter.gml +++ b/scripts/node_segment_filter/node_segment_filter.gml @@ -22,8 +22,6 @@ function Node_Segment_Filter(_x, _y, _group = noone) : Node(_x, _y, _group) cons ["Filter", false], 1, 2, 3, ]; - path_preview_surface = noone; - static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { var _segs = outputs[0].getValue(); var ox, oy, nx, ny;