diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index e6e2a1c2f..e3302bf18 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -272,6 +272,7 @@ {"name":"widgets","order":5,"path":"folders/widgets.yy",}, {"name":"button","order":34,"path":"folders/widgets/button.yy",}, {"name":"rotator","order":35,"path":"folders/widgets/rotator.yy",}, + {"name":"sliders","order":39,"path":"folders/widgets/sliders.yy",}, {"name":"text","order":36,"path":"folders/widgets/text.yy",}, ], "ResourceOrderSettings": [ @@ -589,6 +590,7 @@ {"name":"node_FLIP_destroy","order":11,"path":"scripts/node_FLIP_destroy/node_FLIP_destroy.yy",}, {"name":"libborderless","order":1,"path":"extensions/libborderless/libborderless.yy",}, {"name":"node_dynasurf_in","order":4,"path":"scripts/node_dynasurf_in/node_dynasurf_in.yy",}, + {"name":"__sliderRange","order":3,"path":"scripts/__sliderRange/__sliderRange.yy",}, {"name":"s_node_vfx_attract","order":8,"path":"sprites/s_node_vfx_attract/s_node_vfx_attract.yy",}, {"name":"s_node_pixel_cloud","order":29,"path":"sprites/s_node_pixel_cloud/s_node_pixel_cloud.yy",}, {"name":"node_grid_noise","order":4,"path":"scripts/node_grid_noise/node_grid_noise.yy",}, @@ -966,7 +968,6 @@ {"name":"node_mesh_transform","order":2,"path":"scripts/node_mesh_transform/node_mesh_transform.yy",}, {"name":"node_smoke_turbulence","order":10,"path":"scripts/node_smoke_turbulence/node_smoke_turbulence.yy",}, {"name":"sh_sdf","order":1,"path":"shaders/sh_sdf/sh_sdf.yy",}, - {"name":"slider","order":15,"path":"scripts/slider/slider.yy",}, {"name":"biterator","order":1,"path":"scripts/biterator/biterator.yy",}, {"name":"s_node_convolution","order":44,"path":"sprites/s_node_convolution/s_node_convolution.yy",}, {"name":"fd_rectangle_get_velocity_time_step","order":25,"path":"scripts/fd_rectangle_get_velocity_time_step/fd_rectangle_get_velocity_time_step.yy",}, @@ -1171,7 +1172,7 @@ {"name":"node_alpha_cutoff","order":10,"path":"scripts/node_alpha_cutoff/node_alpha_cutoff.yy",}, {"name":"sh_channel_R","order":4,"path":"shaders/sh_channel_R/sh_channel_R.yy",}, {"name":"draw_circle_functions","order":3,"path":"scripts/draw_circle_functions/draw_circle_functions.yy",}, - {"name":"sliderRange","order":16,"path":"scripts/sliderRange/sliderRange.yy",}, + {"name":"sliderRange","order":2,"path":"scripts/sliderRange/sliderRange.yy",}, {"name":"node_FLIP_to_VFX","order":14,"path":"scripts/node_FLIP_to_VFX/node_FLIP_to_VFX.yy",}, {"name":"point_rect_overlap","order":2,"path":"scripts/point_rect_overlap/point_rect_overlap.yy",}, {"name":"s_node_bevel","order":6,"path":"sprites/s_node_bevel/s_node_bevel.yy",}, @@ -2066,7 +2067,7 @@ {"name":"node_array_shuffle","order":10,"path":"scripts/node_array_shuffle/node_array_shuffle.yy",}, {"name":"panel_node_data_gen","order":9,"path":"scripts/panel_node_data_gen/panel_node_data_gen.yy",}, {"name":"node_dynasurf_out","order":1,"path":"scripts/node_dynasurf_out/node_dynasurf_out.yy",}, - {"name":"slider_Slider","order":37,"path":"objects/slider_Slider/slider_Slider.yy",}, + {"name":"slider_Slider","order":1,"path":"objects/slider_Slider/slider_Slider.yy",}, {"name":"fd_rectangle_update_material","order":21,"path":"scripts/fd_rectangle_update_material/fd_rectangle_update_material.yy",}, {"name":"s_node_array_convolute","order":16,"path":"sprites/s_node_array_convolute/s_node_array_convolute.yy",}, {"name":"sh_perlin_tiled","order":6,"path":"shaders/sh_perlin_tiled/sh_perlin_tiled.yy",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index 5e4052b6d..876ad7bb5 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -308,6 +308,7 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"widgets","folderPath":"folders/widgets.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"button","folderPath":"folders/widgets/button.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"rotator","folderPath":"folders/widgets/rotator.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"sliders","folderPath":"folders/widgets/sliders.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"text","folderPath":"folders/widgets/text.yy",}, ], "IncludedFiles": [ @@ -821,6 +822,7 @@ {"id":{"name":"node_FLIP_destroy","path":"scripts/node_FLIP_destroy/node_FLIP_destroy.yy",},}, {"id":{"name":"libborderless","path":"extensions/libborderless/libborderless.yy",},}, {"id":{"name":"node_dynasurf_in","path":"scripts/node_dynasurf_in/node_dynasurf_in.yy",},}, + {"id":{"name":"__sliderRange","path":"scripts/__sliderRange/__sliderRange.yy",},}, {"id":{"name":"s_node_vfx_attract","path":"sprites/s_node_vfx_attract/s_node_vfx_attract.yy",},}, {"id":{"name":"s_node_pixel_cloud","path":"sprites/s_node_pixel_cloud/s_node_pixel_cloud.yy",},}, {"id":{"name":"node_grid_noise","path":"scripts/node_grid_noise/node_grid_noise.yy",},}, diff --git a/datafiles/data/Theme.zip b/datafiles/data/Theme.zip index 43994ab9d..6d9bb9a5a 100644 Binary files a/datafiles/data/Theme.zip and b/datafiles/data/Theme.zip differ diff --git a/fonts/_f_sdf/_f_sdf.old.png b/fonts/_f_sdf/_f_sdf.old.png index db462bc02..b1db5d8ef 100644 Binary files a/fonts/_f_sdf/_f_sdf.old.png and b/fonts/_f_sdf/_f_sdf.old.png differ diff --git a/fonts/_f_sdf/_f_sdf.png b/fonts/_f_sdf/_f_sdf.png index 7c312e5ce..15da35441 100644 Binary files a/fonts/_f_sdf/_f_sdf.png and b/fonts/_f_sdf/_f_sdf.png differ diff --git a/fonts/_f_sdf_medium/_f_sdf_medium.old.png b/fonts/_f_sdf_medium/_f_sdf_medium.old.png index c05e658f8..f8490660c 100644 Binary files a/fonts/_f_sdf_medium/_f_sdf_medium.old.png and b/fonts/_f_sdf_medium/_f_sdf_medium.old.png differ diff --git a/fonts/_f_sdf_medium/_f_sdf_medium.png b/fonts/_f_sdf_medium/_f_sdf_medium.png index 6810a29a6..fcaf06e27 100644 Binary files a/fonts/_f_sdf_medium/_f_sdf_medium.png and b/fonts/_f_sdf_medium/_f_sdf_medium.png differ diff --git a/objects/o_main/Create_0.gml b/objects/o_main/Create_0.gml index 1eb242291..e09179dba 100644 --- a/objects/o_main/Create_0.gml +++ b/objects/o_main/Create_0.gml @@ -27,6 +27,9 @@ DIALOG_DEPTH_HOVER = 0; UPDATE = RENDER_TYPE.none; CURSOR = cr_default; + CURSOR_LOCK = false; + CURSOR_LOCK_X = 0; + CURSOR_LOCK_Y = 0; TOOLTIP = ""; DRAGGING = noone; KEYBOARD_STRING = ""; @@ -43,6 +46,8 @@ kb_hold = false; kb_hkey = 0; + _cursor_lock = false; + watcher_surface = surface_create(1, 1); panelInit(); diff --git a/objects/o_main/Step_1.gml b/objects/o_main/Step_1.gml index 34d397129..f69adaa22 100644 --- a/objects/o_main/Step_1.gml +++ b/objects/o_main/Step_1.gml @@ -28,9 +28,17 @@ _HOVERING_ELEMENT = noone; if(_cursor != CURSOR) { window_set_cursor(CURSOR); _cursor = CURSOR; + } + CURSOR = cr_default; + + + if(_cursor_lock != CURSOR_LOCK) { + window_mouse_set_locked(CURSOR_LOCK); + if(!CURSOR_LOCK) window_mouse_set(CURSOR_LOCK_X, CURSOR_LOCK_Y); } - CURSOR = cr_default; + _cursor_lock = CURSOR_LOCK; + CURSOR_LOCK = false; if(!is_surface(watcher_surface)) { RENDER_ALL diff --git a/objects/slider_Slider/slider_Slider.yy b/objects/slider_Slider/slider_Slider.yy index 911facfa8..43a91cdcd 100644 --- a/objects/slider_Slider/slider_Slider.yy +++ b/objects/slider_Slider/slider_Slider.yy @@ -9,8 +9,8 @@ "managed": true, "overriddenProperties": [], "parent": { - "name": "widgets", - "path": "folders/widgets.yy", + "name": "sliders", + "path": "folders/widgets/sliders.yy", }, "parentObjectId": null, "persistent": false, diff --git a/objects/textBox_slider/Create_0.gml b/objects/textBox_slider/Create_0.gml index a198e92cf..17ac0ecdd 100644 --- a/objects/textBox_slider/Create_0.gml +++ b/objects/textBox_slider/Create_0.gml @@ -1,12 +1,23 @@ /// @description depth = -19999; tb = noone; -val = 0; -tb_de = 0; -function activate() { - slide_da = -1; - - slide_dx = mouse_mx; - slide_dy = mouse_my; +def_val = 0; +cur_val = 0; + +def_mx = 0; +def_my = 0; +prev_mx = 0; + +function activate(defVal) { + def_val = defVal; + cur_val = defVal; + + def_mx = mouse_mx; + def_my = mouse_my; + + prev_mx = mouse_mx; + + CURSOR_LOCK_X = mouse_mx; + CURSOR_LOCK_Y = mouse_my; } \ No newline at end of file diff --git a/objects/textBox_slider/Draw_64.gml b/objects/textBox_slider/Draw_64.gml index 51cacb8d9..af381321a 100644 --- a/objects/textBox_slider/Draw_64.gml +++ b/objects/textBox_slider/Draw_64.gml @@ -1,28 +1,11 @@ /// @description if(tb == noone) exit; -if(slide_da == -1) { - var _dist = point_distance(slide_dx, slide_dy, mouse_mx, mouse_my); - var _dirr = point_direction(slide_dx, slide_dy, mouse_mx, mouse_my); - - if(_dist > 8) { - if(_dirr < 45) slide_da = 0; - else if(_dirr < 135) slide_da = 1; - else if(_dirr < 225) slide_da = 0; - else if(_dirr < 315) slide_da = 1; - else slide_da = 0; - } - - tb = noone; - exit; -} - -tb_de = 1; - MOUSE_BLOCK = true; +CURSOR_LOCK = true; if(mouse_check_button_pressed(mb_right)) { - tb._input_text = string_real(tb.slide_sv); + tb._input_text = string_real(def_val); tb.apply(); tb.sliding = false; tb.deactivate(); @@ -32,90 +15,23 @@ if(mouse_check_button_pressed(mb_right)) { exit; } -var _s = tb.slide_speed; +var _s = tb.slide_speed; +var _dx = window_mouse_get_delta_x(); -if(!MOUSE_WRAPPING) { - var _adx = mouse_mx - slide_dx; - var _ady = slide_dy - mouse_my; - - var sc = 10; - if(key_mod_press(CTRL)) _s *= sc; - if(key_mod_press(ALT)) _s /= sc; - - var spd = (slide_da? _ady : _adx) * _s; - val = value_snap(tb.slide_sv + spd, _s); - if(tb.slide_int) val = round(val); - if(tb.slide_range != noone) val = clamp(val, tb.slide_range[0], tb.slide_range[1]); - - var _stp_sz = 50 * _s; - var _stp_fl = round(val / _stp_sz) * _stp_sz; - var _stp_md = val - _stp_fl; - - draw_set_text(f_p0b, fa_center, fa_center, COLORS._main_text); - - var _tw = 48; - for( var i = -2; i <= 2; i++ ) { - var _v = _stp_fl + i * _stp_sz; - _tw = max(_tw, string_width(_v) + 24); - } - - var _snp_s = 50 * _s; - var _snp_v = round(val / _snp_s) * _snp_s; - if(abs(val - _snp_v) < 5 * _s) - val = _snp_v; - - if(slide_da) { - var _val_y = slide_dy - (val - tb.slide_sv) / _s; - - var _sdw = _tw; - var _sdh = 256; - var _sdx = slide_dx - _sdw / 2; - var _sdy = _val_y - _sdh / 2; - - draw_sprite_stretched_ext(THEME.textbox_number_slider, 0, _sdx, _sdy, _sdw, _sdh, COLORS.panel_inspector_group_bg, 1); - - for( var i = -2; i <= 2; i++ ) { - var _v = _stp_fl + i * _stp_sz; - - draw_set_color(_v == tb.slide_sv? COLORS._main_accent : COLORS._main_text); - draw_set_alpha(0.4 - abs(i) * 0.1); - draw_text(slide_dx, slide_dy - (_v - tb.slide_sv) / _s, _v); - } - - draw_set_color(val == tb.slide_sv? COLORS._main_accent : COLORS._main_text); - draw_set_alpha(1); - draw_text(slide_dx, _val_y, val); - } else { - var _val_x = slide_dx + (val - tb.slide_sv) / _s; - - var _sdw = 240; - var _sdh = 48; - var _sdx = _val_x - _sdw / 2; - var _sdy = slide_dy - _sdh / 2; - - draw_sprite_stretched_ext(THEME.textbox_number_slider, 0, _sdx, _sdy, _sdw, _sdh, COLORS.panel_inspector_group_bg, 1); - - for( var i = -2; i <= 2; i++ ) { - var _v = _stp_fl + i * _stp_sz; - - draw_set_color(_v == tb.slide_sv? COLORS._main_accent : COLORS._main_text); - draw_set_alpha(0.4 - abs(i) * 0.1); - draw_text(slide_dx + (_v - tb.slide_sv) / _s, slide_dy, _v); - } - - draw_set_color(val == tb.slide_sv? COLORS._main_accent : COLORS._main_text); - draw_set_alpha(1); - draw_text(_val_x, slide_dy, val); - } - - tb._input_text = string_real(val); - if(tb.apply()) UNDO_HOLDING = true; -} - -if(MOUSE_WRAPPING) { - if(slide_da) slide_dy = mouse_my + (val - tb.slide_sv) / _s; - else slide_dx = mouse_mx - (val - tb.slide_sv) / _s; -} - -setMouseWrap(); -tb = noone; \ No newline at end of file +if(key_mod_press(CTRL)) _s *= 10; +if(key_mod_press(ALT)) _s /= 10; + +cur_val += _dx * _s; + +if(tb.slide_range != noone) + cur_val = clamp(cur_val, tb.curr_range[0], tb.curr_range[1]); + +var _val = value_snap(cur_val, _s); +if(tb.slide_int) + _val = round(_val); + +tb._input_text = string_real(_val); +if(tb.apply()) UNDO_HOLDING = true; + +tb = noone; +CURSOR = cr_none; \ No newline at end of file diff --git a/scripts/__node_3d_combine/__node_3d_combine.gml b/scripts/__node_3d_combine/__node_3d_combine.gml index 74eeee628..edd51e7eb 100644 --- a/scripts/__node_3d_combine/__node_3d_combine.gml +++ b/scripts/__node_3d_combine/__node_3d_combine.gml @@ -49,7 +49,7 @@ function __Node_3D_Combine(_x, _y, _group = noone) : Node(_x, _y, _group) constr .rejectArray(); inputs[| 12] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }) + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 0.1 ] }) .rejectArray(); inputs[| 13] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) diff --git a/scripts/__node_3d_displace/__node_3d_displace.gml b/scripts/__node_3d_displace/__node_3d_displace.gml index 4dda1a651..3b6071523 100644 --- a/scripts/__node_3d_displace/__node_3d_displace.gml +++ b/scripts/__node_3d_displace/__node_3d_displace.gml @@ -41,7 +41,7 @@ function __Node_3D_Displace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .rejectArray(); inputs[| 13] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); inputs[| 14] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); diff --git a/scripts/__node_3d_extrude/__node_3d_extrude.gml b/scripts/__node_3d_extrude/__node_3d_extrude.gml index de8577e22..1d655e0ce 100644 --- a/scripts/__node_3d_extrude/__node_3d_extrude.gml +++ b/scripts/__node_3d_extrude/__node_3d_extrude.gml @@ -49,7 +49,7 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro .rejectArray(); inputs[| 17] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); inputs[| 18] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) diff --git a/scripts/__node_3d_obj/__node_3d_obj.gml b/scripts/__node_3d_obj/__node_3d_obj.gml index 46a70347c..29f4dc5b6 100644 --- a/scripts/__node_3d_obj/__node_3d_obj.gml +++ b/scripts/__node_3d_obj/__node_3d_obj.gml @@ -59,7 +59,7 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo .rejectArray(); inputs[| 16] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 1 ] }) + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 90, 0.1 ] }) .rejectArray(); inputs[| 17] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) diff --git a/scripts/__node_3d_plane/__node_3d_plane.gml b/scripts/__node_3d_plane/__node_3d_plane.gml index a61ce9257..4c0f116c9 100644 --- a/scripts/__node_3d_plane/__node_3d_plane.gml +++ b/scripts/__node_3d_plane/__node_3d_plane.gml @@ -31,7 +31,7 @@ function __Node_3D_Plane(_x, _y, _group = noone) : Node_Processor(_x, _y, _group .rejectArray(); inputs[| 9] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); inputs[| 10] = nodeValue("Texture scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml b/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml index db5a95c88..d254803db 100644 --- a/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml +++ b/scripts/__node_3d_prim_cone/__node_3d_prim_cone.gml @@ -40,7 +40,7 @@ function __Node_3D_Cone(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .rejectArray(); inputs[| 13] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); inputs[| 14] = nodeValue("Sides", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 16); diff --git a/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml b/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml index 8142a97fd..cb44584a9 100644 --- a/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml +++ b/scripts/__node_3d_prim_cube/__node_3d_prim_cube.gml @@ -53,7 +53,7 @@ function __Node_3D_Cube(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .rejectArray(); inputs[| 21] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); inputs[| 22] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) diff --git a/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml b/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml index 04241f1f9..860894317 100644 --- a/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml +++ b/scripts/__node_3d_prim_cylinder/__node_3d_prim_cylinder.gml @@ -49,7 +49,7 @@ function __Node_3D_Cylinder(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .rejectArray(); inputs[| 18] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); inputs[| 19] = nodeValue("Taper", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml b/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml index 3b4977d30..c2cdc93af 100644 --- a/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml +++ b/scripts/__node_3d_prim_sphere/__node_3d_prim_sphere.gml @@ -46,7 +46,7 @@ function __Node_3D_Sphere(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou .rejectArray(); inputs[| 15] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); inputs[| 16] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) diff --git a/scripts/__node_3d_repeat/__node_3d_repeat.gml b/scripts/__node_3d_repeat/__node_3d_repeat.gml index cd48a40da..ccbc7f41d 100644 --- a/scripts/__node_3d_repeat/__node_3d_repeat.gml +++ b/scripts/__node_3d_repeat/__node_3d_repeat.gml @@ -64,7 +64,7 @@ function __Node_3D_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constru .rejectArray(); inputs[| 21] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); inputs[| 22] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) diff --git a/scripts/__node_3d_transform/__node_3d_transform.gml b/scripts/__node_3d_transform/__node_3d_transform.gml index 8ea56cb3e..8b5493e73 100644 --- a/scripts/__node_3d_transform/__node_3d_transform.gml +++ b/scripts/__node_3d_transform/__node_3d_transform.gml @@ -41,7 +41,7 @@ function __Node_3D_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _g .rejectArray(); inputs[| 13] = nodeValue("Field of view", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 60) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 90, 0.1 ] }); inputs[| 14] = nodeValue("Scale view with dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true) diff --git a/scripts/__sliderRange/__sliderRange.gml b/scripts/__sliderRange/__sliderRange.gml new file mode 100644 index 000000000..47fa2904a --- /dev/null +++ b/scripts/__sliderRange/__sliderRange.gml @@ -0,0 +1,130 @@ +function __sliderRange(_min, _max, _step, _onModify) : widget() constructor { + minn = _min; + maxx = _max; + stepSize = _step; + + spr = THEME.slider; + onModify = _onModify; + + dragging = noone; + drag_sv = 0; + + tb_value_min = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(0, clamp(val, minn, maxx)); }); + tb_value_max = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(1, clamp(val, minn, maxx)); }); + + tb_value_min.slidable = true; + tb_value_max.slidable = true; + + static setSlideSpeed = function(speed) { #region + tb_value_min.setSlidable(speed); + tb_value_max.setSlidable(speed); + } #endregion + + static setInteract = function(interactable = noone) { #region + self.interactable = interactable; + tb_value_min.interactable = interactable; + tb_value_max.interactable = interactable; + } #endregion + + static register = function(parent = noone) { #region + tb_value_min.register(parent); + tb_value_max.register(parent); + } #endregion + + static drawParam = function(params) { #region + return draw(params.x, params.y, params.w, params.h, params.data, params.m); + } #endregion + + static draw = function(_x, _y, _w, _h, _data, _m) { #region + x = _x; + y = _y; + w = _w; + h = _h; + if(!is_real(_data[0])) return h; + if(!is_real(_data[1])) return h; + + var tb_w = ui(64); + var sw = _w - (tb_w + ui(16)) * 2; + + tb_value_min.setFocusHover(active, hover); + tb_value_min.draw(_x, _y, tb_w, TEXTBOX_HEIGHT, _data[0], _m); + + tb_value_max.setFocusHover(active, hover); + tb_value_max.draw(_x + _w - tb_w, _y, tb_w, TEXTBOX_HEIGHT, _data[1], _m); + + var _x0 = _x + tb_w + ui(16); + draw_sprite_stretched(spr, 0, _x0, _y + _h / 2 - ui(4), sw, ui(8)); + + if(stepSize >= 1 && sw / ((maxx - minn) / stepSize) > ui(16)) { + for( var i = minn; i <= maxx; i += stepSize ) { + var _v = round(i / stepSize) * stepSize; + var _cx = _x0 + clamp((_v - minn) / (maxx - minn), 0, 1) * sw; + + draw_sprite_stretched_ext(spr, 4, _cx - ui(4), _y + _h / 2 - ui(4), ui(8), ui(8), COLORS.widget_slider_step, 1); + } + } + + var _slider_x0 = _x0 + clamp((_data[0] - minn) / (maxx - minn), 0, 1) * sw; + var _slider_x1 = _x0 + clamp((_data[1] - minn) / (maxx - minn), 0, 1) * sw; + + draw_sprite_stretched_ext(spr, 4, min(_slider_x0, _slider_x1), _y + _h / 2 - ui(4), abs(_slider_x1 - _slider_x0), ui(8), COLORS._main_accent, 1); + draw_sprite_stretched(spr, 1, _slider_x0 - ui(10), _y, ui(20), _h); + draw_sprite_stretched(spr, 1, _slider_x1 - ui(10), _y, ui(20), _h); + + if(dragging) { + if(dragging_index == 0) + draw_sprite_stretched_ext(spr, 3, _slider_x0 - ui(10), _y, ui(20), _h, COLORS._main_accent, 1); + else if(dragging_index == 1) + draw_sprite_stretched_ext(spr, 3, _slider_x1 - ui(10), _y, ui(20), _h, COLORS._main_accent, 1); + + var val = (dragging.drag_sx - dragging.drag_msx) / dragging.drag_sw * (maxx - minn) + minn; + val = round(val / stepSize) * stepSize; + val = clamp(val, minn, maxx); + if(key_mod_press(CTRL)) + val = round(val); + + if(onModify(dragging_index, val)) + UNDO_HOLDING = true; + + MOUSE_BLOCK = true; + + if(mouse_check_button_pressed(mb_right)) { + onModify(dragging_index, drag_sv); + instance_destroy(dragging); + dragging = noone; + UNDO_HOLDING = false; + + } else if(mouse_release(mb_left)) { + instance_destroy(dragging); + dragging = noone; + UNDO_HOLDING = false; + } + } else if(hover) { + var _hover = -1; + + if(point_in_rectangle(_m[0], _m[1], _slider_x0 - ui(10), _y, _slider_x0 + ui(10), _y + _h)) { + draw_sprite_stretched(spr, 2, _slider_x0 - ui(10), _y, ui(20), _h); + _hover = 0; + } + + if(point_in_rectangle(_m[0], _m[1], _slider_x1 - ui(10), _y, _slider_x1 + ui(10), _y + _h)) { + draw_sprite_stretched(spr, 2, _slider_x1 - ui(10), _y, ui(20), _h); + _hover = 1; + } + + if(_hover > -1 && mouse_press(mb_left, active)) { + dragging = instance_create(0, 0, slider_Slider); + dragging_index = _hover; + dragging.drag_sx = _m[0]; + dragging.drag_msx = _x0; + dragging.drag_sw = sw; + + drag_sv = _data[_hover]; + } + } + + resetFocus(); + + return h; + } #endregion +} \ No newline at end of file diff --git a/scripts/__sliderRange/__sliderRange.yy b/scripts/__sliderRange/__sliderRange.yy new file mode 100644 index 000000000..39cff0875 --- /dev/null +++ b/scripts/__sliderRange/__sliderRange.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "__sliderRange", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "sliders", + "path": "folders/widgets/sliders.yy", + }, +} \ No newline at end of file diff --git a/scripts/biterator/biterator.gml b/scripts/biterator/biterator.gml index 19f92e82a..cb0dd27ab 100644 --- a/scripts/biterator/biterator.gml +++ b/scripts/biterator/biterator.gml @@ -9,14 +9,14 @@ function Biterator(node) : VCT(node) constructor { dimension = VCT_var(VALUE_TYPE.integer, 0); shape = VCT_var(VALUE_TYPE.integer, 0); - shape_par[0] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, { range: [- 8, 8, 1] }); - shape_par[1] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, { range: [- 8, 8, 1] }); - shape_par[2] = VCT_var(VALUE_TYPE.integer, 2).setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 1] }); - shape_par[3] = VCT_var(VALUE_TYPE.integer, 2).setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 1] }); - shape_par[4] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, { range: [ -4, 4, 1] }); - shape_par[5] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, { range: [ -4, 4, 1] }); + shape_par[0] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, { range: [- 8, 8, 0.1] }); + shape_par[1] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, { range: [- 8, 8, 0.1] }); + shape_par[2] = VCT_var(VALUE_TYPE.integer, 2).setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.1] }); + shape_par[3] = VCT_var(VALUE_TYPE.integer, 2).setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.1] }); + shape_par[4] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, { range: [ -4, 4, 0.1] }); + shape_par[5] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, { range: [ -4, 4, 0.1] }); - shape_par[5] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, { range: [ -4, 4, 1] }); + shape_par[5] = VCT_var(VALUE_TYPE.integer, 0).setDisplay(VALUE_DISPLAY.slider, { range: [ -4, 4, 0.1] }); for( var i = 0; i < 3; i++ ) color[i] = VCT_var(VALUE_TYPE.color, c_white); diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index 7454d5aad..7d44921c3 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -41,7 +41,8 @@ HOTKEY_CONTEXT = ds_list_create(); HOTKEY_CONTEXT[| 0] = ""; - globalvar CURSOR, TOOLTIP, DRAGGING, DIALOG_DEPTH_HOVER; + globalvar CURSOR, CURSOR_LOCK, CURSOR_LOCK_X, CURSOR_LOCK_Y; + globalvar TOOLTIP, DRAGGING, DIALOG_DEPTH_HOVER; #endregion #region inputs diff --git a/scripts/mask_function/mask_function.gml b/scripts/mask_function/mask_function.gml index 17486a78d..5dae1a3c4 100644 --- a/scripts/mask_function/mask_function.gml +++ b/scripts/mask_function/mask_function.gml @@ -4,7 +4,7 @@ function __init_mask_modifier(_mask_index) { #region inputs[| _ind + 0] = nodeValue("Invert mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| _ind + 1] = nodeValue("Mask feather", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, { range: [0, 32, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 32, 0.1] }); __mask_index = _mask_index; __mask_mod_index = _ind; diff --git a/scripts/nodeValue_drawer/nodeValue_drawer.gml b/scripts/nodeValue_drawer/nodeValue_drawer.gml index e5af07f0d..53bd88ef6 100644 --- a/scripts/nodeValue_drawer/nodeValue_drawer.gml +++ b/scripts/nodeValue_drawer/nodeValue_drawer.gml @@ -1,10 +1,15 @@ +enum INSP_VIEW_MODE { + compact, + spacious +} + function drawWidgetInit() { anim_toggling = false; anim_hold = noone; visi_hold = noone; min_w = ui(160); - lineBreak = PREFERENCES.inspector_view_default; + viewMode = PREFERENCES.inspector_view_default; tooltip_loop_type = new tooltipSelector(__txtx("panel_animation_looping_mode", "Looping mode"), global.junctionEndName); } @@ -12,9 +17,9 @@ function drawWidgetInit() { 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; - var _font = lineBreak? f_p0 : f_p1; + var _font = viewMode == INSP_VIEW_MODE.spacious? f_p0 : f_p2; - var breakLine = lineBreak || jun.expUse; + var breakLine = viewMode || jun.expUse; var lb_h = line_get_height(_font) + ui(8); var lb_y = yy + lb_h / 2; @@ -130,7 +135,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc return [ 0, true ]; } #endregion - draw_text_add(lb_x, lb_y, _name); + draw_text_over(lb_x, lb_y, _name); #region tooltip if(jun.tooltip != "") { diff --git a/scripts/node_2d_light/node_2d_light.gml b/scripts/node_2d_light/node_2d_light.gml index a24d665f5..3f1fc506a 100644 --- a/scripts/node_2d_light/node_2d_light.gml +++ b/scripts/node_2d_light/node_2d_light.gml @@ -40,13 +40,13 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.vector); inputs[| 8] = nodeValue("Sweep", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 15) - .setDisplay(VALUE_DISPLAY.slider, { range: [-80, 80, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [-80, 80, 0.1] }); inputs[| 9] = nodeValue("Sweep end", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.slider, { range: [-80, 80, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [-80, 80, 0.1] }); inputs[| 10] = nodeValue("Banding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); inputs[| 11] = nodeValue("Attenuation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "Control how light fade out over distance.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Quadratic", s_node_curve, 0), @@ -54,7 +54,7 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) new scrollItem("Linear", s_node_curve, 2), ]); inputs[| 12] = nodeValue("Radial banding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); inputs[| 13] = nodeValue("Radial start", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.rotation); diff --git a/scripts/node_3d_camera/node_3d_camera.gml b/scripts/node_3d_camera/node_3d_camera.gml index 97f3ad14b..bd549c68c 100644 --- a/scripts/node_3d_camera/node_3d_camera.gml +++ b/scripts/node_3d_camera/node_3d_camera.gml @@ -18,7 +18,7 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) global.SKY_SPHERE = new __3dUVSphere(0.5, 16, 8, true); inputs[| in_d3d + 0] = nodeValue("FOV", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 60 ) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 10, 90, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 10, 90, 0.1 ] }); inputs[| in_d3d + 1] = nodeValue("Clipping Distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 10 ] ) .setDisplay(VALUE_DISPLAY.vector); @@ -55,7 +55,7 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) .setDisplay(VALUE_DISPLAY.rotation); inputs[| in_d3d + 13] = nodeValue("Vertical Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 45 ) - .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 0.1] }); inputs[| in_d3d + 14] = nodeValue("Distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4 ); diff --git a/scripts/node_3d_camera_set/node_3d_camera_set.gml b/scripts/node_3d_camera_set/node_3d_camera_set.gml index b9886165c..d891a0af4 100644 --- a/scripts/node_3d_camera_set/node_3d_camera_set.gml +++ b/scripts/node_3d_camera_set/node_3d_camera_set.gml @@ -10,7 +10,7 @@ function Node_3D_Camera_Set(_x, _y, _group = noone) : Node_3D_Camera(_x, _y, _gr inputs[| in_cam + 1] = nodeValue("L1 V angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 45 ) .setName("Vertical angle") - .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 0.1] }); inputs[| in_cam + 2] = nodeValue("L1 Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white ) .setName("Color") @@ -25,7 +25,7 @@ function Node_3D_Camera_Set(_x, _y, _group = noone) : Node_3D_Camera(_x, _y, _gr inputs[| in_cam + 5] = nodeValue("L2 V angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 45 ) .setName("Vertical angle") - .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 0.1] }); inputs[| in_cam + 6] = nodeValue("L2 Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white ) .setName("Color") diff --git a/scripts/node_3dsurf/node_3dsurf.gml b/scripts/node_3dsurf/node_3dsurf.gml index a6553552f..a67a908ed 100644 --- a/scripts/node_3dsurf/node_3dsurf.gml +++ b/scripts/node_3dsurf/node_3dsurf.gml @@ -10,7 +10,7 @@ function Node_3DSurf(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co .setDisplay(VALUE_DISPLAY.vector); inputs[| 2] = nodeValue("Vertical Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 45 ) - .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 90, 0.1] }); inputs[| 3] = nodeValue("Distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4 ); diff --git a/scripts/node_blend/node_blend.gml b/scripts/node_blend/node_blend.gml index 6d42ed7c2..b94d5c48d 100644 --- a/scripts/node_blend/node_blend.gml +++ b/scripts/node_blend/node_blend.gml @@ -56,7 +56,7 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 12] = nodeValue("Invert mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| 13] = nodeValue("Mask feather", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); inputs[| 14] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) .setDisplay(VALUE_DISPLAY.vector); diff --git a/scripts/node_bloom/node_bloom.gml b/scripts/node_bloom/node_bloom.gml index 5194a285e..330070c4a 100644 --- a/scripts/node_bloom/node_bloom.gml +++ b/scripts/node_bloom/node_bloom.gml @@ -3,7 +3,7 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3, "Bloom blur radius.") - .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); inputs[| 2] = nodeValue("Tolerance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5, "How bright a pixel should be to start blooming.") .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_blur/node_blur.gml b/scripts/node_blur/node_blur.gml index 9d6875378..bd38197d1 100644 --- a/scripts/node_blur/node_blur.gml +++ b/scripts/node_blur/node_blur.gml @@ -2,8 +2,8 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons name = "Blur"; inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); - inputs[| 1] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) - .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); + inputs[| 1] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 3) + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 32, 0.1 ] }); inputs[| 2] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); diff --git a/scripts/node_blur_contrast/node_blur_contrast.gml b/scripts/node_blur_contrast/node_blur_contrast.gml index dfe923ddb..bc6b7e945 100644 --- a/scripts/node_blur_contrast/node_blur_contrast.gml +++ b/scripts/node_blur_contrast/node_blur_contrast.gml @@ -4,7 +4,7 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) - .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); inputs[| 2] = nodeValue("Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2, "Brightness different to be blur together.") .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_blur_simple/node_blur_simple.gml b/scripts/node_blur_simple/node_blur_simple.gml index 560ae2d79..a12995519 100644 --- a/scripts/node_blur_simple/node_blur_simple.gml +++ b/scripts/node_blur_simple/node_blur_simple.gml @@ -3,7 +3,7 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) - .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); inputs[| 2] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); diff --git a/scripts/node_blur_slope/node_blur_slope.gml b/scripts/node_blur_slope/node_blur_slope.gml index 2c27a5993..ad487d6c0 100644 --- a/scripts/node_blur_slope/node_blur_slope.gml +++ b/scripts/node_blur_slope/node_blur_slope.gml @@ -4,7 +4,7 @@ function Node_Blur_Slope(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4) - .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }) + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 32, 0.1 ] }) .setMappable(9); inputs[| 2] = nodeValue("Slope Map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); diff --git a/scripts/node_canvas/node_canvas.gml b/scripts/node_canvas/node_canvas.gml index 7e710ec25..3f2837f7d 100644 --- a/scripts/node_canvas/node_canvas.gml +++ b/scripts/node_canvas/node_canvas.gml @@ -7,7 +7,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor inputs[| 1] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white ); inputs[| 2] = nodeValue("Brush size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 ) - .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); inputs[| 3] = nodeValue("Fill threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_color_adjust/node_color_adjust.gml b/scripts/node_color_adjust/node_color_adjust.gml index 7069499ab..7cd2e7d20 100644 --- a/scripts/node_color_adjust/node_color_adjust.gml +++ b/scripts/node_color_adjust/node_color_adjust.gml @@ -58,7 +58,7 @@ function Node_Color_adjust(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 16] = nodeValue("Invert mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| 17] = nodeValue("Mask feather", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); //////////////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/node_color_hsv/node_color_hsv.gml b/scripts/node_color_hsv/node_color_hsv.gml index 9b66f3564..2d0f34af9 100644 --- a/scripts/node_color_hsv/node_color_hsv.gml +++ b/scripts/node_color_hsv/node_color_hsv.gml @@ -53,16 +53,16 @@ function Node_Color_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 4].setDisplay(VALUE_DISPLAY.slider); } else { inputs[| 0].setType(VALUE_TYPE.integer); - inputs[| 0].setDisplay(VALUE_DISPLAY.slider, { range: [0, 360, 1] }); + inputs[| 0].setDisplay(VALUE_DISPLAY.slider, { range: [0, 360, 0.1] }); inputs[| 1].setType(VALUE_TYPE.integer); - inputs[| 1].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 1] }); + inputs[| 1].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); inputs[| 2].setType(VALUE_TYPE.integer); - inputs[| 2].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 1] }); + inputs[| 2].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); inputs[| 4].setType(VALUE_TYPE.integer); - inputs[| 4].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 1] }); + inputs[| 4].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); } } } #endregion diff --git a/scripts/node_color_rgb/node_color_rgb.gml b/scripts/node_color_rgb/node_color_rgb.gml index c6f936267..53e9fcf63 100644 --- a/scripts/node_color_rgb/node_color_rgb.gml +++ b/scripts/node_color_rgb/node_color_rgb.gml @@ -42,16 +42,16 @@ function Node_Color_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 4].setDisplay(VALUE_DISPLAY.slider); } else { inputs[| 0].setType(VALUE_TYPE.integer); - inputs[| 0].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 1] }); + inputs[| 0].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); inputs[| 1].setType(VALUE_TYPE.integer); - inputs[| 1].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 1] }); + inputs[| 1].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); inputs[| 2].setType(VALUE_TYPE.integer); - inputs[| 2].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 1] }); + inputs[| 2].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); inputs[| 4].setType(VALUE_TYPE.integer); - inputs[| 4].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 1] }); + inputs[| 4].setDisplay(VALUE_DISPLAY.slider, { range: [0, 255, 0.1] }); } } } #endregion diff --git a/scripts/node_corner/node_corner.gml b/scripts/node_corner/node_corner.gml index d91ddb911..7af8d8de6 100644 --- a/scripts/node_corner/node_corner.gml +++ b/scripts/node_corner/node_corner.gml @@ -4,7 +4,7 @@ function Node_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2) - .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 0.1] }); inputs[| 2] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); diff --git a/scripts/node_export/node_export.gml b/scripts/node_export/node_export.gml index 1fc109a3c..2c5c71f29 100644 --- a/scripts/node_export/node_export.gml +++ b/scripts/node_export/node_export.gml @@ -102,13 +102,13 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor .rejectArray(); inputs[| 10] = nodeValue("Quality", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 23) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 100, 1 ] }) + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 100, 0.1 ] }) .rejectArray(); inputs[| 11] = nodeValue("Sequence begin", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); inputs[| 12] = nodeValue("Frame range", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, -1]) - .setDisplay(VALUE_DISPLAY.slider_range, { range: [0, TOTAL_FRAMES, 1] }); + .setDisplay(VALUE_DISPLAY.slider_range, { range: [0, TOTAL_FRAMES, 0.1] }); png_format = [ "INDEX4", "INDEX8", "Default (PNG32)" ]; inputs[| 13] = nodeValue("Subformat", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2) diff --git a/scripts/node_flow_noise/node_flow_noise.gml b/scripts/node_flow_noise/node_flow_noise.gml index 6b320ea2e..913e8e19b 100644 --- a/scripts/node_flow_noise/node_flow_noise.gml +++ b/scripts/node_flow_noise/node_flow_noise.gml @@ -15,7 +15,7 @@ function Node_Flow_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, addShaderProp(SHADER_UNIFORM.float, "progress"); inputs[| 4] = nodeValue("Detail", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 1, 8 ]) - .setDisplay(VALUE_DISPLAY.slider_range, { range: [ 1, 16, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider_range, { range: [ 1, 16, 0.1 ] }); addShaderProp(SHADER_UNIFORM.float, "detail"); input_display_list = [ diff --git a/scripts/node_fold_noise/node_fold_noise.gml b/scripts/node_fold_noise/node_fold_noise.gml index 2d342a0da..3d9f77b29 100644 --- a/scripts/node_fold_noise/node_fold_noise.gml +++ b/scripts/node_fold_noise/node_fold_noise.gml @@ -12,7 +12,7 @@ function Node_Fold_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, addShaderProp(SHADER_UNIFORM.float, "scale"); inputs[| 3] = nodeValue("Iteration", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 6, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 6, 0.1] }); addShaderProp(SHADER_UNIFORM.integer, "iteration"); inputs[| 4] = nodeValue("Stretch", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2); diff --git a/scripts/node_glow/node_glow.gml b/scripts/node_glow/node_glow.gml index 1947b4a55..a62c35182 100644 --- a/scripts/node_glow/node_glow.gml +++ b/scripts/node_glow/node_glow.gml @@ -4,10 +4,10 @@ function Node_Glow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Border", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, { range: [0, 4, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 4, 0.1] }); inputs[| 2] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) - .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); inputs[| 3] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ]}); diff --git a/scripts/node_gradient_points/node_gradient_points.gml b/scripts/node_gradient_points/node_gradient_points.gml index d3848c536..5b7423792 100644 --- a/scripts/node_gradient_points/node_gradient_points.gml +++ b/scripts/node_gradient_points/node_gradient_points.gml @@ -30,16 +30,16 @@ function Node_Gradient_Points(_x, _y, _group = noone) : Node_Processor(_x, _y, _ .setDisplay(VALUE_DISPLAY.palette); inputs[| 11] = nodeValue("Falloff 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 6 ) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 0.1 ] }); inputs[| 12] = nodeValue("Falloff 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 6 ) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 0.1 ] }); inputs[| 13] = nodeValue("Falloff 3", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 6 ) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 0.1 ] }); inputs[| 14] = nodeValue("Falloff 4", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 6 ) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 32, 0.1 ] }); inputs[| 15] = nodeValue("Normalize weight", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false ) diff --git a/scripts/node_line/node_line.gml b/scripts/node_line/node_line.gml index 052f268fe..f539f5c6f 100644 --- a/scripts/node_line/node_line.gml +++ b/scripts/node_line/node_line.gml @@ -7,7 +7,7 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 1] = nodeValue("Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| 2] = nodeValue("Segment", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); inputs[| 3] = nodeValue("Width", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 2, 2 ]) .setDisplay(VALUE_DISPLAY.vector); @@ -39,7 +39,7 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 13] = nodeValue("Round cap", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| 14] = nodeValue("Round segment", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4) - .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 0.1] }); inputs[| 15] = nodeValue("Span color over path", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Apply the full 'color over length' to the trimmed path."); diff --git a/scripts/node_local_analyze/node_local_analyze.gml b/scripts/node_local_analyze/node_local_analyze.gml index a031f5045..a95a87575 100644 --- a/scripts/node_local_analyze/node_local_analyze.gml +++ b/scripts/node_local_analyze/node_local_analyze.gml @@ -7,7 +7,7 @@ function Node_Local_Analyze(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Average (Blur)", "Maximum", "Minimum" ]); inputs[| 2] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) - .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 16, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 1, 16, 0.1] }); inputs[| 3] = nodeValue("Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "How to deal with pixel outside the surface.\n - Empty: Use empty pixel\n - Clamp: Repeat edge pixel\n - Repeat: Repeat texture.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]); diff --git a/scripts/node_mesh_warp/node_mesh_warp.gml b/scripts/node_mesh_warp/node_mesh_warp.gml index 151c64120..770f937b7 100644 --- a/scripts/node_mesh_warp/node_mesh_warp.gml +++ b/scripts/node_mesh_warp/node_mesh_warp.gml @@ -205,7 +205,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 8, "Amount of grid subdivision. Higher number means more grid, detail.") - .setDisplay(VALUE_DISPLAY.slider, { range: [ 2, 32, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [ 2, 32, 0.1 ] }); inputs[| 2] = nodeValue("Spring Force", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_mk_blinker/node_mk_blinker.gml b/scripts/node_mk_blinker/node_mk_blinker.gml index 7ae3407bb..2b06bd44a 100644 --- a/scripts/node_mk_blinker/node_mk_blinker.gml +++ b/scripts/node_mk_blinker/node_mk_blinker.gml @@ -25,7 +25,7 @@ function Node_MK_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group inputs[| 8] = nodeValue("Glow", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| 9] = nodeValue("Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4 ) - .setDisplay(VALUE_DISPLAY.slider, { range : [ 1, 8, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider, { range : [ 1, 8, 0.1 ] }); inputs[| 10] = nodeValue("Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 ) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_noise_simplex/node_noise_simplex.gml b/scripts/node_noise_simplex/node_noise_simplex.gml index bcf1ccc00..092c5cf09 100644 --- a/scripts/node_noise_simplex/node_noise_simplex.gml +++ b/scripts/node_noise_simplex/node_noise_simplex.gml @@ -12,7 +12,7 @@ function Node_Noise_Simplex(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .setMappable(8); inputs[| 3] = nodeValue("Iteration", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 ) - .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 1] }) + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }) .setMappable(9); inputs[| 4] = nodeValue("Color mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) diff --git a/scripts/node_onion_skin/node_onion_skin.gml b/scripts/node_onion_skin/node_onion_skin.gml index 4b6c924c0..3fd750dee 100644 --- a/scripts/node_onion_skin/node_onion_skin.gml +++ b/scripts/node_onion_skin/node_onion_skin.gml @@ -6,7 +6,7 @@ function Node_Onion_Skin(_x, _y, _group = noone) : Node(_x, _y, _group) construc inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); inputs[| 1] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [-1, 1]) - .setDisplay(VALUE_DISPLAY.slider_range, { range: [ -16, 16, 1 ] }); + .setDisplay(VALUE_DISPLAY.slider_range, { range: [ -16, 16, 0.1 ] }); inputs[| 2] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_palette_shift/node_palette_shift.gml b/scripts/node_palette_shift/node_palette_shift.gml index 708d23e49..594b8e302 100644 --- a/scripts/node_palette_shift/node_palette_shift.gml +++ b/scripts/node_palette_shift/node_palette_shift.gml @@ -7,7 +7,7 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .setDisplay(VALUE_DISPLAY.palette); inputs[| 2] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [-1, 1, 0.1] }); inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); diff --git a/scripts/node_posterize/node_posterize.gml b/scripts/node_posterize/node_posterize.gml index daf0de761..919ad3721 100644 --- a/scripts/node_posterize/node_posterize.gml +++ b/scripts/node_posterize/node_posterize.gml @@ -9,7 +9,7 @@ function Node_Posterize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 2] = nodeValue("Use palette", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); inputs[| 3] = nodeValue("Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4) - .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [2, 16, 0.1] }); inputs[| 4] = nodeValue("Gamma", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.6) .setDisplay(VALUE_DISPLAY.slider) diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index c24017d00..ddbafd385 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -273,7 +273,7 @@ function __initNodes() { var favPath = DIRECTORY + "Nodes/fav.json"; global.FAV_NODES = file_exists_empty(favPath)? json_load_struct(favPath) : []; if(!is_array(global.FAV_NODES)) global.FAV_NODES = []; - + var recPath = DIRECTORY + "Nodes/recent.json"; global.RECENT_NODES = file_exists_empty(recPath)? json_load_struct(recPath) : []; if(!is_array(global.RECENT_NODES)) global.RECENT_NODES = []; diff --git a/scripts/node_sampler/node_sampler.gml b/scripts/node_sampler/node_sampler.gml index a677a48bf..491ab2c15 100644 --- a/scripts/node_sampler/node_sampler.gml +++ b/scripts/node_sampler/node_sampler.gml @@ -9,7 +9,7 @@ function Node_Sampler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c .setUnitRef(function(index) { return getDimension(index); }); inputs[| 2] = nodeValue("Sampling size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1, "Size of square around the position to sample and average pixel color.") - .setDisplay(VALUE_DISPLAY.slider, { range: [1, 3, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 3, 0.1] }); inputs[| 3] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); diff --git a/scripts/node_shadow/node_shadow.gml b/scripts/node_shadow/node_shadow.gml index 416c7a1ba..0b9d4c8df 100644 --- a/scripts/node_shadow/node_shadow.gml +++ b/scripts/node_shadow/node_shadow.gml @@ -12,10 +12,10 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co .setUnitRef(function(index) { return getDimension(index); }); inputs[| 4] = nodeValue("Grow", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) - .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); inputs[| 5] = nodeValue("Blur", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3) - .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); inputs[| 6] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); diff --git a/scripts/node_shadow_cast/node_shadow_cast.gml b/scripts/node_shadow_cast/node_shadow_cast.gml index f7404559f..7c88b0d36 100644 --- a/scripts/node_shadow_cast/node_shadow_cast.gml +++ b/scripts/node_shadow_cast/node_shadow_cast.gml @@ -25,7 +25,7 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }); inputs[| 4] = nodeValue("Light density", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1) - .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 16, 0.1] }); inputs[| 5] = nodeValue("Light type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Point", s_node_shadow_type, 0), @@ -48,7 +48,7 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou .setDisplay(VALUE_DISPLAY.slider, { range: [0, 2, 0.01] }); inputs[| 13] = nodeValue("Banding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); inputs[| 14] = nodeValue("Attenuation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "Control how light fade out over distance.") .setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Quadratic", s_node_curve, 0), @@ -56,7 +56,7 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou new scrollItem("Linear", s_node_curve, 2), ]); inputs[| 15] = nodeValue("Ambient occlusion", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) - .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [0, 16, 0.1] }); inputs[| 16] = nodeValue("Ambient occlusion strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.01] }); diff --git a/scripts/node_shape_polygon/node_shape_polygon.gml b/scripts/node_shape_polygon/node_shape_polygon.gml index 4875d3ca8..4f184685d 100644 --- a/scripts/node_shape_polygon/node_shape_polygon.gml +++ b/scripts/node_shape_polygon/node_shape_polygon.gml @@ -27,7 +27,7 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); inputs[| 8] = nodeValue("Sides", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 16) - .setDisplay(VALUE_DISPLAY.slider, { range: [2, 64, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [2, 64, 0.1] }); inputs[| 9] = nodeValue("Inner radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider); @@ -36,7 +36,7 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr .setDisplay(VALUE_DISPLAY.slider); inputs[| 11] = nodeValue("Teeth", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 6) - .setDisplay(VALUE_DISPLAY.slider, { range: [3, 16, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [3, 16, 0.1] }); inputs[| 12] = nodeValue("Teeth height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) .setDisplay(VALUE_DISPLAY.slider); diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index af207f8a5..5c3120fee 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -880,9 +880,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru switch(display_type) { case VALUE_DISPLAY._default : #region - editWidget = new textBox(_txt, function(val) { - return setValueInspector(val); - } ); + editWidget = new textBox(_txt, function(val) { return setValueInspector(val); } ); editWidget.slidable = true; if(type == VALUE_TYPE.integer) editWidget.setSlidable(); @@ -995,10 +993,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru case VALUE_DISPLAY.slider : #region var _range = struct_try_get(display_data, "range", [ 0, 1, 0.01 ]); - editWidget = new slider(_range[0], _range[1], _range[2], function(val) { - return setValueInspector(toNumber(val)); - } ); - if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10); + editWidget = new textBox(TEXTBOX_INPUT.number, function(val) { return setValueInspector(toNumber(val)); } ) + .setSlidable(_range[2], type == VALUE_TYPE.integer, [ _range[0], _range[1] ]); if(struct_has(display_data, "update_stat")) editWidget.update_stat = display_data.update_stat; @@ -1008,10 +1004,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru case VALUE_DISPLAY.slider_range : #region var _range = struct_try_get(display_data, "range", [ 0, 1, 0.01 ]); - editWidget = new sliderRange(_range[0], _range[1], _range[2], function(index, val) { - return setValueInspector(val, index); - } ); - if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10); + editWidget = new sliderRange(_range[2], type == VALUE_TYPE.integer, [ _range[0], _range[1] ], + function(index, val) { return setValueInspector(val, index); } ); for( var i = 0, n = array_length(animators); i < n; i++ ) animators[i].suffix = " " + array_safe_get(global.displaySuffix_Range, i); diff --git a/scripts/node_wiggler/node_wiggler.gml b/scripts/node_wiggler/node_wiggler.gml index 14bbc2a14..66b0fa023 100644 --- a/scripts/node_wiggler/node_wiggler.gml +++ b/scripts/node_wiggler/node_wiggler.gml @@ -8,7 +8,7 @@ function Node_Wiggler(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c .setDisplay(VALUE_DISPLAY.vector); inputs[| 1] = nodeValue("Frequency", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4 ) - .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 1] }); + .setDisplay(VALUE_DISPLAY.slider, { range: [1, 32, 0.1] }); inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, irandom_range(1000000, 9999999) ); diff --git a/scripts/panel_inspector/panel_inspector.gml b/scripts/panel_inspector/panel_inspector.gml index 0aa09a3b2..be2e80f91 100644 --- a/scripts/panel_inspector/panel_inspector.gml +++ b/scripts/panel_inspector/panel_inspector.gml @@ -529,7 +529,7 @@ function Panel_Inspector() : PanelContent() constructor { var txt = __txt(jun_disp[0]); var coll = jun_disp[1] && filter_text == ""; - var lbh = lineBreak? ui(32) : ui(26); + var lbh = viewMode? ui(32) : ui(26); var togl = array_safe_get(jun_disp, 2, noone); if(togl != noone) var toging = _inspecting.getInputData(togl); @@ -570,11 +570,11 @@ function Panel_Inspector() : PanelContent() constructor { } draw_set_alpha(aa); - draw_set_text(lineBreak? f_p0 : f_p1, fa_left, fa_center, COLORS._main_text); + draw_set_text(viewMode? f_p0 : f_p1, fa_left, fa_center, COLORS._main_text); draw_text_add(ltx, yy + lbh / 2, txt); draw_set_alpha(1); - hh += lbh + ui(lineBreak? 8 : 6) + pad; + hh += lbh + ui(viewMode? 8 : 6) + pad; if(coll) { // skip _colsp = true; @@ -628,7 +628,7 @@ function Panel_Inspector() : PanelContent() constructor { } #region ++++ draw widget ++++ - var _font = lineBreak? f_p0 : f_p1; + var _font = viewMode == INSP_VIEW_MODE.spacious? f_p0 : f_p2; var lb_h = line_get_height(_font) + ui(8); var lb_w = line_get_width(jun.getName(), _font) + ui(16); @@ -646,7 +646,7 @@ function Panel_Inspector() : PanelContent() constructor { hh += lb_h + widH + padd; var _selY1 = yy + lb_h + widH + ui(2); - var _selH = _selY1 - _selY + (lineBreak * ui(4)); + var _selH = _selY1 - _selY + (viewMode * ui(4)); if(jun == prop_highlight && prop_highlight_time) { if(prop_highlight_time == 60) @@ -858,10 +858,10 @@ function Panel_Inspector() : PanelContent() constructor { } by += ui(36); - view_mode_tooltip.index = lineBreak; - if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, view_mode_tooltip, THEME.inspector_view, lineBreak) == 2) { - lineBreak = !lineBreak; - PREFERENCES.inspector_view_default = lineBreak; + view_mode_tooltip.index = viewMode; + if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, view_mode_tooltip, THEME.inspector_view, viewMode) == 2) { + viewMode = !viewMode; + PREFERENCES.inspector_view_default = viewMode; } //////////////////////////////////////////////////////////////////// INSPECTOR ACTIONS //////////////////////////////////////////////////////////////////// diff --git a/scripts/slider/slider.yy b/scripts/slider/slider.yy index 176cd9132..7c19318aa 100644 --- a/scripts/slider/slider.yy +++ b/scripts/slider/slider.yy @@ -5,7 +5,7 @@ "isCompatibility": false, "isDnD": false, "parent": { - "name": "widgets", - "path": "folders/widgets.yy", + "name": "sliders", + "path": "folders/widgets/sliders.yy", }, } \ No newline at end of file diff --git a/scripts/sliderRange/sliderRange.gml b/scripts/sliderRange/sliderRange.gml index 33f27d080..f53804916 100644 --- a/scripts/sliderRange/sliderRange.gml +++ b/scripts/sliderRange/sliderRange.gml @@ -1,19 +1,16 @@ -function sliderRange(_min, _max, _step, _onModify) : widget() constructor { - minn = _min; - maxx = _max; - stepSize = _step; +function sliderRange(_step, _int, _range, _onModify) : widget() constructor { + slide_range = _range; + curr_range = [ _range[0], _range[1] ]; + stepSize = _step; + isInt = _int; - spr = THEME.slider; onModify = _onModify; - dragging = noone; - drag_sv = 0; + tb_value_min = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(0, clamp(val, curr_range[0], curr_range[1])); }).setSlidable(_step, _int, _range); + tb_value_max = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(1, clamp(val, curr_range[0], curr_range[1])); }).setSlidable(_step, _int, _range); - tb_value_min = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(0, clamp(val, minn, maxx)); }); - tb_value_max = new textBox(TEXTBOX_INPUT.number, function(val) { return onModify(1, clamp(val, minn, maxx)); }); - - tb_value_min.slidable = true; - tb_value_max.slidable = true; + tb_value_min.hide = true; + tb_value_max.hide = true; static setSlideSpeed = function(speed) { #region tb_value_min.setSlidable(speed); @@ -43,87 +40,37 @@ function sliderRange(_min, _max, _step, _onModify) : widget() constructor { if(!is_real(_data[0])) return h; if(!is_real(_data[1])) return h; - var tb_w = ui(64); - var sw = _w - (tb_w + ui(16)) * 2; + draw_sprite_stretched_ext(THEME.textbox, 3, _x, _y, _w, _h, c_white, 1); + + var _minn = slide_range[0]; + var _maxx = slide_range[1]; + var _rang = abs(_maxx - _minn); + var _currMin = min(_data[0], _data[1]); + var _currMax = max(_data[0], _data[1]); + + if(tb_value_min.sliding != 2 && tb_value_max.sliding != 2) { + curr_range[0] = (_currMin >= _minn)? _minn : _minn - ceil(abs(_currMin - _minn) / _rang) * _rang; + curr_range[1] = (_currMax <= _maxx)? _maxx : _maxx + ceil(abs(_currMax - _maxx) / _rang) * _rang; + } + + var lx = _w * (_currMin - curr_range[0]) / (curr_range[1] - curr_range[0]); + var lw = _w * ((_currMax - _currMin) - curr_range[0]) / (curr_range[1] - curr_range[0]); + + draw_sprite_stretched_ext(THEME.textbox, 4, _x + lx, _y, lw, _h, c_white, 1); + + var tb_w = _w / 2; + + if(tb_value_min.selecting || tb_value_max.selecting) { + draw_sprite_stretched_ext(THEME.textbox, 1, _x, _y, _w, _h, c_white, 1); + } else { + draw_sprite_stretched_ext(THEME.textbox, 0, _x, _y, _w, _h, c_white, 0.5 + 0.5 * interactable); + } tb_value_min.setFocusHover(active, hover); - tb_value_min.draw(_x, _y, tb_w, TEXTBOX_HEIGHT, _data[0], _m); + tb_value_min.draw(_x, _y, tb_w, _h, _data[0], _m); tb_value_max.setFocusHover(active, hover); - tb_value_max.draw(_x + _w - tb_w, _y, tb_w, TEXTBOX_HEIGHT, _data[1], _m); - - var _x0 = _x + tb_w + ui(16); - draw_sprite_stretched(spr, 0, _x0, _y + _h / 2 - ui(4), sw, ui(8)); - - if(stepSize >= 1 && sw / ((maxx - minn) / stepSize) > ui(16)) { - for( var i = minn; i <= maxx; i += stepSize ) { - var _v = round(i / stepSize) * stepSize; - var _cx = _x0 + clamp((_v - minn) / (maxx - minn), 0, 1) * sw; - - draw_sprite_stretched_ext(spr, 4, _cx - ui(4), _y + _h / 2 - ui(4), ui(8), ui(8), COLORS.widget_slider_step, 1); - } - } - - var _slider_x0 = _x0 + clamp((_data[0] - minn) / (maxx - minn), 0, 1) * sw; - var _slider_x1 = _x0 + clamp((_data[1] - minn) / (maxx - minn), 0, 1) * sw; - - draw_sprite_stretched_ext(spr, 4, min(_slider_x0, _slider_x1), _y + _h / 2 - ui(4), abs(_slider_x1 - _slider_x0), ui(8), COLORS._main_accent, 1); - draw_sprite_stretched(spr, 1, _slider_x0 - ui(10), _y, ui(20), _h); - draw_sprite_stretched(spr, 1, _slider_x1 - ui(10), _y, ui(20), _h); - - if(dragging) { - if(dragging_index == 0) - draw_sprite_stretched_ext(spr, 3, _slider_x0 - ui(10), _y, ui(20), _h, COLORS._main_accent, 1); - else if(dragging_index == 1) - draw_sprite_stretched_ext(spr, 3, _slider_x1 - ui(10), _y, ui(20), _h, COLORS._main_accent, 1); - - var val = (dragging.drag_sx - dragging.drag_msx) / dragging.drag_sw * (maxx - minn) + minn; - val = round(val / stepSize) * stepSize; - val = clamp(val, minn, maxx); - if(key_mod_press(CTRL)) - val = round(val); - - if(onModify(dragging_index, val)) - UNDO_HOLDING = true; - - MOUSE_BLOCK = true; - - if(mouse_check_button_pressed(mb_right)) { - onModify(dragging_index, drag_sv); - instance_destroy(dragging); - dragging = noone; - UNDO_HOLDING = false; - - } else if(mouse_release(mb_left)) { - instance_destroy(dragging); - dragging = noone; - UNDO_HOLDING = false; - } - } else if(hover) { - var _hover = -1; - - if(point_in_rectangle(_m[0], _m[1], _slider_x0 - ui(10), _y, _slider_x0 + ui(10), _y + _h)) { - draw_sprite_stretched(spr, 2, _slider_x0 - ui(10), _y, ui(20), _h); - _hover = 0; - } - - if(point_in_rectangle(_m[0], _m[1], _slider_x1 - ui(10), _y, _slider_x1 + ui(10), _y + _h)) { - draw_sprite_stretched(spr, 2, _slider_x1 - ui(10), _y, ui(20), _h); - _hover = 1; - } - - if(_hover > -1 && mouse_press(mb_left, active)) { - dragging = instance_create(0, 0, slider_Slider); - dragging_index = _hover; - dragging.drag_sx = _m[0]; - dragging.drag_msx = _x0; - dragging.drag_sw = sw; - - drag_sv = _data[_hover]; - } - } - - resetFocus(); + tb_value_max.draw(_x + tb_w, _y, tb_w, _h, _data[1], _m); return h; } #endregion diff --git a/scripts/sliderRange/sliderRange.yy b/scripts/sliderRange/sliderRange.yy index 5e4090d31..6340c6f4b 100644 --- a/scripts/sliderRange/sliderRange.yy +++ b/scripts/sliderRange/sliderRange.yy @@ -5,7 +5,7 @@ "isCompatibility": false, "isDnD": false, "parent": { - "name": "widgets", - "path": "folders/widgets.yy", + "name": "sliders", + "path": "folders/widgets/sliders.yy", }, } \ No newline at end of file diff --git a/scripts/textBox/textBox.gml b/scripts/textBox/textBox.gml index 91adbafcf..17b3da015 100644 --- a/scripts/textBox/textBox.gml +++ b/scripts/textBox/textBox.gml @@ -4,7 +4,7 @@ enum TEXTBOX_INPUT { } function textBox(_input, _onModify) : textInput(_input, _onModify) constructor { - align = _input == TEXTBOX_INPUT.number? fa_right : fa_left; + align = _input == TEXTBOX_INPUT.number? fa_center : fa_left; hide = false; font = noone; color = COLORS._main_text; @@ -18,9 +18,9 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor { slidable = false; sliding = false; slide_int = false; - slide_sv = 0; slide_speed = 1 / 10; slide_range = noone; + curr_range = [ 0, 1 ]; label = ""; @@ -402,7 +402,25 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor { text_surface = surface_verify(text_surface, _w - ui(16), _h); - if(!hide) draw_sprite_stretched_ext(THEME.textbox, 3, _x, _y, _w, _h, boxColor, 1); + if(!hide) { + draw_sprite_stretched_ext(THEME.textbox, 3, _x, _y, _w, _h, boxColor, 1); + + if(slide_range != noone) { + var _minn = slide_range[0]; + var _maxx = slide_range[1]; + var _rang = abs(_maxx - _minn); + var _currVal = toNumber(_current_text); + + if(sliding != 2) { + curr_range[0] = (_currVal >= _minn)? _minn : _minn - ceil(abs(_currVal - _minn) / _rang) * _rang; + curr_range[1] = (_currVal <= _maxx)? _maxx : _maxx + ceil(abs(_currVal - _maxx) / _rang) * _rang; + } + + var lw = _w * (_currVal - curr_range[0]) / (curr_range[1] - curr_range[0]); + draw_sprite_stretched_ext(THEME.textbox, 4, _x, _y, lw, _h, boxColor, 1); + } + } + disp_x = lerp_float(disp_x, disp_x_to, 5); var hoverRect = point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h); @@ -545,12 +563,12 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor { draw_sprite_stretched_ext(THEME.textbox, 0, _x, _y, _w, _h, boxColor, 0.5 + 0.5 * interactable); if(slidable) { - if(_w > ui(64) && _h >= TEXTBOX_HEIGHT && label == "") - draw_sprite_ui_uniform(THEME.text_slider, 0, _x + ui(20), _y + _h / 2, 1, COLORS._main_icon, 0.5); + //if(_w > ui(64) && _h >= TEXTBOX_HEIGHT && label == "") + // draw_sprite_ui_uniform(THEME.text_slider, 0, _x + ui(20), _y + _h / 2, 1, COLORS._main_icon, 0.5); if(hover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h) && mouse_press(mb_left, active)) { sliding = 1; - + slide_mx = _m[0]; slide_my = _m[1]; } @@ -573,18 +591,17 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor { } #endregion if(sliding > 0) { #region - var dx = _m[0] - slide_mx; - var dy = _m[1] - slide_my; - if(sliding == 1 && (abs(dx) > 8 || abs(dy) > 8)) { + if(sliding == 1 && window_mouse_get_delta_x() != 0) { + deactivate(); + textBox_slider.activate(toNumber(_input_text)); sliding = 2; - slide_sv = toNumber(_input_text); - textBox_slider.activate() } if(sliding == 2) { textBox_slider.tb = self; - if(mouse_release(mb_left)) deactivate(); + if(mouse_release(mb_left)) + deactivate(); } if(mouse_release(mb_left)) {