From e0c50eb23aa3bd379c025f72e213c84112e7ab75 Mon Sep 17 00:00:00 2001 From: Tanasart Date: Fri, 13 Sep 2024 13:25:00 +0700 Subject: [PATCH] [Path] Fix general errors. --- objects/_p_dialog/Create_0.gml | 2 +- objects/o_dialog_about/Create_0.gml | 2 +- objects/o_dialog_add_node/Create_0.gml | 6 +- objects/o_dialog_assetbox/Create_0.gml | 2 +- objects/o_dialog_gradient/Create_0.gml | 4 +- objects/o_dialog_palette/Create_0.gml | 2 +- objects/o_dialog_preference/Create_0.gml | 2 +- objects/o_dialog_splash/Create_0.gml | 8 +- objects/o_main/Create_0.gml | 7 -- objects/o_main/Other_2.gml | 13 +-- scripts/file_functions/file_functions.gml | 8 +- scripts/globals/globals.gml | 3 +- scripts/mouse_input/mouse_input.gml | 14 +-- .../node_3d_mesh_cube/node_3d_mesh_cube.gml | 2 + scripts/node_path/node_path.gml | 6 +- scripts/node_tunnel_in/node_tunnel_in.gml | 40 +++---- scripts/node_tunnel_out/node_tunnel_out.gml | 28 ++--- scripts/outputBox/outputBox.gml | 58 ++++++++-- scripts/panel_menu/panel_menu.gml | 39 ++++--- scripts/panel_nodes/panel_nodes.gml | 8 +- .../panel_notification/panel_notification.gml | 104 ++++++++---------- scripts/panel_tunnels/panel_tunnels.gml | 32 +++--- scripts/preferences/preferences.gml | 2 +- scripts/project_data/project_data.gml | 4 + scripts/quarternionBox/quarternionBox.gml | 12 +- scripts/scrollPane/scrollPane.gml | 2 +- scripts/tunnel_server/tunnel_server.gml | 2 +- .../8074e464-c9d9-473f-8360-9232a67d16c2.png | Bin 0 -> 583 bytes .../bfbb97f1-6634-4e52-8903-30f3094d73e5.png | Bin 535 -> 0 bytes .../1fb79c3d-075d-47c6-b7a9-3c06e3094978.png | Bin 0 -> 583 bytes .../d702fc25-9b44-43cb-9569-7c37b0e0f93b.png | Bin 535 -> 0 bytes .../s_button_path_icon/s_button_path_icon.yy | 14 +-- .../4c48d545-4c8c-473a-aa04-e59a8b268e37.png | Bin 667 -> 0 bytes .../d3a9673c-7967-4742-b77f-93e195f29a76.png | Bin 0 -> 756 bytes .../e30d06ac-12cf-4f59-8b5a-c063d94a20ee.png | Bin 667 -> 0 bytes .../310317f2-aaaf-4f2b-b9eb-5196013ab263.png | Bin 0 -> 756 bytes .../s_button_path_not_found_icon.yy | 12 +- 37 files changed, 229 insertions(+), 209 deletions(-) create mode 100644 sprites/s_button_path_icon/8074e464-c9d9-473f-8360-9232a67d16c2.png delete mode 100644 sprites/s_button_path_icon/bfbb97f1-6634-4e52-8903-30f3094d73e5.png create mode 100644 sprites/s_button_path_icon/layers/8074e464-c9d9-473f-8360-9232a67d16c2/1fb79c3d-075d-47c6-b7a9-3c06e3094978.png delete mode 100644 sprites/s_button_path_icon/layers/bfbb97f1-6634-4e52-8903-30f3094d73e5/d702fc25-9b44-43cb-9569-7c37b0e0f93b.png delete mode 100644 sprites/s_button_path_not_found_icon/4c48d545-4c8c-473a-aa04-e59a8b268e37.png create mode 100644 sprites/s_button_path_not_found_icon/d3a9673c-7967-4742-b77f-93e195f29a76.png delete mode 100644 sprites/s_button_path_not_found_icon/layers/4c48d545-4c8c-473a-aa04-e59a8b268e37/e30d06ac-12cf-4f59-8b5a-c063d94a20ee.png create mode 100644 sprites/s_button_path_not_found_icon/layers/d3a9673c-7967-4742-b77f-93e195f29a76/310317f2-aaaf-4f2b-b9eb-5196013ab263.png diff --git a/objects/_p_dialog/Create_0.gml b/objects/_p_dialog/Create_0.gml index 596057359..a0f7e0d3c 100644 --- a/objects/_p_dialog/Create_0.gml +++ b/objects/_p_dialog/Create_0.gml @@ -291,7 +291,7 @@ WINDOW_ACTIVE = window; - if(mouse_press(mb_any)) { + if(mouse_press(mb_any, true, true)) { setFocus(self.id, "Dialog"); with(_p_dialog) other.depth = min(other.depth, depth - 1); diff --git a/objects/o_dialog_about/Create_0.gml b/objects/o_dialog_about/Create_0.gml index ac12cc7e4..545a3c607 100644 --- a/objects/o_dialog_about/Create_0.gml +++ b/objects/o_dialog_about/Create_0.gml @@ -15,7 +15,7 @@ event_inherited(); [ "WebP", "Google" ], [ "FFmpeg", "FFmpeg team" ], [ "File dialog module", "Samuel Venable" ], - [ "gif importer\nWindow commands\nApollow LUA compiler", "YellowAfterLife" ], + [ "gif importer\nWindow commands\nApollow LUA compiler\nWinwin", "YellowAfterLife" ], [ "The Book of Shaders", "Patricio Gonzalez Vivo & Jen Lowe" ], [ "Many noise and shape shaders", "Inigo Quilez" ], diff --git a/objects/o_dialog_add_node/Create_0.gml b/objects/o_dialog_add_node/Create_0.gml index cb749450c..0f85359ab 100644 --- a/objects/o_dialog_add_node/Create_0.gml +++ b/objects/o_dialog_add_node/Create_0.gml @@ -427,6 +427,7 @@ event_inherited(); } ds_list_add(_list, "Favourites"); + if(is_array(global.FAV_NODES)) for( var i = 0, n = array_length(global.FAV_NODES); i < n; i++ ) { var _nodeIndex = global.FAV_NODES[i]; if(!ds_map_exists(ALL_NODES, _nodeIndex)) continue; @@ -437,6 +438,7 @@ event_inherited(); } ds_list_add(_list, "Recents"); + if(is_array(global.RECENT_NODES)) for( var i = 0, n = array_length(global.RECENT_NODES); i < n; i++ ) { var _nodeIndex = global.RECENT_NODES[i]; if(!ds_map_exists(ALL_NODES, _nodeIndex)) continue; @@ -717,7 +719,7 @@ event_inherited(); return hh; }); - content_pane.always_scroll = true; + function setPage(pageIndex) { ADD_NODE_PAGE = min(pageIndex, ds_list_size(category) - 1); @@ -1090,4 +1092,4 @@ event_inherited(); return hh; }); -#endregion \ No newline at end of file +#endregion diff --git a/objects/o_dialog_assetbox/Create_0.gml b/objects/o_dialog_assetbox/Create_0.gml index 94cd9a1d4..5294793b0 100644 --- a/objects/o_dialog_assetbox/Create_0.gml +++ b/objects/o_dialog_assetbox/Create_0.gml @@ -74,7 +74,7 @@ event_inherited(); return hh + 8; }); - folderPane.always_scroll = true; + contentPane = new scrollPane(content_w, content_h, function(_y, _m) { draw_clear_alpha(c_white, 0); diff --git a/objects/o_dialog_gradient/Create_0.gml b/objects/o_dialog_gradient/Create_0.gml index 0a6daca39..a122d9eb4 100644 --- a/objects/o_dialog_gradient/Create_0.gml +++ b/objects/o_dialog_gradient/Create_0.gml @@ -150,7 +150,7 @@ event_inherited(); return hh; }); - sp_presets.always_scroll = true; + #endregion #region palette @@ -245,7 +245,7 @@ event_inherited(); return hh; }); - sp_palettes.always_scroll = true; + #endregion #region action diff --git a/objects/o_dialog_palette/Create_0.gml b/objects/o_dialog_palette/Create_0.gml index 872f3c07d..2a0e3edd0 100644 --- a/objects/o_dialog_palette/Create_0.gml +++ b/objects/o_dialog_palette/Create_0.gml @@ -135,7 +135,7 @@ event_inherited(); return hh; }); - sp_presets.always_scroll = true; + #endregion #region tools diff --git a/objects/o_dialog_preference/Create_0.gml b/objects/o_dialog_preference/Create_0.gml index 9edab624b..0b20e2861 100644 --- a/objects/o_dialog_preference/Create_0.gml +++ b/objects/o_dialog_preference/Create_0.gml @@ -109,7 +109,7 @@ event_inherited(); return hh; }); - sp_page.always_scroll = true; + sp_page.show_scroll = false; #endregion diff --git a/objects/o_dialog_splash/Create_0.gml b/objects/o_dialog_splash/Create_0.gml index 18a2973eb..7e03f01ad 100644 --- a/objects/o_dialog_splash/Create_0.gml +++ b/objects/o_dialog_splash/Create_0.gml @@ -41,7 +41,7 @@ event_inherited(); var y0 = dialog_y + ui(128); var y1 = dialog_y + dialog_h - ui(16); - sp_recent = new scrollPane(x1 - x0 - ui(12), y1 - y0, function(_y, _m) { #region + sp_recent = new scrollPane(x1 - x0 - ui(12), y1 - y0, function(_y, _m) { draw_clear_alpha(COLORS.panel_bg_clear, 1); var expand = PREFERENCES.splash_expand_recent; var ww = ui(264); @@ -106,7 +106,8 @@ event_inherited(); } return hh; - }); #endregion + }); + sp_recent.always_scroll = false; x0 = x1 + ui(16); x1 = dialog_x + dialog_w - ui(16); @@ -364,7 +365,7 @@ event_inherited(); return hh + ui(20); }); - + sp_sample.always_scroll = false; #endregion #region contest @@ -664,4 +665,5 @@ event_inherited(); return hh; }); + sp_contest.always_scroll = false; #endregion \ No newline at end of file diff --git a/objects/o_main/Create_0.gml b/objects/o_main/Create_0.gml index 58f324f07..5aee9b61e 100644 --- a/objects/o_main/Create_0.gml +++ b/objects/o_main/Create_0.gml @@ -72,13 +72,6 @@ gif_complete_st = ds_stack_create(); #endregion -#region tunnel - globalvar TUNNELS_IN, TUNNELS_IN_MAP, TUNNELS_OUT; - TUNNELS_IN = ds_map_create(); - TUNNELS_IN_MAP = ds_map_create(); - TUNNELS_OUT = ds_map_create(); -#endregion - #region add on callback globalvar ANIMATION_PRE, ANIMATION_POST; diff --git a/objects/o_main/Other_2.gml b/objects/o_main/Other_2.gml index 68c174132..5294cd6fc 100644 --- a/objects/o_main/Other_2.gml +++ b/objects/o_main/Other_2.gml @@ -9,6 +9,7 @@ }; APP_DIRECTORY = env_user(); + APP_DIRECTORY = string_replace_all(APP_DIRECTORY, "\\", "/"); show_debug_message($"App directory: {APP_DIRECTORY}"); directory_verify(APP_DIRECTORY); @@ -53,6 +54,7 @@ APP_LOCATION = working_directory; print($"===================== WORKING DIRECTORIES =====================\n\t{working_directory}\n\t{DIRECTORY}"); + directory_verify($"{DIRECTORY}log"); #endregion #region Set up @@ -63,9 +65,6 @@ if(!IS_CMD) { __initHotKey(); log_message("SESSION", $"> init Hotkeys | complete in {get_timer() - t}"); t = get_timer(); } __fnInit(); - var dir = string(DIRECTORY) + "log"; - directory_verify(dir); - log_clear(); log_newline(); log_message("SESSION", "Begin"); @@ -111,11 +110,11 @@ if(file_exists_empty("icon.png")) file_copy("icon.png", DIRECTORY + "icon.png"); - var cmd = ".pxc=\"" + string(program_directory) + "PixelComposer.exe\""; - shell_execute_async("assoc", cmd); + // var cmd = ".pxc=\"" + string(program_directory) + "PixelComposer.exe\""; + // shell_execute_async("assoc", cmd); - var cmd = ".pxcc=\"" + string(program_directory) + "PixelComposer.exe\""; - shell_execute_async("assoc", cmd); + // var cmd = ".pxcc=\"" + string(program_directory) + "PixelComposer.exe\""; + // shell_execute_async("assoc", cmd); } directory_set_current_working(DIRECTORY); diff --git a/scripts/file_functions/file_functions.gml b/scripts/file_functions/file_functions.gml index dcccb7713..d8b3c3972 100644 --- a/scripts/file_functions/file_functions.gml +++ b/scripts/file_functions/file_functions.gml @@ -7,12 +7,12 @@ function file_copy_override(src, dest) { function filepath_resolve(path) { INLINE - var _path = path; - _path = string_replace_all(_path, "%DIR%/", DIRECTORY); - _path = string_replace_all(_path, "%APP%/", APP_LOCATION); + path = string_replace_all(path, "%DIR%/", DIRECTORY); + path = string_replace_all(path, "%APP%/", APP_LOCATION); + path = string_replace_all(path, "\\", "/"); - return _path; + return path; } function get_open_filenames_compat(ext, sel, caption = "Open") { diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index 1f1b47e0c..8d28d7e82 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -41,7 +41,7 @@ LATEST_VERSION = 1_17_00; VERSION = 1_17_12_0; SAVE_VERSION = 1_17_10_0; - VERSION_STRING = MAC? "1.18.002m" : "1.18.rc1.004"; + VERSION_STRING = MAC? "1.18.002m" : "1.18.rc2.001"; BUILD_NUMBER = 1_17_12_0; HOTKEYS = ds_map_create(); @@ -54,6 +54,7 @@ globalvar CURRENT_COLOR; CURRENT_COLOR = cola(c_white); + // gml_release_mode(true); #endregion #region input diff --git a/scripts/mouse_input/mouse_input.gml b/scripts/mouse_input/mouse_input.gml index 97145a4e3..2cc2d67e6 100644 --- a/scripts/mouse_input/mouse_input.gml +++ b/scripts/mouse_input/mouse_input.gml @@ -70,17 +70,15 @@ function mouse_click(mouse, focus = true) { return WINDOW_ACTIVE == noone? mouse_check_button(mouse) : winwin_mouse_check_button_safe(WINDOW_ACTIVE, mouse); } -function mouse_press(mouse, focus = true) { +function mouse_press(mouse, focus = true, pass = false) { INLINE - if(MOUSE_BLOCK) return false; - if(!focus) return false; + if(!pass && MOUSE_BLOCK) return false; + if(!focus) return false; - if(PEN_RIGHT_PRESS) return mouse == mb_right; + if(PEN_RIGHT_PRESS) return mouse == mb_right; + if(mouse == mb_any) return winwin_mouse_check_button_pressed_safe(WINDOW_ACTIVE, mb_left) || winwin_mouse_check_button_pressed_safe(WINDOW_ACTIVE, mb_right); - if(WINDOW_ACTIVE == noone) return mouse_check_button_pressed(mouse); - if(mouse != mb_any) return winwin_mouse_check_button_pressed_safe(WINDOW_ACTIVE, mouse); - - return winwin_mouse_check_button_pressed_safe(WINDOW_ACTIVE, mb_left) || winwin_mouse_check_button_pressed_safe(WINDOW_ACTIVE, mb_right); + return winwin_mouse_check_button_pressed_safe(WINDOW_ACTIVE, mouse); } function mouse_release(mouse, focus = true) { diff --git a/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml b/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml index eaf6045ee..e404e4d7b 100644 --- a/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml +++ b/scripts/node_3d_mesh_cube/node_3d_mesh_cube.gml @@ -52,9 +52,11 @@ function Node_3D_Mesh_Cube(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group var _mat_6 = _data[in_mesh + 6]; var object; + if(_mat_side) { object = getObject(_array_index, __3dCubeFaces); object.materials = [ _mat_1, _mat_2, _mat_3, _mat_4, _mat_5, _mat_6 ]; + } else { object = getObject(_array_index, __3dCube); object.materials = [ _mat_1 ]; diff --git a/scripts/node_path/node_path.gml b/scripts/node_path/node_path.gml index ebacfd95b..b33f9d739 100644 --- a/scripts/node_path/node_path.gml +++ b/scripts/node_path/node_path.gml @@ -938,9 +938,9 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var _cKey = _dist; if(ds_map_exists(cached_pos, _cKey)) { - var _p = cached_pos[? _cKey]; - out.x = _p[_ANCHOR.x]; - out.y = _p[_ANCHOR.y]; + var _cachep = cached_pos[? _cKey]; + out.x = _cachep.x; + out.y = _cachep.y; return out; } diff --git a/scripts/node_tunnel_in/node_tunnel_in.gml b/scripts/node_tunnel_in/node_tunnel_in.gml index 96de553c1..dff621c1f 100644 --- a/scripts/node_tunnel_in/node_tunnel_in.gml +++ b/scripts/node_tunnel_in/node_tunnel_in.gml @@ -15,7 +15,7 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct preview_scale = 1; var tname = ""; - if(!LOADING && !APPENDING) tname = $"tunnel{ds_map_size(TUNNELS_IN_MAP)}"; + if(!LOADING && !APPENDING) tname = $"tunnel{ds_map_size(project.tunnels_in_map)}"; newInput(0, nodeValue_Text("Name", self, tname )) .rejectArray(); @@ -37,21 +37,23 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct static resetMap = function() { var _key = inputs[0].getValue(); - TUNNELS_IN_MAP[? node_id] = _key; - TUNNELS_IN[? _key] = inputs[1]; - } resetMap(); + project.tunnels_in_map[? node_id] = _key; + project.tunnels_in[? _key] = inputs[1]; + } + + resetMap(); static checkDuplicate = function() { var _key = inputs[0].getValue(); - var amo = ds_map_size(TUNNELS_IN_MAP); - var k = ds_map_find_first(TUNNELS_IN_MAP); + var amo = ds_map_size(project.tunnels_in_map); + var k = ds_map_find_first(project.tunnels_in_map); var dup = false; repeat(amo) { - if(k != node_id && TUNNELS_IN_MAP[? k] == _key) + if(k != node_id && project.tunnels_in_map[? k] == _key) dup = true; - k = ds_map_find_next(TUNNELS_IN_MAP, k); + k = ds_map_find_next(project.tunnels_in_map, k); } if(dup && error_notification == noone) { @@ -67,19 +69,19 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct var _key = inputs[0].getValue(); resetMap(); - var amo = ds_map_size(TUNNELS_IN_MAP); - var k = ds_map_find_first(TUNNELS_IN_MAP); + var amo = ds_map_size(project.tunnels_in_map); + var k = ds_map_find_first(project.tunnels_in_map); repeat(amo) { if(ds_map_exists(PROJECT.nodeMap, k) && struct_has(PROJECT.nodeMap[? k], "resetMap")) PROJECT.nodeMap[? k].resetMap(); - k = ds_map_find_next(TUNNELS_IN_MAP, k); + k = ds_map_find_next(project.tunnels_in_map, k); } - var k = ds_map_find_first(TUNNELS_IN_MAP); + var k = ds_map_find_first(project.tunnels_in_map); repeat(amo) { if(ds_map_exists(PROJECT.nodeMap, k) && struct_has(PROJECT.nodeMap[? k], "checkDuplicate")) PROJECT.nodeMap[? k].checkDuplicate(); - k = ds_map_find_next(TUNNELS_IN_MAP, k); + k = ds_map_find_next(project.tunnels_in_map, k); } if(index == 0) { RENDER_ALL_REORDER } @@ -103,19 +105,19 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct var nodes = []; var nodeNames = []; var _key = inputs[0].getValue(); - var amo = ds_map_size(TUNNELS_OUT); - var k = ds_map_find_first(TUNNELS_OUT); + var amo = ds_map_size(project.tunnels_out); + var k = ds_map_find_first(project.tunnels_out); LOG_BLOCK_START(); LOG_IF(global.FLAG.render == 1, $"→→→→→ Call get next node from: {INAME}"); repeat(amo) { - if(TUNNELS_OUT[? k] == _key) { + if(project.tunnels_out[? k] == _key) { array_push(nodes, PROJECT.nodeMap[? k]); array_push(nodeNames, PROJECT.nodeMap[? k].internalName); } - k = ds_map_find_next(TUNNELS_OUT, k); + k = ds_map_find_next(project.tunnels_out, k); } LOG_IF(global.FLAG.render == 1, $"→→ Push {nodeNames} to queue."); @@ -157,7 +159,7 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct if(!hover) return; var _key = inputs[0].getValue(); - var _keys = ds_map_keys_to_array(TUNNELS_OUT); + var _keys = ds_map_keys_to_array(project.tunnels_out); draw_set_color(inputs[1].color_display); draw_set_alpha(0.5); @@ -165,7 +167,7 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct for (var i = 0, n = array_length(_keys); i < n; i++) { var _k = _keys[i]; - if(TUNNELS_OUT[? _k] != _key) continue; + if(project.tunnels_out[? _k] != _key) continue; if(!ds_map_exists(PROJECT.nodeMap, _k)) continue; var node = PROJECT.nodeMap[? _k]; diff --git a/scripts/node_tunnel_out/node_tunnel_out.gml b/scripts/node_tunnel_out/node_tunnel_out.gml index 7cc46df22..4874fd05a 100644 --- a/scripts/node_tunnel_out/node_tunnel_out.gml +++ b/scripts/node_tunnel_out/node_tunnel_out.gml @@ -15,8 +15,8 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc preview_scale = 1; var tname = ""; - if(!LOADING && !APPENDING && !ds_map_empty(TUNNELS_IN)) - tname = ds_map_find_first(TUNNELS_IN); + if(!LOADING && !APPENDING && !ds_map_empty(project.tunnels_in)) + tname = ds_map_find_first(project.tunnels_in); newInput(0, nodeValue_Text("Name", self, tname )) .setDisplay(VALUE_DISPLAY.text_tunnel) @@ -29,17 +29,17 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc static onInspector2Update = function() { var _key = inputs[0].getValue(); - if(!ds_map_exists(TUNNELS_IN, _key)) return; + if(!ds_map_exists(project.tunnels_in, _key)) return; - var _node = TUNNELS_IN[? _key].node; + var _node = project.tunnels_in[? _key].node; graphFocusNode(_node); } static isRenderable = function() { var _key = inputs[0].getValue(); - if(!ds_map_exists(TUNNELS_IN, _key)) return false; + if(!ds_map_exists(project.tunnels_in, _key)) return false; - return TUNNELS_IN[? _key].node.rendered; + return project.tunnels_in[? _key].node.rendered; } static onValueUpdate = function(index = -1) { @@ -50,11 +50,11 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc static step = function() { var _key = inputs[0].getValue(); - TUNNELS_OUT[? node_id] = _key; + project.tunnels_out[? node_id] = _key; - if(ds_map_exists(TUNNELS_IN, _key)) { - outputs[0].setType(TUNNELS_IN[? _key].type); - outputs[0].display_type = TUNNELS_IN[? _key].display_type; + if(ds_map_exists(project.tunnels_in, _key)) { + outputs[0].setType(project.tunnels_in[? _key].type); + outputs[0].display_type = project.tunnels_in[? _key].display_type; } else { outputs[0].setType(VALUE_TYPE.any); outputs[0].display_type = VALUE_DISPLAY._default; @@ -64,8 +64,8 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc static update = function(frame = CURRENT_FRAME) { var _key = inputs[0].getValue(); - if(ds_map_exists(TUNNELS_IN, _key)) - outputs[0].setValue(TUNNELS_IN[? _key].getValue()); + if(ds_map_exists(project.tunnels_in, _key)) + outputs[0].setValue(project.tunnels_in[? _key].getValue()); } ///////////////////////////////////////////////////////////////////////////// @@ -101,9 +101,9 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc if(!hover) return; var _key = inputs[0].getValue(); - if(!ds_map_exists(TUNNELS_IN, _key)) return; + if(!ds_map_exists(project.tunnels_in, _key)) return; - var node = TUNNELS_IN[? _key].node; + var node = project.tunnels_in[? _key].node; if(node.group != group) return; preview_connecting = true; diff --git a/scripts/outputBox/outputBox.gml b/scripts/outputBox/outputBox.gml index c596fd950..03bbdca5d 100644 --- a/scripts/outputBox/outputBox.gml +++ b/scripts/outputBox/outputBox.gml @@ -1,13 +1,14 @@ function outputBox() : widget() constructor { + expand = false; static trigger = function() { } static drawParam = function(params) { setParam(params); - return draw(params.x, params.y, params.w, params.data); + return draw(params.x, params.y, params.w, params.data, params.m); } - static draw = function(_x, _y, _w, _value) { + static draw = function(_x, _y, _w, _value, _m) { x = _x; y = _y; w = _w; @@ -15,26 +16,43 @@ function outputBox() : widget() constructor { draw_set_text(font, fa_left, fa_top, COLORS._main_text_sub); var _txt = string(_value); - var _sh = string_height_ext(_txt, -1, w - ui(16)) + ui(16); - draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, _sh, COLORS._main_icon_light); - draw_text_ext_add(_x + ui(8), _y + ui(8), _txt, -1, _w - ui(16)); + var _bh = string_height("l"); + var _sh = string_height_ext(_txt, -1, w - ui(16)); + var _hh = (expand? _sh : _bh) + ui(16); - return _sh; + draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, _hh, COLORS._main_icon_light); + + if(expand || _sh <= _bh) + draw_text_ext_add(_x + ui(8), _y + ui(8), _txt, -1, _w - ui(16)); + else + draw_text_add(_x + ui(8), _y + ui(8), "Output..."); + + if(_sh > _bh) { + var _bs = _bh; + var _bx = _x + _w - ui(8) - _bs; + var _by = _y + ui(8); + + if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, _m, iactive, ihover, "", THEME.arrow, expand? 3 : 0) == 2) + expand = !expand; + } + + return _hh; } static clone = function() { return new outputBox(); } } function outputStructBox() : widget() constructor { + expand = false; static trigger = function() { } static drawParam = function(params) { setParam(params); - return draw(params.x, params.y, params.w, params.data); + return draw(params.x, params.y, params.w, params.data, params.m); } - static draw = function(_x, _y, _w, _value) { + static draw = function(_x, _y, _w, _value, _m) { x = _x; y = _y; w = _w; @@ -42,11 +60,27 @@ function outputStructBox() : widget() constructor { draw_set_text(font, fa_left, fa_top, COLORS._main_text_sub); var _txt = json_stringify(_value, true); - var _sh = string_height_ext(_txt, -1, w - ui(16)) + ui(16); - draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, _sh, COLORS._main_icon_light); - draw_text_ext_add(_x + ui(8), _y + ui(8), _txt, -1, _w - ui(16)); + var _bh = string_height("l"); + var _sh = string_height_ext(_txt, -1, w - ui(16)); + var _hh = (expand? _sh : _bh) + ui(16); - return _sh; + draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, _hh, COLORS._main_icon_light); + + if(expand || _sh <= _bh) + draw_text_ext_add(_x + ui(8), _y + ui(8), _txt, -1, _w - ui(16)); + else + draw_text_add(_x + ui(8), _y + ui(8), $"[{instanceof(_value)}]"); + + if(_sh > _bh) { + var _bs = _bh; + var _bx = _x + _w - ui(8) - _bs; + var _by = _y + ui(8); + + if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, _m, iactive, ihover, "", THEME.arrow, expand? 3 : 0) == 2) + expand = !expand; + } + + return _hh; } static clone = function() { return new outputBox(); } diff --git a/scripts/panel_menu/panel_menu.gml b/scripts/panel_menu/panel_menu.gml index d9d9a773e..b35c94cf6 100644 --- a/scripts/panel_menu/panel_menu.gml +++ b/scripts/panel_menu/panel_menu.gml @@ -322,9 +322,9 @@ function Panel_Menu() : PanelContent() constructor { draw_clear_alpha(COLORS.panel_bg_clear, 1); menus[6][1] = STEAM_ENABLED? menu_help_steam : menu_help; var hori = w > h; - - var xx = ui(40); - var yy = ui(8); + var font = f_p2; + var xx = ui(40); + var yy = ui(8); #region about icon if(hori) { @@ -360,6 +360,7 @@ function Panel_Menu() : PanelContent() constructor { #endregion #region menu + if(hori) { if(PREFERENCES.panel_menu_right_control) xx += ui(20); @@ -370,14 +371,14 @@ function Panel_Menu() : PanelContent() constructor { xx = ui(8); yy = w < vertical_break? ui(72) : ui(40); } - + var sx = xx; var xc, x0, x1, yc, y0, y1, _mx = xx; var row = 1, maxRow = ceil(h / ui(40)); var _ww = 0; for(var i = 0; i < array_length(menus) - 1; i++) { - draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text); + draw_set_text(font, fa_center, fa_center, COLORS._main_text); var ww = string_width(menus[i][0]) + ui(16 + 8); _ww += ww; if(_ww > w * 0.4 - sx) { @@ -395,7 +396,7 @@ function Panel_Menu() : PanelContent() constructor { var _menu = menus[i]; var _name = _menu[0]; - draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text); + draw_set_text(font, fa_center, fa_center, COLORS._main_text); var ww = string_width(_name) + ui(16); var hh = line_get_height() + ui(8); @@ -429,7 +430,7 @@ function Panel_Menu() : PanelContent() constructor { } } - draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text); + draw_set_text(font, fa_center, fa_center, COLORS._main_text); draw_text_add(xc, yc, _name); if(hori) { @@ -449,16 +450,18 @@ function Panel_Menu() : PanelContent() constructor { #region notification var warning_amo = ds_list_size(WARNING); var error_amo = ds_list_size(ERRORS); + var nx0, ny0; if(hori) { - var nx0 = _mx + ui(24); - var ny0 = h / 2; + nx0 = _mx + ui(8); + ny0 = h / 2; + } else { - var nx0 = ui(8); - var ny0 = yy + ui(16); + nx0 = ui(8); + ny0 = yy + ui(16); } - draw_set_text(f_p0, fa_left, fa_center); + draw_set_text(font, fa_left, fa_center); var wr_w = ui(20) + ui(8) + string_width(string(warning_amo)); var er_w = ui(20) + ui(8) + string_width(string(error_amo)); @@ -469,7 +472,7 @@ function Panel_Menu() : PanelContent() constructor { noti_icon_show = lerp_float(noti_icon_show, 0, 4); var nw = hori? ui(16) + wr_w + ui(16) + er_w + noti_icon_show * ui(32) : w - ui(16); - var nh = ui(32); + var nh = ui(28); noti_flash = lerp_linear(noti_flash, 0, 0.02); var ev = animation_curve_eval(ac_flash, noti_flash); @@ -497,22 +500,22 @@ function Panel_Menu() : PanelContent() constructor { draw_set_color(COLORS._main_text_inner); var wr_x = hori? nx0 + ui(8) : w / 2 - (wr_w + er_w + ui(16)) / 2; draw_sprite_ui_uniform(THEME.noti_icon_warning, warning_amo? 1 : 0, wr_x + ui(10), ny0); - draw_text_int(wr_x + ui(28), ny0, warning_amo); + draw_text_add(wr_x + ui(28), ny0, warning_amo); wr_x += wr_w + ui(16); draw_sprite_ui_uniform(THEME.noti_icon_error, error_amo? 1 : 0, wr_x + ui(10), ny0); - draw_text_int(wr_x + ui(28), ny0, error_amo); + draw_text_add(wr_x + ui(28), ny0, error_amo); if(hori) nx0 += nw + ui(8); else ny0 += nh + ui(8); #endregion #region addons - var wh = ui(32); + var wh = ui(28); if(!hori) nx0 = ui(8); if(instance_exists(addon)) { - draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text); + draw_set_text(font, fa_left, fa_center, COLORS._main_text); var name = string(instance_number(addon)) + " "; var ww = hori? string_width(name) + ui(40) : w - ui(16); @@ -525,7 +528,7 @@ function Panel_Menu() : PanelContent() constructor { dialogPanelCall(new Panel_Addon()); } else draw_sprite_stretched(THEME.ui_panel_bg, 1, nx0, ny0 - wh / 2, ww, wh); - draw_text_int(nx0 + ui(8), ny0, name); + draw_text_add(nx0 + ui(8), ny0, name); draw_sprite_ui(THEME.addon_icon, 0, nx0 + ui(20) + string_width(name), ny0 + ui(1),,,, COLORS._main_icon); if(hori) nx0 += ww + ui(4); diff --git a/scripts/panel_nodes/panel_nodes.gml b/scripts/panel_nodes/panel_nodes.gml index 1c180441a..b22ac44fc 100644 --- a/scripts/panel_nodes/panel_nodes.gml +++ b/scripts/panel_nodes/panel_nodes.gml @@ -50,7 +50,7 @@ function Panel_Nodes() : PanelContent() constructor { } } else draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, _x0, _y, _x1 - _x0, hg, COLORS._main_icon_light, 1); - draw_sprite_stretched_add(THEME.ui_panel, 1, _x0, _y, _x1 - _x0, hg, c_white, .3); + draw_sprite_stretched_add(THEME.ui_panel, 1, _x0, _y, _x1 - _x0, hg, c_white, .1); var bw = ui(24); var bh = ui(24); @@ -65,8 +65,8 @@ function Panel_Nodes() : PanelContent() constructor { var spr = _n.spr; draw_sprite_ui(spr, 1, _x0 + ui(4 + 16), _y + hg / 2, 0.25, 0.25, 0, c_white, 1); var cc = COLORS._main_text; - draw_set_text(f_p1, fa_left, fa_center, cc); - draw_text(_x0 + hg + ui(8) + (isGroup * ui(20)), _y + hg / 2, name); + draw_set_text(f_p2, fa_left, fa_center, cc); + draw_text_add(_x0 + hg + ui(8) + (isGroup * ui(20)), _y + hg / 2, name); if(isGroup) draw_sprite_ui(THEME.arrow, (!node_collapse[? node.node_id]) * 3, _x0 + hg + ui(16), _y + hg / 2,,,,, 0.75); _y += hg + ui(4); @@ -83,7 +83,7 @@ function Panel_Nodes() : PanelContent() constructor { } sc_nodes = new scrollPane(w - ui(padding + padding), h - ui(padding + padding + 40), function(_y, _m) { - draw_clear_alpha(COLORS.panel_bg_clear, 0); + draw_clear_alpha(COLORS.panel_bg_clear_inner, 1); var _h = drawNodeList(PROJECT.nodes, 0, sc_nodes.surface_w, _y, _m); return _h; }); diff --git a/scripts/panel_notification/panel_notification.gml b/scripts/panel_notification/panel_notification.gml index 1e3366ffa..f322f0c82 100644 --- a/scripts/panel_notification/panel_notification.gml +++ b/scripts/panel_notification/panel_notification.gml @@ -17,37 +17,39 @@ #endregion function Panel_Notification() : PanelContent() constructor { - title = __txt("Notifications"); - w = ui(720); - h = ui(480); - - title_height = 64; - padding = 20; + title = __txt("Notifications"); + w = ui(720); + h = ui(480); + padding = 8; current_page = 0; filter = NOTI_TYPE.log | NOTI_TYPE.warning | NOTI_TYPE.error; - showHeader = false; noti_selecting = noone; + show_time = false; + rightClickMenu = [ MENU_ITEMS.noti_clear_all, MENU_ITEMS.noti_clear_log, MENU_ITEMS.noti_clear_warning, -1, + menuItem(__txt("Toggle timestamp"), function() /*=>*/ { show_time = !show_time }, noone, noone, function() /*=>*/ {return show_time}), + -1, MENU_ITEMS.noti_open_log, ]; function onResize() { - PANEL_PADDING - sp_noti.resize(w - ui(padding + padding), h - ui(title_height + padding)); + sp_noti.resize(w - ui(padding + padding), h - ui(padding + padding)); } - sp_noti = new scrollPane(w - ui(padding + padding), h - ui(title_height + padding), function(_y, _m) { - draw_clear_alpha(COLORS.panel_bg_clear, 0); + sp_noti = new scrollPane(w - ui(padding + padding), h - ui(padding + padding), function(_y, _m) { + draw_clear_alpha(COLORS.panel_bg_clear_inner, 1); var hh = 32; var yy = _y; - var txw = sp_noti.surface_w - ui(48 + 48 + 20); + var txw = sp_noti.surface_w - ui(48); + if(show_time) txw -= ui(68); + var amo = ds_list_size(STATUSES); var pad = THEME_VALUE.panel_notification_padding; @@ -61,17 +63,16 @@ function Panel_Notification() : PanelContent() constructor { if(is_undefined(noti)) continue; if(noti.type & filter == 0) continue; - draw_set_font(f_p2); + draw_set_font(f_p3); var _w = sp_noti.surface_w; var _h = ui(12) + string_height_ext(noti.txt, -1, txw); _h += pad * 2; if(yy >= -_h && yy <= sp_noti.h) { - draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, 0, yy, _w, _h, COLORS.dialog_notification_bg, 1); - + if(pHOVER && pHOVER && point_in_rectangle(_m[0], _m[1], 0, yy, _w, yy + _h)) { sp_noti.hover_content = true; - draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, 0, yy, _w, _h, COLORS.dialog_notification_bg_hover, 1); + draw_sprite_stretched_ext(THEME.s_box_r2, 0, 0, yy, _w, _h, CDEF.main_dkblack, 1); if(noti.tooltip != "") TOOLTIP = noti.tooltip; @@ -94,31 +95,33 @@ function Panel_Notification() : PanelContent() constructor { var _nwx = sp_noti.w - ui(12) - ui(40); var _nw = _nwx * noti.life / noti.life_max; - draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, ui(40), yy, _nw, _h, COLORS.dialog_notification_icon_bg, 1); + draw_sprite_stretched_ext(THEME.s_box_r2, 0, ui(40), yy, _nw, _h, CDEF.main_mdblack, 1); } - draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, 0, yy, ui(48), _h, noti.color, 1); - if(noti.icon_end != noone) draw_sprite_ui(noti.icon_end, 1, _w - ui(24), yy + _h / 2,,,, COLORS._main_icon); var ic = noti.icon; if(noti.icon == noone) { switch(noti.type) { - case NOTI_TYPE.log : ic = THEME.noti_icon_log; break; + case NOTI_TYPE.log : ic = THEME.noti_icon_log; break; case NOTI_TYPE.warning : ic = THEME.noti_icon_warning; break; - case NOTI_TYPE.error : ic = THEME.noti_icon_error; break; + case NOTI_TYPE.error : ic = THEME.noti_icon_error; break; } } - draw_sprite_ui(ic, 1, ui(24), yy + _h / 2); - - var tx = ui(48) + timeW + ui(12); - - draw_set_text(f_p3, fa_right, fa_center, COLORS._main_text_sub_inner); - draw_text_line(tx - ui(4), yy + _h / 2, noti.time, -1, txw); + draw_sprite_ui(ic, 1, ui(16), yy + _h / 2, .85, .85); - draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text_inner); + var tx = ui(32); + + if(show_time) { + tx += timeW + ui(8); + + draw_set_text(f_p3, fa_right, fa_center, COLORS._main_text_sub_inner); + draw_text_line(tx - ui(4), yy + _h / 2, noti.time, -1, txw); + } + + draw_set_text(f_p3, fa_left, fa_center, COLORS._main_text_inner); draw_text_line(tx + ui(4), yy + _h / 2, noti.txt, -1, txw); if(noti.amount > 1) { @@ -129,57 +132,36 @@ function Panel_Notification() : PanelContent() constructor { var bx = _w - ui(0) - bw; var by = yy + ui(0) + ui(1); - draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, bx, by, bw, bh, COLORS._main_icon_dark, 0.75); + // draw_sprite_stretched_ext(THEME.s_box_r2, 0, bx, by, bw, bh, CDEF.main_dkblack, 0.75); draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text_accent); draw_text(bx + bw / 2, by + bh / 2, noti.amount); } } - yy += _h + ui(4); - hh += _h + ui(4); + yy += _h + ui(2); + hh += _h + ui(2); } return hh; }); + + function drawContent(panel) { draw_clear_alpha(COLORS.panel_bg_clear, 0); - PANEL_PADDING - PANEL_TITLE - var ww = ui(28); - var hh = ui(28); - var bx = w - ui(in_dialog? padding - 8 : padding) - ww; - var by = title_height / 2 - ui(16 + !in_dialog * 2); - - var error = !!(filter & NOTI_TYPE.error); - var toolt = error? __txtx("noti_hide_error", "Hide error") : __txtx("noti_show_error", "Show error"); - var b = buttonInstant(THEME.button_hide, bx, by, ww, hh, [mx, my], pFOCUS, pHOVER, toolt, THEME.noti_icon_error, error, c_white, 0.75 + error * 0.25); - if(b == 2) filter = filter ^ NOTI_TYPE.error; - if(b == 3) menuCall("notification_error_menu", rightClickMenu); - bx -= ui(36); - - var warn = !!(filter & NOTI_TYPE.warning); - var toolt = warn? __txtx("noti_hide_warning", "Hide warning") : __txtx("noti_show_warning", "Show warning"); - var b = buttonInstant(THEME.button_hide, bx, by, ww, hh, [mx, my], pFOCUS, pHOVER, toolt, THEME.noti_icon_warning, warn, c_white, 0.75 + warn * 0.25); - if(b == 2) filter = filter ^ NOTI_TYPE.warning; - if(b == 3) menuCall("notification_warning_menu", rightClickMenu); - bx -= ui(36); - - var log = !!(filter & NOTI_TYPE.log); - var toolt = log? __txtx("noti_hide_log", "Hide log") : __txtx("noti_show_log", "Show log"); - var b = buttonInstant(THEME.button_hide, bx, by, ww, hh, [mx, my], pFOCUS, pHOVER, toolt, THEME.noti_icon_log, log, c_white, 0.75 + log * 0.25); - if(b == 2) filter = filter ^ NOTI_TYPE.log; - if(b == 3) menuCall("notification_log_menu", rightClickMenu); - var px = ui(padding); - var py = ui(title_height); + var py = ui(padding); var pw = w - ui(padding + padding); - var ph = h - ui(title_height + padding); + var ph = h - ui(padding + padding); draw_sprite_stretched(THEME.ui_panel_bg, 1, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16)); - sp_noti.setFocusHover(pHOVER, pHOVER); + sp_noti.setFocusHover(pFOCUS, pHOVER); sp_noti.draw(px, py, mx - px, my - py); + + if(mouse_press(mb_right, pFOCUS)) { + menuCall("notification_log_menu", rightClickMenu); + } } } \ No newline at end of file diff --git a/scripts/panel_tunnels/panel_tunnels.gml b/scripts/panel_tunnels/panel_tunnels.gml index e1e26630e..50b0059ef 100644 --- a/scripts/panel_tunnels/panel_tunnels.gml +++ b/scripts/panel_tunnels/panel_tunnels.gml @@ -51,10 +51,10 @@ function Panel_Tunnels() : PanelContent() constructor { } } - function onResize() { sc_tunnel.resize(w - ui(padding + padding), h - ui(padding + padding) - ui(28)); } + function onResize() { sc_tunnel.resize(w - ui(padding + padding), h - ui(padding + padding) - ui(28 + 40)); } - sc_tunnel = new scrollPane(w - ui(padding + padding), h - ui(padding + padding) - ui(28), function(_y, _m) { - draw_clear_alpha(COLORS.panel_bg_clear, 0); + sc_tunnel = new scrollPane(w - ui(padding + padding), h - ui(padding + padding) - ui(28 + 40), function(_y, _m) { + draw_clear_alpha(COLORS.panel_bg_clear_inner, 1); var _h = 0; var ww = sc_tunnel.surface_w; var hg = ui(36); @@ -76,7 +76,7 @@ function Panel_Tunnels() : PanelContent() constructor { tunnel_select = tunnel_select == node? noone : node; } else draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, _y, ww, hg, COLORS._main_icon_light, 1); - draw_sprite_stretched_add(THEME.ui_panel, 1, 0, _y, ww, hg, c_white, .3); + draw_sprite_stretched_add(THEME.ui_panel, 1, 0, _y, ww, hg, c_white, .1); var key = node.inputs[0].getValue(0); var bw = ui(28); @@ -97,31 +97,30 @@ function Panel_Tunnels() : PanelContent() constructor { bx -= ui(32); draw_sprite_ui(THEME.tunnel, 1, ui(4 + 16), _y + hg / 2); - draw_set_text(f_p0, fa_left, fa_center, key == ""? COLORS._main_text_sub : COLORS._main_text); - draw_text(ui(4 + 32 + 4), _y + hg / 2, key == ""? $"[{__txtx("panel_tunnel_no_key", "No key")}]" : key); + draw_set_text(f_p2, fa_left, fa_center, key == ""? COLORS._main_text_sub : COLORS._main_text); + draw_text_add(ui(4 + 32 + 4), _y + hg / 2, key == ""? $"[{__txtx("panel_tunnel_no_key", "No key")}]" : key); _y += hg + ui(4); _h += hg + ui(4); if(tunnel_select == node) { - var amo = ds_map_size(TUNNELS_OUT); - var k = ds_map_find_first(TUNNELS_OUT); + var amo = ds_map_size(PROJECT.tunnels_out); + var k = ds_map_find_first(PROJECT.tunnels_out); repeat(amo) { var _k = k; - k = ds_map_find_next(TUNNELS_OUT, k); + k = ds_map_find_next(PROJECT.tunnels_out, k); - var out = TUNNELS_OUT[? _k]; + var out = PROJECT.tunnels_out[? _k]; if(out != key || !ds_map_exists(PROJECT.nodeMap, _k)) continue; - + var _node = PROJECT.nodeMap[? _k]; - + draw_sprite_ui(THEME.tunnel, 0, ui(32), _y + ui(10), 0.75, 0.75, 0, COLORS._main_icon); - draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text_sub); - draw_text(ui(32 + 16), _y + ui(10), _node.renamed? _node.display_name : _node.name); - - + draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text_sub); + draw_text_add(ui(32 + 16), _y + ui(10), _node.renamed? _node.display_name : _node.name); + if(point_in_rectangle(_m[0], _m[1], 0, _y, ww, _y + ui(20))) tunnel_hover = _node; @@ -148,6 +147,7 @@ function Panel_Tunnels() : PanelContent() constructor { draw_sprite_stretched(THEME.ui_panel_bg, 1, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16)); + tb_search.setFocusHover(pFOCUS, pHOVER); tb_search.draw(px, py, pw, ui(32), search_string, [mx, my]); if(search_string == "") tb_search.sprite_index = 1; diff --git a/scripts/preferences/preferences.gml b/scripts/preferences/preferences.gml index d8f55d9ed..294550442 100644 --- a/scripts/preferences/preferences.gml +++ b/scripts/preferences/preferences.gml @@ -318,7 +318,7 @@ if(!directory_exists($"{DIRECTORY}Themes/{PREFERENCES.theme}")) PREFERENCES.theme = "default"; - + LOCALE_DEF = PREFERENCES.local == "en"; THEME_DEF = PREFERENCES.theme == "default"; FONT_DEF = PREFERENCES.theme == "default" && PREFERENCES.local == "en" && PREFERENCES.display_scaling == 1; diff --git a/scripts/project_data/project_data.gml b/scripts/project_data/project_data.gml index d6a312acc..eb60660de 100644 --- a/scripts/project_data/project_data.gml +++ b/scripts/project_data/project_data.gml @@ -84,6 +84,10 @@ on_top: true, }; + tunnels_in = ds_map_create(); + tunnels_in_map = ds_map_create(); + tunnels_out = ds_map_create(); + #region =================== ATTRIBUTES =================== attributes = variable_clone(PROJECT_ATTRIBUTES); diff --git a/scripts/quarternionBox/quarternionBox.gml b/scripts/quarternionBox/quarternionBox.gml index 6d7605d4d..b3df44f67 100644 --- a/scripts/quarternionBox/quarternionBox.gml +++ b/scripts/quarternionBox/quarternionBox.gml @@ -90,12 +90,10 @@ function quarternionBox(_onModify) : widget() constructor { var _disp = struct_try_get(_display_data, "angle_display"); if(_display_data.angle_display == QUARTERNION_DISPLAY.quarterion || (!tb[0].sliding && !tb[1].sliding && !tb[2].sliding)) { - current_value[0] = _data[0]; - current_value[1] = _data[1]; - current_value[2] = _data[2]; - - if(_display_data.angle_display == QUARTERNION_DISPLAY.quarterion) - current_value[3] = _data[3]; + current_value[0] = array_safe_get(_data, 0); + current_value[1] = array_safe_get(_data, 1); + current_value[2] = array_safe_get(_data, 2); + current_value[3] = array_safe_get(_data, 3); } if((_w - _bs) / 2 > ui(64)) { @@ -123,7 +121,7 @@ function quarternionBox(_onModify) : widget() constructor { draw_sprite_stretched_ext(THEME.textbox, 0, _x, _y, _w, _h, boxColor, 0.5 + 0.5 * interactable); for(var i = 0; i < size; i++) { - var _a = _dispDat[i]; + var _a = array_safe_get(_dispDat, i, 0); tb[i].hide = true; tb[i].setFocusHover(clickable && active, hover); diff --git a/scripts/scrollPane/scrollPane.gml b/scripts/scrollPane/scrollPane.gml index 231a68c03..04367c99e 100644 --- a/scripts/scrollPane/scrollPane.gml +++ b/scripts/scrollPane/scrollPane.gml @@ -15,7 +15,7 @@ function scrollPane(_w, _h, ondraw) : widget() constructor { content_h = 0; is_scroll = true; - always_scroll = false; + always_scroll = true; show_scroll = true; scroll_step = 64; diff --git a/scripts/tunnel_server/tunnel_server.gml b/scripts/tunnel_server/tunnel_server.gml index 6ad3ec32b..c95f98627 100644 --- a/scripts/tunnel_server/tunnel_server.gml +++ b/scripts/tunnel_server/tunnel_server.gml @@ -6,7 +6,7 @@ function tunnel_autocomplete_server(prompt, params = []) { ////////////////////////////////// ds_priority_clear(pr_list); - var _tkeys = ds_map_keys_to_array(TUNNELS_IN); + var _tkeys = ds_map_keys_to_array(PROJECT.tunnels_in); for( var i = 0, n = array_length(_tkeys); i < n; i++ ) { var gl = _tkeys[i]; diff --git a/sprites/s_button_path_icon/8074e464-c9d9-473f-8360-9232a67d16c2.png b/sprites/s_button_path_icon/8074e464-c9d9-473f-8360-9232a67d16c2.png new file mode 100644 index 0000000000000000000000000000000000000000..4007afe3e4cc1c30fb117711af0033f588f7c401 GIT binary patch literal 583 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gj3dtTpz6=aiY77hwEes65fI|H*Yfq~J=)5S5wasj7jd}q?>m~lAbph>}_sd|m<`tupO^zxXFA22Rp%;}ynTj!wEhL@LO z1vgKTkZ0~|xENP{b$Z2$7e}w3b>C)ypGto zzB5~XRNQ)VAcs=()OujJs+PD$l%ynAF z0|P4qgN%|G4HONz`6-!cmAExXYCf3))Sv;kp(HamwYVfPw*a>uKbxc8Ks^keu6{1- HoD!M|H*Yfq{|B)5S5wN4M zo1_(5&SKY`%>AS>mf^KwQ((u8S)ZFQ% z!Q;0S<8v++o$K1^|6~J?j$};NT_KA*nMSMqLjSux;a}FG!!C8<`)MX5lF!N|bKMAyJv*U&7)z`_cMj1096 z46FPsvQH#H~T-{qIje4H|G8N-}d(i%Sx73vlak{dG$hsE5JR)z4*} HQ$iB}xaGmB diff --git a/sprites/s_button_path_icon/layers/8074e464-c9d9-473f-8360-9232a67d16c2/1fb79c3d-075d-47c6-b7a9-3c06e3094978.png b/sprites/s_button_path_icon/layers/8074e464-c9d9-473f-8360-9232a67d16c2/1fb79c3d-075d-47c6-b7a9-3c06e3094978.png new file mode 100644 index 0000000000000000000000000000000000000000..4007afe3e4cc1c30fb117711af0033f588f7c401 GIT binary patch literal 583 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gj3dtTpz6=aiY77hwEes65fI|H*Yfq~J=)5S5wasj7jd}q?>m~lAbph>}_sd|m<`tupO^zxXFA22Rp%;}ynTj!wEhL@LO z1vgKTkZ0~|xENP{b$Z2$7e}w3b>C)ypGto zzB5~XRNQ)VAcs=()OujJs+PD$l%ynAF z0|P4qgN%|G4HONz`6-!cmAExXYCf3))Sv;kp(HamwYVfPw*a>uKbxc8Ks^keu6{1- HoD!M|H*Yfq{|B)5S5wN4M zo1_(5&SKY`%>AS>mf^KwQ((u8S)ZFQ% z!Q;0S<8v++o$K1^|6~J?j$};NT_KA*nMSMqLjSux;a}FG!!C8<`)MX5lF!N|bKMAyJv*U&7)z`_cMj1096 z46FPsvQH#H~T-{qIje4H|G8N-}d(i%Sx73vlak{dG$hsE5JR)z4*} HQ$iB}xaGmB diff --git a/sprites/s_button_path_icon/s_button_path_icon.yy b/sprites/s_button_path_icon/s_button_path_icon.yy index c02708469..f2260bb60 100644 --- a/sprites/s_button_path_icon/s_button_path_icon.yy +++ b/sprites/s_button_path_icon/s_button_path_icon.yy @@ -2,9 +2,9 @@ "$GMSprite":"", "%Name":"s_button_path_icon", "bboxMode":0, - "bbox_bottom":21, - "bbox_left":2, - "bbox_right":21, + "bbox_bottom":20, + "bbox_left":3, + "bbox_right":20, "bbox_top":3, "collisionKind":1, "collisionTolerance":0, @@ -12,14 +12,14 @@ "edgeFiltering":false, "For3D":false, "frames":[ - {"$GMSpriteFrame":"","%Name":"bfbb97f1-6634-4e52-8903-30f3094d73e5","name":"bfbb97f1-6634-4e52-8903-30f3094d73e5","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"8074e464-c9d9-473f-8360-9232a67d16c2","name":"8074e464-c9d9-473f-8360-9232a67d16c2","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, ], "gridX":0, "gridY":0, "height":24, "HTile":false, "layers":[ - {"$GMImageLayer":"","%Name":"d702fc25-9b44-43cb-9569-7c37b0e0f93b","blendMode":0,"displayName":"default","isLocked":false,"name":"d702fc25-9b44-43cb-9569-7c37b0e0f93b","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, + {"$GMImageLayer":"","%Name":"1fb79c3d-075d-47c6-b7a9-3c06e3094978","blendMode":0,"displayName":"default","isLocked":false,"name":"1fb79c3d-075d-47c6-b7a9-3c06e3094978","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, ], "name":"s_button_path_icon", "nineSlice":null, @@ -69,8 +69,8 @@ "tracks":[ {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ {"$Keyframe":"","Channels":{ - "0":{"$SpriteFrameKeyframe":"","Id":{"name":"bfbb97f1-6634-4e52-8903-30f3094d73e5","path":"sprites/s_button_path_icon/s_button_path_icon.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, - },"Disabled":false,"id":"07bd1bc9-e500-4b08-bdef-c2c136c2168a","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"8074e464-c9d9-473f-8360-9232a67d16c2","path":"sprites/s_button_path_icon/s_button_path_icon.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"3fcdbaef-6fc8-4d90-8578-37d18372700b","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], "visibleRange":null, diff --git a/sprites/s_button_path_not_found_icon/4c48d545-4c8c-473a-aa04-e59a8b268e37.png b/sprites/s_button_path_not_found_icon/4c48d545-4c8c-473a-aa04-e59a8b268e37.png deleted file mode 100644 index e6c6180cb38b88319c9c7a98e6398b84c298bc3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 667 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gj3dtTpz6=aiY77hwEes65fI|H*Yfq}8l)5S5wl|mpIHTQJi|D9|n5LhjJl>Nio zbyvF{wA9&ecv&Hw?Ah3%a?@7Malbrcw9nJM(Lb5CmAz$TdaR)T((kxO-^Ynh>X;@^ zyR$RMV6If)Dj%UMJDWEoWp3S5{d&oY@C%#X{Mml@wKB)sl)b#OdnX!ySh}Kn=8V&m zYBe_;3-Rf@ddhw7E*8V1iPx9jn#q{P(!+f%iB+`j#S|s$wDr838vpg&KCnc{(X@-x zb5r&d`C4nvc5#nuN?DOFTUUMNnDc#sn2&$Ulc`ggyvsvu+zOcM7{7 zYKdz^NlIc#s#S7PDv)9@GB7gHH89sTGz&4XumU0@Lu~^CD+7b%P0oHO8glbfGSez? qYY=+>`x8)u2Hb{{%-q!ClEmBs+f>VeoYIb6Mw<&;$S&Z2^n` diff --git a/sprites/s_button_path_not_found_icon/d3a9673c-7967-4742-b77f-93e195f29a76.png b/sprites/s_button_path_not_found_icon/d3a9673c-7967-4742-b77f-93e195f29a76.png new file mode 100644 index 0000000000000000000000000000000000000000..6800153bade40d8c58403c109456492c45ccf665 GIT binary patch literal 756 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gj3dtTpz6=aiY77hwEes65fI|H*Yfr0V4r;B5V$MLsQ&wEQd ziX6AsJ|-W)FLu;c%8Og_Qd|%FTTj6|-Uprex3;fXkiM|KWxLaRQ5ALnu8P9{jmHEQ zE3|TM5kGqRnnQHehAA`Fw9oWS3!hw~eDBYp18=I0-*0~Zc6MY%2z%sOnV>5F1`~sX z8QBhj9KYkQGidHre4xDH)+5$B25zSttv47nZMko-idnt+&AmtX(7k@{8BCwrUTS~1 zTv5l$^SV;@2U85=@&n5RzJ2#=D19)w?vB`@I{Ay`txhN{MPr*byN$P7R6f=-jn>eX`ks;b`TQ^_k zDkxd)@{1w0@%)O@XRgd)o8o-!W1)xI;)ALMJRj>U>RUGW_n3v=?C;acUn-Qdmu;EO zb=|G3TY`5tv!ygYh-EfeB7e2ZF@0*o;}@YHAM9e}m@`fO`0BZ$z(k;0;u=wsl30>z zm0Xkxq!^40j7)S5EOiZyLkvu;3{9;JEwv2{tPBk1+2|ZZ(U6;;l9^VCTf_UrDYZZi i8gLs*GILXlOA>PnaO>GovUL$q4}+(xpUXO@geCyJ8!vzW literal 0 HcmV?d00001 diff --git a/sprites/s_button_path_not_found_icon/layers/4c48d545-4c8c-473a-aa04-e59a8b268e37/e30d06ac-12cf-4f59-8b5a-c063d94a20ee.png b/sprites/s_button_path_not_found_icon/layers/4c48d545-4c8c-473a-aa04-e59a8b268e37/e30d06ac-12cf-4f59-8b5a-c063d94a20ee.png deleted file mode 100644 index e6c6180cb38b88319c9c7a98e6398b84c298bc3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 667 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gj3dtTpz6=aiY77hwEes65fI|H*Yfq}8l)5S5wl|mpIHTQJi|D9|n5LhjJl>Nio zbyvF{wA9&ecv&Hw?Ah3%a?@7Malbrcw9nJM(Lb5CmAz$TdaR)T((kxO-^Ynh>X;@^ zyR$RMV6If)Dj%UMJDWEoWp3S5{d&oY@C%#X{Mml@wKB)sl)b#OdnX!ySh}Kn=8V&m zYBe_;3-Rf@ddhw7E*8V1iPx9jn#q{P(!+f%iB+`j#S|s$wDr838vpg&KCnc{(X@-x zb5r&d`C4nvc5#nuN?DOFTUUMNnDc#sn2&$Ulc`ggyvsvu+zOcM7{7 zYKdz^NlIc#s#S7PDv)9@GB7gHH89sTGz&4XumU0@Lu~^CD+7b%P0oHO8glbfGSez? qYY=+>`x8)u2Hb{{%-q!ClEmBs+f>VeoYIb6Mw<&;$S&Z2^n` diff --git a/sprites/s_button_path_not_found_icon/layers/d3a9673c-7967-4742-b77f-93e195f29a76/310317f2-aaaf-4f2b-b9eb-5196013ab263.png b/sprites/s_button_path_not_found_icon/layers/d3a9673c-7967-4742-b77f-93e195f29a76/310317f2-aaaf-4f2b-b9eb-5196013ab263.png new file mode 100644 index 0000000000000000000000000000000000000000..6800153bade40d8c58403c109456492c45ccf665 GIT binary patch literal 756 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gj3dtTpz6=aiY77hwEes65fI|H*Yfr0V4r;B5V$MLsQ&wEQd ziX6AsJ|-W)FLu;c%8Og_Qd|%FTTj6|-Uprex3;fXkiM|KWxLaRQ5ALnu8P9{jmHEQ zE3|TM5kGqRnnQHehAA`Fw9oWS3!hw~eDBYp18=I0-*0~Zc6MY%2z%sOnV>5F1`~sX z8QBhj9KYkQGidHre4xDH)+5$B25zSttv47nZMko-idnt+&AmtX(7k@{8BCwrUTS~1 zTv5l$^SV;@2U85=@&n5RzJ2#=D19)w?vB`@I{Ay`txhN{MPr*byN$P7R6f=-jn>eX`ks;b`TQ^_k zDkxd)@{1w0@%)O@XRgd)o8o-!W1)xI;)ALMJRj>U>RUGW_n3v=?C;acUn-Qdmu;EO zb=|G3TY`5tv!ygYh-EfeB7e2ZF@0*o;}@YHAM9e}m@`fO`0BZ$z(k;0;u=wsl30>z zm0Xkxq!^40j7)S5EOiZyLkvu;3{9;JEwv2{tPBk1+2|ZZ(U6;;l9^VCTf_UrDYZZi i8gLs*GILXlOA>PnaO>GovUL$q4}+(xpUXO@geCyJ8!vzW literal 0 HcmV?d00001 diff --git a/sprites/s_button_path_not_found_icon/s_button_path_not_found_icon.yy b/sprites/s_button_path_not_found_icon/s_button_path_not_found_icon.yy index d1daf73c2..eb63ca6ea 100644 --- a/sprites/s_button_path_not_found_icon/s_button_path_not_found_icon.yy +++ b/sprites/s_button_path_not_found_icon/s_button_path_not_found_icon.yy @@ -3,8 +3,8 @@ "%Name":"s_button_path_not_found_icon", "bboxMode":0, "bbox_bottom":22, - "bbox_left":2, - "bbox_right":23, + "bbox_left":3, + "bbox_right":22, "bbox_top":3, "collisionKind":1, "collisionTolerance":0, @@ -12,14 +12,14 @@ "edgeFiltering":false, "For3D":false, "frames":[ - {"$GMSpriteFrame":"","%Name":"4c48d545-4c8c-473a-aa04-e59a8b268e37","name":"4c48d545-4c8c-473a-aa04-e59a8b268e37","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"d3a9673c-7967-4742-b77f-93e195f29a76","name":"d3a9673c-7967-4742-b77f-93e195f29a76","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, ], "gridX":0, "gridY":0, "height":24, "HTile":false, "layers":[ - {"$GMImageLayer":"","%Name":"e30d06ac-12cf-4f59-8b5a-c063d94a20ee","blendMode":0,"displayName":"default","isLocked":false,"name":"e30d06ac-12cf-4f59-8b5a-c063d94a20ee","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, + {"$GMImageLayer":"","%Name":"310317f2-aaaf-4f2b-b9eb-5196013ab263","blendMode":0,"displayName":"default","isLocked":false,"name":"310317f2-aaaf-4f2b-b9eb-5196013ab263","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, ], "name":"s_button_path_not_found_icon", "nineSlice":null, @@ -69,8 +69,8 @@ "tracks":[ {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ {"$Keyframe":"","Channels":{ - "0":{"$SpriteFrameKeyframe":"","Id":{"name":"4c48d545-4c8c-473a-aa04-e59a8b268e37","path":"sprites/s_button_path_not_found_icon/s_button_path_not_found_icon.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, - },"Disabled":false,"id":"938a95ce-a2aa-4f04-9677-cfce91fc0dbe","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"d3a9673c-7967-4742-b77f-93e195f29a76","path":"sprites/s_button_path_not_found_icon/s_button_path_not_found_icon.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"1f0e3f87-5581-4851-9faa-5998706accad","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], "visibleRange":null,