diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index e224ef8af..abbe43727 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -296,6 +296,7 @@ {"name":"sh_polar","order":1,"path":"shaders/sh_polar/sh_polar.yy",}, {"name":"s_node_warp_mesh","order":10,"path":"sprites/s_node_warp_mesh/s_node_warp_mesh.yy",}, {"name":"sh_pixel_cloud","order":13,"path":"shaders/sh_pixel_cloud/sh_pixel_cloud.yy",}, + {"name":"printer","order":2,"path":"scripts/printer/printer.yy",}, {"name":"sh_de_stray","order":16,"path":"shaders/sh_de_stray/sh_de_stray.yy",}, {"name":"sh_chromatic_aberration","order":31,"path":"shaders/sh_chromatic_aberration/sh_chromatic_aberration.yy",}, {"name":"fd_rectangle_create_view","order":3,"path":"scripts/fd_rectangle_create_view/fd_rectangle_create_view.yy",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index f43bd247f..f81c5c3a4 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -1034,6 +1034,7 @@ {"id":{"name":"sh_polar","path":"shaders/sh_polar/sh_polar.yy",},}, {"id":{"name":"s_node_warp_mesh","path":"sprites/s_node_warp_mesh/s_node_warp_mesh.yy",},}, {"id":{"name":"sh_pixel_cloud","path":"shaders/sh_pixel_cloud/sh_pixel_cloud.yy",},}, + {"id":{"name":"printer","path":"scripts/printer/printer.yy",},}, {"id":{"name":"node_iterate","path":"scripts/node_iterate/node_iterate.yy",},}, {"id":{"name":"sh_de_stray","path":"shaders/sh_de_stray/sh_de_stray.yy",},}, {"id":{"name":"sh_chromatic_aberration","path":"shaders/sh_chromatic_aberration/sh_chromatic_aberration.yy",},}, diff --git a/datafiles/data/themes/default.zip b/datafiles/data/themes/default.zip index 01c4e1b33..4bfc940a9 100644 Binary files a/datafiles/data/themes/default.zip and b/datafiles/data/themes/default.zip differ diff --git a/objects/o_main/Draw_75.gml b/objects/o_main/Draw_75.gml index 98068d2bf..660264b83 100644 --- a/objects/o_main/Draw_75.gml +++ b/objects/o_main/Draw_75.gml @@ -20,7 +20,7 @@ if(OS == os_windows && gameframe_is_minimized()) exit; draw_tooltip_text(string_real(content)); break; case VALUE_TYPE.boolean : - draw_tooltip_text(content? get_text("true", "True") : get_text("false", "False")); + draw_tooltip_text(printBool(content)); break; case VALUE_TYPE.curve : draw_tooltip_text("[" + get_text("tooltip_curve_object", "Curve Object") + "]"); diff --git a/scripts/checkbox/checkbox.gml b/scripts/checkbox/checkbox.gml index ccbd63ce2..336364d77 100644 --- a/scripts/checkbox/checkbox.gml +++ b/scripts/checkbox/checkbox.gml @@ -52,7 +52,10 @@ function checkBox(_onClick) : widget() constructor { } else if(mouse_press(mb_left)) deactivate(); - if(_value) draw_sprite_stretched_ext(spr, 2, _dx, _dy, ss, ss, COLORS._main_accent, aa); + if(is_array(_value)) + draw_sprite_stretched_ext(spr, 3, _dx, _dy + ss / 2 - 8, ss, 16, COLORS._main_accent, aa); + else if(_value) + draw_sprite_stretched_ext(spr, 2, _dx, _dy, ss, ss, COLORS._main_accent, aa); if(WIDGET_CURRENT == self) draw_sprite_stretched_ext(THEME.widget_selecting, 0, _dx - ui(3), _dy - ui(3), ss + ui(6), ss + ui(6), COLORS._main_accent, 1); diff --git a/scripts/node_functions/node_functions.gml b/scripts/node_functions/node_functions.gml index 174aa6b0d..fe8dd91be 100644 --- a/scripts/node_functions/node_functions.gml +++ b/scripts/node_functions/node_functions.gml @@ -143,5 +143,6 @@ win.node_target = node; win.preview_channel = node.preview_channel; var dia = dialogPanelCall(win, mouse_mx, mouse_my); + dia.destroy_on_click_out = false; } #endregion \ No newline at end of file diff --git a/scripts/panel_preview_window/panel_preview_window.gml b/scripts/panel_preview_window/panel_preview_window.gml index 9d19d292d..09a14150b 100644 --- a/scripts/panel_preview_window/panel_preview_window.gml +++ b/scripts/panel_preview_window/panel_preview_window.gml @@ -13,6 +13,7 @@ function Panel_Preview_Window() : PanelContent() constructor { title_show = 0; scale = 0; + scale_levels = [ 1/32, 1/24, 1/16, 1/12, 1/8, 1/4, 1/3, 1/2, 2/3, 1, 1.5, 2, 3, 4, 6, 8, 12, 16, 24, 32]; panx = 0; pany = 0; @@ -21,7 +22,7 @@ function Panel_Preview_Window() : PanelContent() constructor { pan_my = 0; pan_sx = 0; pan_sy = 0; - + function surfaceCheck() { content_surface = surface_verify(content_surface, w, h); } @@ -116,13 +117,32 @@ function Panel_Preview_Window() : PanelContent() constructor { if(pHOVER) { var inc = 0.5; - if(scale > 16) inc = 2; - else if(scale > 8) inc = 1; + if(scale > 64) inc = 4; + else if(scale > 16) inc = 2; + else if(scale > 8) inc = 1; + else if(scale > 2) inc = 0.5; + else if(scale > 0.25) inc = 0.25; + else inc = 0.05; var s = scale; - if(mouse_wheel_down()) scale = max(round(scale / inc) * inc - inc, 0.25); - if(mouse_wheel_up()) scale = min(round(scale / inc) * inc + inc, 32); - + if(mouse_wheel_down()) { + for( var i = 0; i < array_length(scale_levels) - 1; i++ ) { + if(s > scale_levels[i] && s <= scale_levels[i + 1]) { + scale = scale_levels[i]; + break; + } + } + } + + if(mouse_wheel_up()) { + for( var i = 0; i < array_length(scale_levels) - 1; i++ ) { + if(s >= scale_levels[i] && s < scale_levels[i + 1]) { + scale = scale_levels[i + 1]; + break; + } + } + } + var ds = scale - s; panx = panx / s * scale; pany = pany / s * scale; diff --git a/scripts/printer/printer.gml b/scripts/printer/printer.gml new file mode 100644 index 000000000..588c244d2 --- /dev/null +++ b/scripts/printer/printer.gml @@ -0,0 +1,11 @@ +function printBool(val) { + if(!is_array(val)) return val? get_text("true", "True") : get_text("false", "False"); + + var ss = "["; + for( var i = 0; i < array_length(val); i++ ) { + ss += (i? ", " : "") + printBool(val[i]); + } + + ss += "]"; + return ss; +} \ No newline at end of file diff --git a/scripts/printer/printer.yy b/scripts/printer/printer.yy new file mode 100644 index 000000000..6312d2854 --- /dev/null +++ b/scripts/printer/printer.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "printer", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "debug", + "path": "folders/functions/debug.yy", + }, +} \ No newline at end of file