diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index 157aadcf4..b77d5c062 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -47,6 +47,7 @@ {"name":"importers","order":6,"path":"folders/functions/importers.yy",}, {"name":"inputs","order":7,"path":"folders/functions/inputs.yy",}, {"name":"lua","order":24,"path":"folders/functions/lua.yy",}, + {"name":"nodes","order":34,"path":"folders/functions/nodes.yy",}, {"name":"packing","order":32,"path":"folders/functions/packing.yy",}, {"name":"physics","order":21,"path":"folders/functions/physics.yy",}, {"name":"shader","order":16,"path":"folders/functions/shader.yy",}, @@ -884,7 +885,7 @@ {"name":"o_dialog_preview_window","order":1,"path":"objects/o_dialog_preview_window/o_dialog_preview_window.yy",}, {"name":"s_node_sampler","order":11,"path":"sprites/s_node_sampler/s_node_sampler.yy",}, {"name":"__background_get_element","order":1,"path":"scripts/__background_get_element/__background_get_element.yy",}, - {"name":"window_functions","order":27,"path":"scripts/window_functions/window_functions.yy",}, + {"name":"window_functions","order":2,"path":"scripts/window_functions/window_functions.yy",}, {"name":"node_mesh_create_path","order":1,"path":"scripts/node_mesh_create_path/node_mesh_create_path.yy",}, {"name":"sh_fd_calculate_pressure_srj_glsl","order":9,"path":"shaders/sh_fd_calculate_pressure_srj_glsl/sh_fd_calculate_pressure_srj_glsl.yy",}, {"name":"curve_bounce_function","order":1,"path":"scripts/curve_bounce_function/curve_bounce_function.yy",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index 3eafe84e0..58507ff6a 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -70,6 +70,7 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"inputs","folderPath":"folders/functions/inputs.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"lua","folderPath":"folders/functions/lua.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"migration","folderPath":"folders/functions/migration.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"nodes","folderPath":"folders/functions/nodes.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"packing","folderPath":"folders/functions/packing.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"physics","folderPath":"folders/functions/physics.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"shader","folderPath":"folders/functions/shader.yy",}, @@ -188,6 +189,7 @@ ], "IncludedFiles": [ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ApolloHelp.html","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":-1,"filePath":"datafiles",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Addons.zip","CopyToMask":-1,"filePath":"datafiles/data",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Assets.zip","CopyToMask":-1,"filePath":"datafiles/data",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Collections.zip","CopyToMask":-1,"filePath":"datafiles/data",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Guides.zip","CopyToMask":-1,"filePath":"datafiles/data",}, @@ -632,12 +634,15 @@ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_youtube.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphics x2.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_area_strip2.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, - {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_obj_halign_strip3.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_obj_halign.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_obj_valign.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_padding.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_surface_halign.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_surface_valign.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_text_halign_strip3.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_text_valign_strip3.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_obj_distribute_h.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_obj_distribute_v.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_prop_area_type.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_prop_gradient_strip2.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_prop_keyframe_strip3.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",}, @@ -1355,6 +1360,7 @@ {"id":{"name":"s_node_radial","path":"sprites/s_node_radial/s_node_radial.yy",},}, {"id":{"name":"s_node_grid","path":"sprites/s_node_grid/s_node_grid.yy",},}, {"id":{"name":"node_trigger","path":"scripts/node_trigger/node_trigger.yy",},}, + {"id":{"name":"node_align_functions","path":"scripts/node_align_functions/node_align_functions.yy",},}, {"id":{"name":"node_perlin","path":"scripts/node_perlin/node_perlin.yy",},}, {"id":{"name":"node_blur_simple","path":"scripts/node_blur_simple/node_blur_simple.yy",},}, {"id":{"name":"node_feedback_input","path":"scripts/node_feedback_input/node_feedback_input.yy",},}, diff --git a/datafiles/data/Addons.zip b/datafiles/data/Addons.zip new file mode 100644 index 000000000..868773fcd Binary files /dev/null and b/datafiles/data/Addons.zip differ diff --git a/datafiles/data/themes/default.zip b/datafiles/data/themes/default.zip index d5854beba..4b53129a8 100644 Binary files a/datafiles/data/themes/default.zip and b/datafiles/data/themes/default.zip differ diff --git a/objects/o_main/Draw_64.gml b/objects/o_main/Draw_64.gml index 3416f494f..6aac9b91d 100644 --- a/objects/o_main/Draw_64.gml +++ b/objects/o_main/Draw_64.gml @@ -27,9 +27,9 @@ if(OS == os_windows && gameframe_is_minimized()) { if(PANEL_MAIN == 0) resetPanel(); var surf = surface_get_target(); - try + try { PANEL_MAIN.draw(); - catch(e) { + } catch(e) { while(surface_get_target() != surf) surface_reset_target(); diff --git a/objects/o_main/Step_0.gml b/objects/o_main/Step_0.gml index c3686c670..dd703a6cf 100644 --- a/objects/o_main/Step_0.gml +++ b/objects/o_main/Step_0.gml @@ -24,11 +24,11 @@ if(OS == os_windows && gameframe_is_minimized()) exit; if(PANEL_MAIN != 0) PANEL_MAIN.step(); - for(var i = 0; i < ds_list_size(NODES); i++) { + for(var i = 0; i < ds_list_size(NODES); i++) NODES[| i].step(); - } - } catch(e) + } catch(e) { noti_warning("Step error: " + exception_print(e)); + } #endregion #region hotkey diff --git a/objects/o_main/Step_1.gml b/objects/o_main/Step_1.gml index 327832144..a67907d8b 100644 --- a/objects/o_main/Step_1.gml +++ b/objects/o_main/Step_1.gml @@ -65,10 +65,8 @@ _HOVERING_ELEMENT = noone; string_lead_zero(current_minute, 2) + string_lead_zero(current_second, 2) + ".pxc"; - try - SAVE_AT(loc + fname, "Autosaved "); - catch(e) - print(exception_print(e)); + try { SAVE_AT(loc + fname, "Autosaved "); } + catch(e) { print(exception_print(e)); } } #endregion diff --git a/scripts/Tweener/Tweener.gml b/scripts/Tweener/Tweener.gml index f2c02e846..2ab315f4e 100644 --- a/scripts/Tweener/Tweener.gml +++ b/scripts/Tweener/Tweener.gml @@ -27,7 +27,8 @@ function Tween(value, valType = TWEEN_VALUE.number, twType = TWEEN_TYPE.log, twS realVal = value; } - static get = function(value) { + + static get = function() { if(valType == TWEEN_VALUE.color) return colTrans == 1? realVal : merge_color(showVal, realVal, colTrans); else diff --git a/scripts/_3D/_3D.gml b/scripts/_3D/_3D.gml index 3e13499e8..426842ab8 100644 --- a/scripts/_3D/_3D.gml +++ b/scripts/_3D/_3D.gml @@ -82,9 +82,9 @@ enum CAMERA_PROJ { return ind; } - static addFace = function(v1, n1 = [0, 0, 0], t1 = [0, 0], - v2, n2 = [0, 0, 0], t2 = [0, 0], - v3, n3 = [0, 0, 0], t3 = [0, 0], _merge = false) { + static addFace = function(v1 = [0, 0, 0], n1 = [0, 0, 0], t1 = [0, 0], + v2 = [0, 0, 0], n2 = [0, 0, 0], t2 = [0, 0], + v3 = [0, 0, 0], n3 = [0, 0, 0], t3 = [0, 0], _merge = false) { var pi0 = addPosition(v1, _merge); var pi1 = addPosition(v2, _merge); var pi2 = addPosition(v3, _merge); diff --git a/scripts/__initAddon/__initAddon.gml b/scripts/__initAddon/__initAddon.gml index 10dbfbe58..221b2753f 100644 --- a/scripts/__initAddon/__initAddon.gml +++ b/scripts/__initAddon/__initAddon.gml @@ -1,3 +1,15 @@ +function __addonDefault(root) { + var _l = root + "/version"; + if(file_exists(_l)) { + var res = json_load_struct(_l); + if(res.version == BUILD_NUMBER) return; + } + json_save_struct(_l, { version: BUILD_NUMBER }); + + log_message("THEME", "unzipping default addon to DIRECTORY."); + zip_unzip("data/Addons.zip", root); +} + function __initAddon() { var dirPath = DIRECTORY + "Addons"; globalvar ADDONS, ADDONS_ON_START; @@ -9,6 +21,8 @@ function __initAddon() { return; } + __addonDefault(dirPath); + var f = file_find_first(dirPath + "\\*", fa_directory); var _f = ""; diff --git a/scripts/addon_lua/addon_lua.gml b/scripts/addon_lua/addon_lua.gml index 562934116..ec07d5d4f 100644 --- a/scripts/addon_lua/addon_lua.gml +++ b/scripts/addon_lua/addon_lua.gml @@ -643,6 +643,13 @@ [ "matrix_stack_push", matrix_stack_push ], [ "matrix_stack_pop", matrix_stack_pop ], [ "matrix_stack_top", matrix_stack_top ], + + [ "point_in_rectangle", point_in_rectangle ], + [ "point_in_triangle", point_in_triangle ], + [ "point_in_circle", point_in_circle ], + [ "rectangle_in_rectangle", rectangle_in_rectangle ], + [ "rectangle_in_triangle", rectangle_in_triangle ], + [ "rectangle_in_circle", rectangle_in_circle ], //file [ "file_exists", file_exists ], @@ -828,7 +835,17 @@ return node.outputMap[? input].getValue(); }], - [ "element_get", function() { return HOVERING_ELEMENT; }], + [ "element_get", function() { + if(HOVERING_ELEMENT == noone) + return undefined; + + var ele = HOVERING_ELEMENT; + for( var i = 0; i < argument_count; i++ ) { + if(!struct_has(ele, argument[i])) return undefined; + ele = ele[$ argument[i]]; + } + return ele; + }], [ "__panel_create", function(ID, panel = "") { var _addon = noone; diff --git a/scripts/addon_lua_constant/addon_lua_constant.gml b/scripts/addon_lua_constant/addon_lua_constant.gml index a5fc9690f..dbe40ffbf 100644 --- a/scripts/addon_lua_constant/addon_lua_constant.gml +++ b/scripts/addon_lua_constant/addon_lua_constant.gml @@ -144,6 +144,7 @@ function __addon_lua_setup_constants(lua, context) { function __addon_lua_panel_variable(lua, panel) { lua_add_code(lua, "Panel.mouse = {" + string(panel.mx) + ", " + string(panel.my) + "}\n" + + "Panel.mouseUI = {" + string(mouse_mx) + ", " + string(mouse_my) + "}\n" + "Panel.x = " + string(panel.x ) + "\n" + "Panel.y = " + string(panel.y ) + "\n" + "Panel.w = " + string(panel.w ) + "\n" + diff --git a/scripts/json_functions/json_functions.gml b/scripts/json_functions/json_functions.gml index 487b9c48f..9f7a848f2 100644 --- a/scripts/json_functions/json_functions.gml +++ b/scripts/json_functions/json_functions.gml @@ -1,8 +1,9 @@ function json_try_parse(text, def = noone) { - try + try { return json_parse(text); - catch(e) + } catch(e) { return def; + } return def; } \ No newline at end of file diff --git a/scripts/json_prettify/json_prettify.gml b/scripts/json_prettify/json_prettify.gml index 72d88a5e6..c08cc7100 100644 --- a/scripts/json_prettify/json_prettify.gml +++ b/scripts/json_prettify/json_prettify.gml @@ -8,20 +8,17 @@ global.g_json_beautify_rb = buffer_create(1024, buffer_grow, 1); "); function buffer_write_slice(buffer, data_buffer, data_start, data_end) { - var start = argument2; - var next = argument3 - start; + var next = data_end - data_start; if (next <= 0) exit; - var buf = argument0; - var data = argument1; - var size = buffer_get_size(buf); - var pos = buffer_tell(buf); + var size = buffer_get_size(buffer); + var pos = buffer_tell(buffer); var need = pos + next; if (size < need) { do size *= 2 until (size >= need); - buffer_resize(buf, size); + buffer_resize(buffer, size); } - buffer_copy(data, start, next, buf, pos); - buffer_seek(buf, buffer_seek_relative, next); + buffer_copy(data_buffer, data_start, next, buffer, pos); + buffer_seek(buffer, buffer_seek_relative, next); } function json_beautify(src) { diff --git a/scripts/lerp_float/lerp_float.gml b/scripts/lerp_float/lerp_float.gml index d7cc90cea..32cba2452 100644 --- a/scripts/lerp_float/lerp_float.gml +++ b/scripts/lerp_float/lerp_float.gml @@ -10,7 +10,7 @@ function lerp_float(from, to, speed) { if(abs(from - to) < pre) return to; else - return from + (to - from) * (1 - power(1 - 1 / speed, delta_time / 1000000 * room_speed)); + return from + (to - from) * (1 - power(1 - 1 / speed, delta_time / 1000000 * game_get_speed(gamespeed_fps))); } function lerp_linear(from, to, speed) { @@ -27,7 +27,7 @@ function lerp_angle_direct(from, to, speed) { function lerp_angle(from, to, speed) { if(fps < 15) return to; - return from + angle_difference(to, from) * (1 - power(1 - 1 / speed, delta_time / 1000000 * room_speed)); + return from + angle_difference(to, from) * (1 - power(1 - 1 / speed, delta_time / 1000000 * game_get_speed(gamespeed_fps))); } function lerp_angle_linear(from, to, speed) { diff --git a/scripts/mac_window_init/mac_window_init.gml b/scripts/mac_window_init/mac_window_init.gml index e3f43b191..3e49758a4 100644 --- a/scripts/mac_window_init/mac_window_init.gml +++ b/scripts/mac_window_init/mac_window_init.gml @@ -1,5 +1,5 @@ enum WINDOW_DRAG_MODE { - move = 1 << 0, + _move = 1 << 0, resize_n = 1 << 1, resize_e = 1 << 2, resize_s = 1 << 3, diff --git a/scripts/mac_window_step/mac_window_step.gml b/scripts/mac_window_step/mac_window_step.gml index ea7a39950..79ff7e12b 100644 --- a/scripts/mac_window_step/mac_window_step.gml +++ b/scripts/mac_window_step/mac_window_step.gml @@ -5,7 +5,7 @@ function mac_window_step() { var _my = mouse_raw_y; if(__win_is_dragging) { - if(__win_is_dragging == WINDOW_DRAG_MODE.move) + if(__win_is_dragging == WINDOW_DRAG_MODE._move) window_set_position(__win_drag_sx + (_mx - __win_drag_mx), __win_drag_sy + (_my - __win_drag_my)); else { if((__win_is_dragging & WINDOW_DRAG_MODE.resize_n) != 0) { @@ -30,7 +30,7 @@ function mac_window_step() { if(point_in_rectangle(mouse_mx, mouse_my, 6, 6, WIN_W - 6, ui(40))) { if(mouse_press(mb_left)) { - __win_is_dragging = WINDOW_DRAG_MODE.move; + __win_is_dragging = WINDOW_DRAG_MODE._move; __win_drag_mx = mouse_raw_x; __win_drag_my = mouse_raw_y; __win_drag_sx = window_get_x(); diff --git a/scripts/nodeValue_drawer/nodeValue_drawer.gml b/scripts/nodeValue_drawer/nodeValue_drawer.gml index 7eb361e7c..7188b1548 100644 --- a/scripts/nodeValue_drawer/nodeValue_drawer.gml +++ b/scripts/nodeValue_drawer/nodeValue_drawer.gml @@ -7,7 +7,7 @@ function drawWidgetInit() { lineBreak = true; } -function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover, _focus, _scrollPane, rx, ry) { +function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _focus = false, _scrollPane = noone, rx = 0, ry = 0) { var con_w = ww - ui(4); var xc = xx + ww / 2; diff --git a/scripts/node_align_functions/node_align_functions.gml b/scripts/node_align_functions/node_align_functions.gml new file mode 100644 index 000000000..9f08f2509 --- /dev/null +++ b/scripts/node_align_functions/node_align_functions.gml @@ -0,0 +1,111 @@ +function node_halign(nodeList, alignment = fa_center) { + var amo = ds_list_size(nodeList); + + switch(alignment) { + case fa_left: + var x0 = 999999; + for( var i = 0; i < amo; i++ ) + x0 = min(x0, nodeList[| i].x); + + for( var i = 0; i < amo; i++ ) + nodeList[| i].x = x0; + break; + case fa_center: + var xc = 0; + for( var i = 0; i < amo; i++ ) + xc += nodeList[| i].x + nodeList[| i].w / 2; + xc /= amo; + + for( var i = 0; i < amo; i++ ) + nodeList[| i].x = xc - nodeList[| i].w / 2; + break; + case fa_right: + var x0 = -999999; + for( var i = 0; i < amo; i++ ) + x0 = max(x0, nodeList[| i].x + nodeList[| i].w); + + for( var i = 0; i < amo; i++ ) + nodeList[| i].x = x0 - nodeList[| i].w; + break; + } +} + +function node_valign(nodeList, alignment = fa_middle) { + var amo = ds_list_size(nodeList); + + switch(alignment) { + case fa_top: + var y0 = 999999; + for( var i = 0; i < amo; i++ ) + y0 = min(y0, nodeList[| i].y); + + for( var i = 0; i < amo; i++ ) + nodeList[| i].y = y0; + break; + case fa_middle: + var yc = 0; + for( var i = 0; i < amo; i++ ) + yc += nodeList[| i].y + nodeList[| i].h / 2; + yc /= amo; + + for( var i = 0; i < amo; i++ ) + nodeList[| i].y = yc - nodeList[| i].h / 2; + break; + case fa_bottom: + var y0 = -999999; + for( var i = 0; i < amo; i++ ) + y0 = max(y0, nodeList[| i].y + nodeList[| i].h); + + for( var i = 0; i < amo; i++ ) + nodeList[| i].y = y0 - nodeList[| i].h; + break; + } +} + +function node_hdistribute(nodeList) { + var amo = ds_list_size(nodeList); + var nodes = ds_priority_create(); + + var x0 = 999999; + var x1 = -999999; + for( var i = 0; i < amo; i++ ) { + var _x = nodeList[| i].x + nodeList[| i].w / 2; + x0 = min(x0, _x); + x1 = max(x1, _x); + + ds_priority_add(nodes, nodeList[| i], _x); + } + + var sp = (x1 - x0) / (amo - 1); + + for( var i = 0; i < amo; i++ ) { + var n = ds_priority_delete_min(nodes); + n.x = x0 + sp * i - n.w / 2; + } + + ds_priority_destroy(nodes); +} + +function node_vdistribute(nodeList) { + var amo = ds_list_size(nodeList); + var nodes = ds_priority_create(); + + var y0 = 999999; + var y1 = -999999; + for( var i = 0; i < amo; i++ ) { + var _y = nodeList[| i].y + nodeList[| i].h / 2; + y0 = min(y0, _y); + y1 = max(y1, _y); + + ds_priority_add(nodes, nodeList[| i], _y); + } + + var sp = (y1 - y0) / (amo - 1); + + for( var i = 0; i < amo; i++ ) { + var n = ds_priority_delete_min(nodes); + n.y = y0 + sp * i - n.h / 2; + } + + ds_priority_destroy(nodes); +} \ No newline at end of file diff --git a/scripts/node_align_functions/node_align_functions.yy b/scripts/node_align_functions/node_align_functions.yy new file mode 100644 index 000000000..a06de5f32 --- /dev/null +++ b/scripts/node_align_functions/node_align_functions.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_align_functions", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "nodes", + "path": "folders/functions/nodes.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index c5c5ba2ac..30a5c26f6 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -1030,6 +1030,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x static cacheCurrentFrame = function(_frame) { cacheArrayCheck(); if(ANIMATOR.current_frame < 0) return; + if(ANIMATOR.current_frame >= array_length(cached_output)) return; surface_array_free(cached_output[ANIMATOR.current_frame]); cached_output[ANIMATOR.current_frame] = surface_array_clone(_frame); diff --git a/scripts/node_lua_compute/node_lua_compute.gml b/scripts/node_lua_compute/node_lua_compute.gml index 9e6abb745..b399554e8 100644 --- a/scripts/node_lua_compute/node_lua_compute.gml +++ b/scripts/node_lua_compute/node_lua_compute.gml @@ -184,8 +184,8 @@ function Node_Lua_Compute(_x, _y, _group = noone) : Node(_x, _y, _group) constru lua_projectData(getState()); var res = 0; - try res = lua_call_w(getState(), _func, argument_val); - catch(e) noti_warning(exception_print(e),, self); + try { res = lua_call_w(getState(), _func, argument_val); } + catch(e) { noti_warning(exception_print(e),, self); } outputs[| 1].setValue(res); } diff --git a/scripts/node_lua_global/node_lua_global.gml b/scripts/node_lua_global/node_lua_global.gml index 30eb880bb..74176818b 100644 --- a/scripts/node_lua_global/node_lua_global.gml +++ b/scripts/node_lua_global/node_lua_global.gml @@ -75,8 +75,8 @@ function Node_Lua_Global(_x, _y, _group = noone) : Node(_x, _y, _group) construc lua_projectData(getState()); if(ANIMATOR.current_frame == 0 || _type == 1) { - try lua_add_code(getState(), _code); - catch(e) noti_warning(exception_print(e),, self); + try { lua_add_code(getState(), _code); } + catch(e) { noti_warning(exception_print(e),, self); } } } diff --git a/scripts/node_lua_surface/node_lua_surface.gml b/scripts/node_lua_surface/node_lua_surface.gml index db9eb1cdf..f3cb146a3 100644 --- a/scripts/node_lua_surface/node_lua_surface.gml +++ b/scripts/node_lua_surface/node_lua_surface.gml @@ -182,8 +182,8 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru _outSurf = surface_verify(_outSurf, _dimm[0], _dimm[1], attrDepth()); surface_set_target(_outSurf); - try lua_call_w(getState(), _func, argument_val); - catch(e) noti_warning(exception_print(e),, self); + try { lua_call_w(getState(), _func, argument_val); } + catch(e) { noti_warning(exception_print(e),, self); } surface_reset_target(); outputs[| 1].setValue(_outSurf); diff --git a/scripts/node_strand_create/node_strand_create.gml b/scripts/node_strand_create/node_strand_create.gml index c899906b1..8f613f25e 100644 --- a/scripts/node_strand_create/node_strand_create.gml +++ b/scripts/node_strand_create/node_strand_create.gml @@ -240,7 +240,7 @@ function Node_Strand_Create(_x, _y, _group = noone) : Node(_x, _y, _group) const var rad = tool_dragging.attribute.radius; var fall = tool_dragging.attribute.fall; var stn = tool_dragging.attribute.strength; - stn = tool_dragging == tool_stretch? stn / room_speed : stn / 10; + stn = tool_dragging == tool_stretch? stn / game_get_speed(gamespeed_fps) : stn / 10; for( var i = 0; i < array_length(groomed.hairs); i++ ) { var h = groomed.hairs[i]; diff --git a/scripts/panel_graph/panel_graph.gml b/scripts/panel_graph/panel_graph.gml index f41c7e0a2..c0d390408 100644 --- a/scripts/panel_graph/panel_graph.gml +++ b/scripts/panel_graph/panel_graph.gml @@ -575,6 +575,23 @@ function Panel_Graph() : PanelContent() constructor { if(ds_list_size(nodes_select_list) >= 2) { array_push(menu, -1); + array_push(menu, + menuItem(get_text("panel_graph_align_nodes", "Align nodes"), function(_dat) { + return submenuCall(_dat, [ + menuItemGroup(get_text("horizontal", "Horizontal"), [ + [ [THEME.inspector_surface_halign, 0], function() { node_halign(nodes_select_list, fa_left); } ], + [ [THEME.inspector_surface_halign, 1], function() { node_halign(nodes_select_list, fa_center); } ], + [ [THEME.inspector_surface_halign, 2], function() { node_halign(nodes_select_list, fa_right); } ], + [ [THEME.obj_distribute_h, 0], function() { node_hdistribute(nodes_select_list); } ], + ]), + menuItemGroup(get_text("vertical", "Vertical"), [ + [ [THEME.inspector_surface_valign, 0], function() { node_valign(nodes_select_list, fa_top); } ], + [ [THEME.inspector_surface_valign, 1], function() { node_valign(nodes_select_list, fa_middle); } ], + [ [THEME.inspector_surface_valign, 2], function() { node_valign(nodes_select_list, fa_bottom); } ], + [ [THEME.obj_distribute_v, 0], function() { node_vdistribute(nodes_select_list); } ], + ]), + ]); + }).setIsShelf()); array_push(menu, menuItem(get_text("panel_graph_blend_nodes", "Blend nodes"), function() { doBlend(); diff --git a/scripts/render_data/render_data.gml b/scripts/render_data/render_data.gml index 95276da37..091cfafe3 100644 --- a/scripts/render_data/render_data.gml +++ b/scripts/render_data/render_data.gml @@ -130,8 +130,9 @@ function Render(partial = false, runAction = false) { LOG_IF(global.RENDER_LOG, "Rendered " + rendering.name + " (" + rendering.display_name + ") [" + string(instanceof(rendering)) + "]" + (renderable? " [Update]" : " [Skip]")); LOG_BLOCK_END(); } - } catch(e) + } catch(e) { noti_warning(exception_print(e)); + } LOG_IF(global.RENDER_LOG, "=== RENDER COMPLETE IN {" + string(current_time - t) + "ms} ===\n"); LOG_END(); @@ -191,8 +192,9 @@ function RenderList(list) { ds_queue_enqueue(queue, nextNodes[i]); } - } catch(e) + } catch(e) { noti_warning(exception_print(e)); + } LOG_IF(log, "=== RENDER COMPLETE ===\n"); LOG_END(); @@ -251,6 +253,7 @@ function RenderListAction(list, context = PANEL_GRAPH.getCurrentContext()) { } printIf(global.RENDER_LOG, "=== RENDER COMPLETE IN {" + string(current_time - t) + "ms} ===\n"); - } catch(e) - noti_warning(exception_print(e)); + } catch(e) { + noti_waning(exception_print(e)); + } } \ No newline at end of file diff --git a/scripts/sprite_loader/sprite_loader.gml b/scripts/sprite_loader/sprite_loader.gml index 4648baa4f..9896b4155 100644 --- a/scripts/sprite_loader/sprite_loader.gml +++ b/scripts/sprite_loader/sprite_loader.gml @@ -6,9 +6,9 @@ function __initTheme() { var _l = root + "/version"; if(file_exists(_l)) { var res = json_load_struct(_l); - if(res.version == BUILD_NUMBER) return; + //if(res.version == BUILD_NUMBER) return; } - //json_save_struct(_l, { version: BUILD_NUMBER }); + json_save_struct(_l, { version: BUILD_NUMBER }); log_message("THEME", "unzipping default theme to DIRECTORY."); zip_unzip("data/themes/default.zip", root); diff --git a/scripts/window_functions/window_functions.yy b/scripts/window_functions/window_functions.yy index 4a16d00f4..da0470f97 100644 --- a/scripts/window_functions/window_functions.yy +++ b/scripts/window_functions/window_functions.yy @@ -5,7 +5,7 @@ "isCompatibility": false, "isDnD": false, "parent": { - "name": "functions", - "path": "folders/functions.yy", + "name": "window", + "path": "folders/functions/window.yy", }, } \ No newline at end of file