From 2e685d901672bbdd3ff668cf222ccc529e93bdf2 Mon Sep 17 00:00:00 2001 From: Tanasart Date: Mon, 19 Aug 2024 11:16:12 +0700 Subject: [PATCH] p3 --- .../Obj_FirebaseFirestore_Document_Set.yy | 4 +- objects/o_dialog_menubox/o_dialog_menubox.yy | 8 +- objects/o_main/Other_2.gml | 3 +- .../contextMenu_controller.gml | 6 +- .../function_register/function_register.gml | 5 +- scripts/globals/globals.gml | 6 +- scripts/hotkey_data/hotkey_data.gml | 1 - .../node_palette_extract.gml | 152 +++++++++--------- scripts/node_registry/node_registry.gml | 2 +- scripts/node_value/node_value.gml | 4 +- scripts/preferences/preferences.gml | 4 - 11 files changed, 93 insertions(+), 102 deletions(-) diff --git a/objects/Obj_FirebaseFirestore_Document_Set/Obj_FirebaseFirestore_Document_Set.yy b/objects/Obj_FirebaseFirestore_Document_Set/Obj_FirebaseFirestore_Document_Set.yy index 3b0824cb6..914de4527 100644 --- a/objects/Obj_FirebaseFirestore_Document_Set/Obj_FirebaseFirestore_Document_Set.yy +++ b/objects/Obj_FirebaseFirestore_Document_Set/Obj_FirebaseFirestore_Document_Set.yy @@ -2,8 +2,8 @@ "$GMObject":"", "%Name":"Obj_FirebaseFirestore_Document_Set", "eventList":[ - {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":7,"eventType":6,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, - {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, + {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":7,"eventType":6,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, + {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, ], "managed":true, "name":"Obj_FirebaseFirestore_Document_Set", diff --git a/objects/o_dialog_menubox/o_dialog_menubox.yy b/objects/o_dialog_menubox/o_dialog_menubox.yy index 49a445f6a..783b8bf8b 100644 --- a/objects/o_dialog_menubox/o_dialog_menubox.yy +++ b/objects/o_dialog_menubox/o_dialog_menubox.yy @@ -2,10 +2,10 @@ "$GMObject":"", "%Name":"o_dialog_menubox", "eventList":[ - {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, - {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":1,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, - {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":3,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, - {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, + {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, + {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":1,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, + {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":3,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, + {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, ], "managed":true, "name":"o_dialog_menubox", diff --git a/objects/o_main/Other_2.gml b/objects/o_main/Other_2.gml index 5b4b9c862..4398c0216 100644 --- a/objects/o_main/Other_2.gml +++ b/objects/o_main/Other_2.gml @@ -55,8 +55,9 @@ #region Set up var t = current_time; - if(!IS_CMD) { __initHotKey(); log_message("SESSION", $"> init Hotkeys | complete in {get_timer() - t}"); t = get_timer(); } PREF_LOAD(); log_message("SESSION", $"> init Preferences | complete in {get_timer() - t}"); t = get_timer(); + 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); diff --git a/scripts/contextMenu_controller/contextMenu_controller.gml b/scripts/contextMenu_controller/contextMenu_controller.gml index d73f9e3e6..23a4fba3c 100644 --- a/scripts/contextMenu_controller/contextMenu_controller.gml +++ b/scripts/contextMenu_controller/contextMenu_controller.gml @@ -61,10 +61,10 @@ function fileNameCall(path, onModify, _x = mouse_mx + 8, _y = mouse_my + 8) { return dia; } -function menuItem( name, func, spr = noone, hotkey = noone, toggle = noone, params = {}) { return new MenuItem(name, func, spr, hotkey, toggle, params); } -function menuItemShelf(name, func, spr = noone, hotkey = noone, toggle = noone, params = {}) { return new MenuItem(name, func, spr, hotkey, toggle, params).setIsShelf(); } +function menuItem( name, func, spr = noone, hotkey = noone, toggle = noone, params = noone) { return new MenuItem(name, func, spr, hotkey, toggle, params); } +function menuItemShelf(name, func, spr = noone, hotkey = noone, toggle = noone, params = noone) { return new MenuItem(name, func, spr, hotkey, toggle, params).setIsShelf(); } -function MenuItem(_name, _func, _spr = noone, _hotkey = noone, _toggle = noone, _params = {}) constructor { +function MenuItem(_name, _func, _spr = noone, _hotkey = noone, _toggle = noone, _params = noone) constructor { active = true; name = _name; func = _func; diff --git a/scripts/function_register/function_register.gml b/scripts/function_register/function_register.gml index fcd4a90d3..f2bf7d2d2 100644 --- a/scripts/function_register/function_register.gml +++ b/scripts/function_register/function_register.gml @@ -1,5 +1,5 @@ #region macros - gml_pragma("global", "__fnInit()"); + // gml_pragma("global", "__fnInit()"); #macro ARG new __fnArgument #macro CALL _args = []; for(i = 0; i < argument_count; i++) _args[i] = argument[i]; callStatusFunction @@ -10,8 +10,9 @@ self.fn = fn; } + globalvar CMD_FUNCTIONS, MENU_ITEMS, FUNCTIONS, RECENT_COMMANDS; + function __fnInit() { - globalvar CMD_FUNCTIONS, MENU_ITEMS, FUNCTIONS, RECENT_COMMANDS; FUNCTIONS = {}; CMD_FUNCTIONS = {}; diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index 796a30edb..ccc4dca77 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -37,10 +37,10 @@ globalvar HOTKEYS, HOTKEY_CONTEXT; LATEST_VERSION = 1_16_00_0; - VERSION = 1_17_10_2; + VERSION = 1_17_10_3; SAVE_VERSION = 1_17_10_0; - VERSION_STRING = "1.17.10.2"; - BUILD_NUMBER = 1_17_10_2; + VERSION_STRING = "1.17.10.3"; + BUILD_NUMBER = 1_17_10_3; HOTKEYS = ds_map_create(); HOTKEY_CONTEXT = ds_list_create(); diff --git a/scripts/hotkey_data/hotkey_data.gml b/scripts/hotkey_data/hotkey_data.gml index 5d08761aa..d991b8beb 100644 --- a/scripts/hotkey_data/hotkey_data.gml +++ b/scripts/hotkey_data/hotkey_data.gml @@ -236,7 +236,6 @@ function hotkey_draw(keyStr, _x, _y, _status = 0) { } function hotkey_serialize() { - var _context = []; for(var i = 0, n = ds_list_size(HOTKEY_CONTEXT); i < n; i++) { var ll = HOTKEYS[? HOTKEY_CONTEXT[| i]]; diff --git a/scripts/node_palette_extract/node_palette_extract.gml b/scripts/node_palette_extract/node_palette_extract.gml index 536d731d2..d9cc22580 100644 --- a/scripts/node_palette_extract/node_palette_extract.gml +++ b/scripts/node_palette_extract/node_palette_extract.gml @@ -32,7 +32,7 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ attribute_surface_depth(); - function sortPalette(pal) { #region + function sortPalette(pal) { array_sort(pal, function(c0, c1) { var r0 = _color_get_red(c0); var r1 = _color_get_red(c1); @@ -59,9 +59,9 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ return s0 * v0 > s1 * v1; }) - } #endregion + } - function extractKmean(_surfFull, _size, _seed) { #region + function extractKmean(_surfFull, _size, _seed) { var _space = getInputData(4); var _surf = surface_create_valid(min(32, surface_get_width_safe(_surfFull)), min(32, surface_get_height_safe(_surfFull)), attrDepth()); _size = max(1, _size); @@ -74,7 +74,7 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ surface_reset_shader(); var c_buffer = buffer_create(ww * hh * 4, buffer_fixed, 2); - var colors = []; + var colors = []; buffer_get_surface(c_buffer, _surf, 0); buffer_seek(c_buffer, buffer_seek_start, 0); @@ -90,41 +90,35 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ if(a == 0) continue; switch(_space) { - case 0 : col = [ _color_get_red(c), _color_get_green(c), _color_get_blue(c), 0 ]; break; + case 0 : col = [ _color_get_red(c), _color_get_green(c), _color_get_blue(c), 0 ]; break; case 1 : col = [ _color_get_hue(c), _color_get_saturation(c), _color_get_value(c), 0 ]; break; case 2 : col = [ _color_get_hue(c), _color_get_saturation(c), _color_get_value(c), 0 ]; break; } array_push(colors, col); - for( var j = 0; j < 3; j++ ) { - _min[j] = min(_min[j], col[j]); - _max[j] = max(_max[j], col[j]); - } + + _min[0] = min(_min[0], col[0]); _max[0] = max(_max[0], col[0]); + _min[1] = min(_min[1], col[1]); _max[1] = max(_max[1], col[1]); + _min[2] = min(_min[2], col[2]); _max[2] = max(_max[2], col[2]); } buffer_delete(c_buffer); - var cnt = []; random_set_seed(_seed); - for( var i = 0; i < _size; i++ ) - cnt[i] = [ random(1), random(1), random(1), 0 ]; - + cnt = array_create_ext(_size, function() /*=>*/ {return [ random(1), random(1), random(1), 0 ]}); + repeat(8) { - var _cnt = []; - for( var i = 0; i < _size; i++ ) { - _cnt[i][0] = cnt[i][0]; - _cnt[i][1] = cnt[i][1]; - _cnt[i][2] = cnt[i][2]; - } + // var _cnt = array_create_ext(_size, (i) => [ cnt[i][0], cnt[i][1], cnt[i][2], 0 ]); for( var i = 0, n = array_length(colors); i < n; i++ ) { - var ind = 0; + var ind = 0; var dist = 999; - var _cl = colors[i]; + var _cl = colors[i]; for( var j = 0; j < _size; j++ ) { var _cn = cnt[j]; - var d = point_distance_3d(_cl[0], _cl[1], _cl[2], _cn[0], _cn[1], _cn[2]); + var d = point_distance_3d(_cl[0], _cl[1], _cl[2], _cn[0], _cn[1], _cn[2]); + if(d < dist) { dist = d; ind = j; @@ -139,24 +133,23 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ for( var i = 0, n = array_length(colors); i < n; i++ ) { var _cl = colors[i]; - cnt[_cl[3]][0] += _cl[0]; - cnt[_cl[3]][1] += _cl[1]; - cnt[_cl[3]][2] += _cl[2]; - cnt[_cl[3]][3]++; + var _co = _cl[3]; + + cnt[_co][0] += _cl[0]; + cnt[_co][1] += _cl[1]; + cnt[_co][2] += _cl[2]; + cnt[_co][3]++; } for( var i = 0; i < _size; i++ ) { - cnt[i][0] = cnt[i][3]? cnt[i][0] / cnt[i][3] : 0; - cnt[i][1] = cnt[i][3]? cnt[i][1] / cnt[i][3] : 0; - cnt[i][2] = cnt[i][3]? cnt[i][2] / cnt[i][3] : 0; + var _cc = cnt[i]; + cnt[i][0] = _cc[3]? _cc[0] / _cc[3] : 0; + cnt[i][1] = _cc[3]? _cc[1] / _cc[3] : 0; + cnt[i][2] = _cc[3]? _cc[2] / _cc[3] : 0; } - var del = 0; - for( var i = 0; i < _size; i++ ) { - del = max(del, point_distance_3d(cnt[i][0], cnt[i][1], cnt[i][2], _cnt[i][0], _cnt[i][1], _cnt[i][2])); - } - - if(del < 0.001) break; + // var del = array_reduce(cnt, (prev, cur, i) => max(prev, point_distance_3d(cnt[i][0], cnt[i][1], cnt[i][2], cur[0], cur[1], cur[2])), 0); + // if(del < 0.001) break; } var palette = []; @@ -164,23 +157,25 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ for( var i = 0; i < _size; i++ ) { var closet = 0; - var dist = 999; - var _cl = cnt[i]; + var dist = 999; + var _cl = cnt[i]; - for( var j = 0; j < array_length(colors); j++ ) { + for( var j = 0, n = array_length(colors); j < n; j++ ) { var _cn = colors[j]; - var d = point_distance_3d(_cl[0], _cl[1], _cl[2], _cn[0], _cn[1], _cn[2]); + var d = point_distance_3d(_cl[0], _cl[1], _cl[2], _cn[0], _cn[1], _cn[2]); if(d < dist) { - dist = d; + dist = d; closet = j; } } + var _cc = colors[closet]; + switch(_space) { - case 0 : clr = make_color_rgb(colors[closet][0] * 255, colors[closet][1] * 255, colors[closet][2] * 255); break; - case 1 : clr = make_color_hsv(colors[closet][0] * 255, colors[closet][1] * 255, colors[closet][2] * 255); break; - case 2 : clr = make_color_hsv(colors[closet][0] * 255, colors[closet][1] * 255, colors[closet][2] * 255); break; + case 0 : clr = make_color_rgba(_cc[0] * 255, _cc[1] * 255, _cc[2] * 255, 255); break; + case 1 : clr = make_color_hsva(_cc[0] * 255, _cc[1] * 255, _cc[2] * 255, 255); break; + case 2 : clr = make_color_hsva(_cc[0] * 255, _cc[1] * 255, _cc[2] * 255, 255); break; } array_push_unique(palette, clr); @@ -190,9 +185,9 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ sortPalette(palette); return palette; - } #endregion + } - function extractAll(_surfFull) { #region + function extractAll(_surfFull) { var ww = surface_get_width_safe(_surfFull); var hh = surface_get_height_safe(_surfFull); @@ -205,19 +200,20 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ for( var i = 0; i < ww * hh; i++ ) { var b = buffer_read(c_buffer, buffer_u32); - var c = b & ~(0b11111111 << 24); + var c = b; var a = b & (0b11111111 << 24); if(a == 0) continue; - c = make_color_rgb(color_get_red(c), color_get_green(c), color_get_blue(c)); + + c = make_color_rgba(color_get_red(c), color_get_green(c), color_get_blue(c), color_get_alpha(c)); if(!array_exists(palette, c)) array_push(palette, c); } buffer_delete(c_buffer); return palette; - } #endregion + } - function extractFrequence(_surfFull, _size) { #region + function extractFrequence(_surfFull, _size) { var msize = 128; var _surf = surface_create_valid(min(msize, surface_get_width_safe(_surfFull)), min(msize, surface_get_height_safe(_surfFull))); _size = max(1, _size); @@ -226,10 +222,10 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ var hh = surface_get_height_safe(_surf); surface_set_target(_surf); - DRAW_CLEAR - BLEND_OVERRIDE; - draw_surface_stretched_safe(_surfFull, 0, 0, ww, hh); - BLEND_NORMAL; + DRAW_CLEAR + BLEND_OVERRIDE + draw_surface_stretched_safe(_surfFull, 0, 0, ww, hh); + BLEND_NORMAL surface_reset_target(); var c_buffer = buffer_create(ww * hh * 4, buffer_fixed, 2); @@ -238,51 +234,49 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ buffer_get_surface(c_buffer, _surf, 0); buffer_seek(c_buffer, buffer_seek_start, 0); - var palette = []; - var clrs = ds_map_create(); for( var i = 0; i < ww * hh; i++ ) { var b = buffer_read(c_buffer, buffer_u32); - var c = b & ~(0b11111111 << 24); - var a = b & (0b11111111 << 24); + var c = b; + var a = b & (0b_1111_1111 << 24) >> 24; if(a == 0) continue; - c = make_color_rgb(color_get_red(c), color_get_green(c), color_get_blue(c)); - if(ds_map_exists(clrs, c)) - clrs[? c]++; - else - clrs[? c] = 0; + + c = make_color_rgba(color_get_red(c), color_get_green(c), color_get_blue(c), color_get_alpha(c)); + + if(ds_map_exists(clrs, c)) clrs[? c].amount++; + else clrs[? c] = { color: c, amount: 1 }; } buffer_delete(c_buffer); - var pr = ds_priority_create(); + var pr = ds_priority_create(); + var k = ds_map_find_first(clrs); var amo = ds_map_size(clrs); - var k = ds_map_find_first(clrs); repeat(amo) { - ds_priority_add(pr, k, clrs[? k]); + ds_priority_add(pr, clrs[? k].color, clrs[? k].amount); k = ds_map_find_next(clrs, k); } - for( var i = 0; i < _size; i++ ) { - if(ds_priority_empty(pr)) break; - array_push(palette, ds_priority_delete_max(pr)); - } + var amo = min(_size, ds_priority_size(pr)); + var pal = array_create(amo), ind = 0; + repeat(amo) { pal[ind++] = ds_priority_delete_max(pr); } ds_priority_destroy(pr); ds_map_destroy(clrs); - return palette; - } #endregion + + return pal; + } - static step = function() { #region + static step = function() { var _algo = getInputData(3); inputs[1].setVisible(_algo != 2); inputs[2].setVisible(_algo == 0); inputs[4].setVisible(_algo == 0); - } #endregion + } - static extractPalette = function(_surf, _algo, _size, _seed) { #region + static extractPalette = function(_surf, _algo, _size, _seed) { if(!is_surface(_surf)) return []; switch(_algo) { @@ -292,18 +286,18 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ } return []; - } #endregion + } - static processData = function(_outSurf, _data, _output_index, _array_index) { #region + static processData = function(_outSurf, _data, _output_index, _array_index) { var _surf = _data[0]; var _size = _data[1]; var _seed = _data[2]; var _algo = _data[3]; return extractPalette(_surf, _algo, _size, _seed); - } #endregion + } - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); if(bbox.h < 1) return; @@ -322,5 +316,5 @@ function Node_Palette_Extract(_x, _y, _group = noone) : Node_Processor(_x, _y, _ if(_h != min_h) will_setHeight = true; min_h = _h; - } #endregion + } } \ No newline at end of file diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index d26e0cdff..64c926aaa 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -624,7 +624,7 @@ function __initNodes() { addNodeObject(filter, "Local Analyze", s_node_local_analyze, "Node_Local_Analyze", [1, Node_Local_Analyze],, "Apply non-linear operation (minimum, maximum) on each pixel locally.").setVersion(1110); addNodeObject(filter, "SDF", s_node_sdf, "Node_SDF", [1, Node_SDF],, "Create signed distance field using jump flooding algorithm.").setVersion(1130); addNodeObject(filter, "Replace Image", s_node_image_replace, "Node_Surface_Replace", [1, Node_Surface_Replace], ["image replace"], "Replace instances of an image with a new one.").setVersion(1140); - addNodeObject(filter, "Chromatic Aberration", s_node_chromatic_abarration, "Node_Chromatic_Aberration", [1, Node_Chromatic_Aberration],, "Apply chromatic aberration effect to the image."); + addNodeObject(filter, "Chromatic Aberration",s_node_chromatic_abarration, "Node_Chromatic_Aberration", [1, Node_Chromatic_Aberration],, "Apply chromatic aberration effect to the image."); addNodeObject(filter, "Vignette", s_node_vignette, "Node_Vignette", [1, Node_Vignette],, "Apply vignette effect to the border.").setVersion(11630); addNodeObject(filter, "FXAA", s_node_FXAA, "Node_FXAA", [1, Node_FXAA],, "Apply fast approximate anti-aliasing to te image."); addNodeObject(filter, "JPEG", s_node_JPEG, "Node_JPEG", [1, Node_JPEG],, "Apply JPEG compression to the image.").setVersion(11730); diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index c5d98c7e3..a19308e8b 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -1359,8 +1359,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru static unitConvert = function(mode) { var _v = animator.values; - for( var i = 0; i < ds_list_size(_v); i++ ) - _v[| i].value = unit.convertUnit(_v[| i].value, mode); + for( var i = 0; i < array_length(_v); i++ ) + _v[i].value = unit.convertUnit(_v[i].value, mode); } static isDynamicArray = function() { diff --git a/scripts/preferences/preferences.gml b/scripts/preferences/preferences.gml index 14621444c..d593089e2 100644 --- a/scripts/preferences/preferences.gml +++ b/scripts/preferences/preferences.gml @@ -252,7 +252,6 @@ json_save_struct(DIRECTORY + "keys.json", PREFERENCES); json_save_struct(DIRECTORY + "Nodes/fav.json", global.FAV_NODES); json_save_struct(DIRECTORY + "Nodes/recent.json", global.RECENT_NODES); - json_save_struct(DIRECTORY + "key_nodes.json", HOTKEYS_CUSTOM); json_save_struct(DIRECTORY + "default_project.json", PROJECT_ATTRIBUTES); hotkey_serialize(); @@ -269,9 +268,6 @@ if(!directory_exists($"{DIRECTORY}Themes/{PREFERENCES.theme}")) PREFERENCES.theme = "default"; - var f = json_load_struct(DIRECTORY + "key_nodes.json"); - struct_override_nested(HOTKEYS_CUSTOM, f); - LOCALE_DEF = PREFERENCES.local == "en"; THEME_DEF = PREFERENCES.theme == "default"; FONT_DEF = PREFERENCES.theme == "default" && PREFERENCES.local == "en" && PREFERENCES.display_scaling == 1;