diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index a00175057..01ddca2a5 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -13,8 +13,7 @@ {"name":"preview","order":7,"path":"folders/dialog/preview.yy",}, {"name":"widget","order":9,"path":"folders/dialog/widget.yy",}, {"name":"Extensions","order":9,"path":"folders/Extensions.yy",}, - {"name":"Gameframe","order":5,"path":"folders/Extensions/Gameframe.yy",}, - {"name":"MAC","order":13,"path":"folders/Extensions/MAC.yy",}, + {"name":"MAC","order":7,"path":"folders/Extensions/MAC.yy",}, {"name":"font","order":7,"path":"folders/font.yy",}, {"name":"functions","order":6,"path":"folders/functions.yy",}, {"name":"animation","order":19,"path":"folders/functions/animation.yy",}, @@ -109,6 +108,7 @@ {"name":"texts","order":49,"path":"folders/nodes/icons/value/texts.yy",}, {"name":"VFX","order":134,"path":"folders/nodes/icons/VFX.yy",}, {"name":"panels","order":2,"path":"folders/panels.yy",}, + {"name":"colors","order":5,"path":"folders/panels/colors.yy",}, {"name":"graph","order":1,"path":"folders/panels/graph.yy",}, {"name":"inspectors","order":2,"path":"folders/panels/inspectors.yy",}, {"name":"components","order":3,"path":"folders/panels/inspectors/components.yy",}, @@ -122,6 +122,7 @@ {"name":"blend","order":18,"path":"folders/shader/blend.yy",}, {"name":"blur","order":38,"path":"folders/shader/blur.yy",}, {"name":"channels","order":42,"path":"folders/shader/channels.yy",}, + {"name":"color selector","order":51,"path":"folders/shader/color selector.yy",}, {"name":"draw","order":39,"path":"folders/shader/draw.yy",}, {"name":"filter","order":30,"path":"folders/shader/filter.yy",}, {"name":"shadow caster","order":46,"path":"folders/shader/filter/shadow caster.yy",}, @@ -139,7 +140,7 @@ "ResourceOrderSettings": [ {"name":"s_node_corner","order":14,"path":"sprites/s_node_corner/s_node_corner.yy",}, {"name":"sh_cell_noise_crystal","order":23,"path":"shaders/sh_cell_noise_crystal/sh_cell_noise_crystal.yy",}, - {"name":"panel_function","order":5,"path":"scripts/panel_function/panel_function.yy",}, + {"name":"panel_function","order":2,"path":"scripts/panel_function/panel_function.yy",}, {"name":"node_time_remap","order":3,"path":"scripts/node_time_remap/node_time_remap.yy",}, {"name":"sh_perlin","order":1,"path":"shaders/sh_perlin/sh_perlin.yy",}, {"name":"node_tool","order":10,"path":"scripts/node_tool/node_tool.yy",}, @@ -215,7 +216,7 @@ {"name":"fd_rectangle_set_velocity_time_step","order":17,"path":"scripts/fd_rectangle_set_velocity_time_step/fd_rectangle_set_velocity_time_step.yy",}, {"name":"fd_rectangle_set_collision_mask_sprite","order":1,"path":"scripts/fd_rectangle_set_collision_mask_sprite/fd_rectangle_set_collision_mask_sprite.yy",}, {"name":"sh_flip","order":7,"path":"shaders/sh_flip/sh_flip.yy",}, - {"name":"libdlgmodule","order":9,"path":"extensions/libdlgmodule/libdlgmodule.yy",}, + {"name":"libdlgmodule","order":3,"path":"extensions/libdlgmodule/libdlgmodule.yy",}, {"name":"s_node_alpha_grey","order":2,"path":"sprites/s_node_alpha_grey/s_node_alpha_grey.yy",}, {"name":"fd_rectangle_set_pressure_iteration_type","order":10,"path":"scripts/fd_rectangle_set_pressure_iteration_type/fd_rectangle_set_pressure_iteration_type.yy",}, {"name":"_f_h1","order":11,"path":"fonts/_f_h1/_f_h1.yy",}, @@ -258,7 +259,7 @@ {"name":"node_path_reverse","order":8,"path":"scripts/node_path_reverse/node_path_reverse.yy",}, {"name":"fd_rectangle_get_acceleration_y","order":3,"path":"scripts/fd_rectangle_get_acceleration_y/fd_rectangle_get_acceleration_y.yy",}, {"name":"sh_simplex","order":22,"path":"shaders/sh_simplex/sh_simplex.yy",}, - {"name":"libborderless","order":8,"path":"extensions/libborderless/libborderless.yy",}, + {"name":"libborderless","order":2,"path":"extensions/libborderless/libborderless.yy",}, {"name":"node_noise_grid_tri","order":25,"path":"scripts/node_noise_grid_tri/node_noise_grid_tri.yy",}, {"name":"node_threshold","order":9,"path":"scripts/node_threshold/node_threshold.yy",}, {"name":"sh_cell_noise_edge","order":5,"path":"shaders/sh_cell_noise_edge/sh_cell_noise_edge.yy",}, @@ -398,7 +399,7 @@ {"name":"s_node_invert","order":25,"path":"sprites/s_node_invert/s_node_invert.yy",}, {"name":"draw_text_delimiter","order":14,"path":"scripts/draw_text_delimiter/draw_text_delimiter.yy",}, {"name":"node_array_get","order":10,"path":"scripts/node_array_get/node_array_get.yy",}, - {"name":"Apollo","order":12,"path":"extensions/Apollo/Apollo.yy",}, + {"name":"Apollo","order":6,"path":"extensions/Apollo/Apollo.yy",}, {"name":"sh_grid","order":14,"path":"shaders/sh_grid/sh_grid.yy",}, {"name":"sh_twirl","order":3,"path":"shaders/sh_twirl/sh_twirl.yy",}, {"name":"s_node_shape","order":14,"path":"sprites/s_node_shape/s_node_shape.yy",}, @@ -437,6 +438,7 @@ {"name":"node_combine_rgb","order":1,"path":"scripts/node_combine_rgb/node_combine_rgb.yy",}, {"name":"fd_rectangle_draw_part","order":10,"path":"scripts/fd_rectangle_draw_part/fd_rectangle_draw_part.yy",}, {"name":"checkbox","order":7,"path":"scripts/checkbox/checkbox.yy",}, + {"name":"node_string_regex_replace","order":24,"path":"scripts/node_string_regex_replace/node_string_regex_replace.yy",}, {"name":"s_node_particle","order":12,"path":"sprites/s_node_particle/s_node_particle.yy",}, {"name":"s_node_random","order":3,"path":"sprites/s_node_random/s_node_random.yy",}, {"name":"s_node_color_remove","order":7,"path":"sprites/s_node_color_remove/s_node_color_remove.yy",}, @@ -472,7 +474,7 @@ {"name":"_node_fluid_nodes","order":7,"path":"scripts/_node_fluid_nodes/_node_fluid_nodes.yy",}, {"name":"sh_noise","order":16,"path":"shaders/sh_noise/sh_noise.yy",}, {"name":"sh_skew","order":6,"path":"shaders/sh_skew/sh_skew.yy",}, - {"name":"libxprocess","order":11,"path":"extensions/libxprocess/libxprocess.yy",}, + {"name":"libxprocess","order":5,"path":"extensions/libxprocess/libxprocess.yy",}, {"name":"fd_rectangle_get_pressure_height","order":16,"path":"scripts/fd_rectangle_get_pressure_height/fd_rectangle_get_pressure_height.yy",}, {"name":"node_VFX_effect_destroy","order":12,"path":"scripts/node_VFX_effect_destroy/node_VFX_effect_destroy.yy",}, {"name":"node_cache","order":9,"path":"scripts/node_cache/node_cache.yy",}, @@ -534,6 +536,7 @@ {"name":"slider","order":15,"path":"scripts/slider/slider.yy",}, {"name":"s_node_convolution","order":46,"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",}, + {"name":"node_string_regex_match","order":25,"path":"scripts/node_string_regex_match/node_string_regex_match.yy",}, {"name":"node_9slice","order":5,"path":"scripts/node_9slice/node_9slice.yy",}, {"name":"fd_rectangle_add_velocity_surface","order":24,"path":"scripts/fd_rectangle_add_velocity_surface/fd_rectangle_add_velocity_surface.yy",}, {"name":"sh_grid_hex","order":21,"path":"shaders/sh_grid_hex/sh_grid_hex.yy",}, @@ -559,6 +562,7 @@ {"name":"s_node_iterator_amount","order":26,"path":"sprites/s_node_iterator_amount/s_node_iterator_amount.yy",}, {"name":"sh_color_adjust","order":6,"path":"shaders/sh_color_adjust/sh_color_adjust.yy",}, {"name":"sh_fd_visualize_thick_smoke_glsl","order":17,"path":"shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.yy",}, + {"name":"s_node_regex_match","order":12,"path":"sprites/s_node_regex_match/s_node_regex_match.yy",}, {"name":"surface_get_palette","order":2,"path":"scripts/surface_get_palette/surface_get_palette.yy",}, {"name":"sh_pixel_sort","order":36,"path":"shaders/sh_pixel_sort/sh_pixel_sort.yy",}, {"name":"s_node_vfx_destroy","order":7,"path":"sprites/s_node_vfx_destroy/s_node_vfx_destroy.yy",}, @@ -573,7 +577,7 @@ {"name":"o_dialog_gradient","order":1,"path":"objects/o_dialog_gradient/o_dialog_gradient.yy",}, {"name":"sh_channel_R_grey","order":7,"path":"shaders/sh_channel_R_grey/sh_channel_R_grey.yy",}, {"name":"sh_blend_subtract","order":5,"path":"shaders/sh_blend_subtract/sh_blend_subtract.yy",}, - {"name":"panel_animation","order":4,"path":"scripts/panel_animation/panel_animation.yy",}, + {"name":"panel_animation","order":1,"path":"scripts/panel_animation/panel_animation.yy",}, {"name":"node_strand_create","order":1,"path":"scripts/node_strand_create/node_strand_create.yy",}, {"name":"sh_gradient","order":17,"path":"shaders/sh_gradient/sh_gradient.yy",}, {"name":"node_json_file_read","order":8,"path":"scripts/node_json_file_read/node_json_file_read.yy",}, @@ -664,6 +668,7 @@ {"name":"spr_gameframe_buttons","order":1,"path":"sprites/spr_gameframe_buttons/spr_gameframe_buttons.yy",}, {"name":"s_node_draw_stack","order":4,"path":"sprites/s_node_draw_stack/s_node_draw_stack.yy",}, {"name":"delaunay","order":1,"path":"scripts/delaunay/delaunay.yy",}, + {"name":"sh_color_select_content","order":1,"path":"shaders/sh_color_select_content/sh_color_select_content.yy",}, {"name":"sh_outline","order":18,"path":"shaders/sh_outline/sh_outline.yy",}, {"name":"s_node_strandSim_break","order":8,"path":"sprites/s_node_strandSim_break/s_node_strandSim_break.yy",}, {"name":"s_node_scatter_point","order":4,"path":"sprites/s_node_scatter_point/s_node_scatter_point.yy",}, @@ -762,6 +767,7 @@ {"name":"s_transparent","order":1,"path":"sprites/s_transparent/s_transparent.yy",}, {"name":"o_dialog_animation","order":1,"path":"objects/o_dialog_animation/o_dialog_animation.yy",}, {"name":"s_node_3d_plane","order":6,"path":"sprites/s_node_3d_plane/s_node_3d_plane.yy",}, + {"name":"Regex","order":8,"path":"extensions/Regex/Regex.yy",}, {"name":"s_node_path_shift","order":4,"path":"sprites/s_node_path_shift/s_node_path_shift.yy",}, {"name":"s_node_grid_tri","order":6,"path":"sprites/s_node_grid_tri/s_node_grid_tri.yy",}, {"name":"s_node_local_analyze","order":50,"path":"sprites/s_node_local_analyze/s_node_local_analyze.yy",}, @@ -780,7 +786,7 @@ {"name":"sh_blend_add_alpha_adj","order":2,"path":"shaders/sh_blend_add_alpha_adj/sh_blend_add_alpha_adj.yy",}, {"name":"preview_overlay_area","order":3,"path":"scripts/preview_overlay_area/preview_overlay_area.yy",}, {"name":"node_text","order":10,"path":"scripts/node_text/node_text.yy",}, - {"name":"panel_collection","order":7,"path":"scripts/panel_collection/panel_collection.yy",}, + {"name":"panel_collection","order":3,"path":"scripts/panel_collection/panel_collection.yy",}, {"name":"node_string_trim","order":15,"path":"scripts/node_string_trim/node_string_trim.yy",}, {"name":"lerp_float","order":1,"path":"scripts/lerp_float/lerp_float.yy",}, {"name":"vectorRangeBox","order":19,"path":"scripts/vectorRangeBox/vectorRangeBox.yy",}, @@ -810,7 +816,7 @@ {"name":"node_trail","order":16,"path":"scripts/node_trail/node_trail.yy",}, {"name":"json_prettify","order":7,"path":"scripts/json_prettify/json_prettify.yy",}, {"name":"s_node_loop_output","order":13,"path":"sprites/s_node_loop_output/s_node_loop_output.yy",}, - {"name":"panel_notification","order":9,"path":"scripts/panel_notification/panel_notification.yy",}, + {"name":"panel_notification","order":4,"path":"scripts/panel_notification/panel_notification.yy",}, {"name":"render_data","order":3,"path":"scripts/render_data/render_data.yy",}, {"name":"o_dialog_graph_view","order":4,"path":"objects/o_dialog_graph_view/o_dialog_graph_view.yy",}, {"name":"fd_rectangle_get_velocity_height","order":22,"path":"scripts/fd_rectangle_get_velocity_height/fd_rectangle_get_velocity_height.yy",}, @@ -864,7 +870,7 @@ {"name":"sh_alpha_hash","order":43,"path":"shaders/sh_alpha_hash/sh_alpha_hash.yy",}, {"name":"sh_blur_alpha","order":1,"path":"shaders/sh_blur_alpha/sh_blur_alpha.yy",}, {"name":"value_snap","order":10,"path":"scripts/value_snap/value_snap.yy",}, - {"name":"file_dropper","order":7,"path":"extensions/file_dropper/file_dropper.yy",}, + {"name":"file_dropper","order":1,"path":"extensions/file_dropper/file_dropper.yy",}, {"name":"sh_mirror_mask","order":8,"path":"shaders/sh_mirror_mask/sh_mirror_mask.yy",}, {"name":"node_export","order":10,"path":"scripts/node_export/node_export.yy",}, {"name":"controlPointBox","order":21,"path":"scripts/controlPointBox/controlPointBox.yy",}, @@ -887,6 +893,7 @@ {"name":"s_node_text_render","order":17,"path":"sprites/s_node_text_render/s_node_text_render.yy",}, {"name":"__init_global","order":8,"path":"scripts/__init_global/__init_global.yy",}, {"name":"sh_trail_filler_pass2","order":51,"path":"shaders/sh_trail_filler_pass2/sh_trail_filler_pass2.yy",}, + {"name":"s_node_regex_search","order":11,"path":"sprites/s_node_regex_search/s_node_regex_search.yy",}, {"name":"s_node_color_from_rgb","order":5,"path":"sprites/s_node_color_from_rgb/s_node_color_from_rgb.yy",}, {"name":"node_scale_algo","order":12,"path":"scripts/node_scale_algo/node_scale_algo.yy",}, {"name":"node_alpha_hash","order":11,"path":"scripts/node_alpha_hash/node_alpha_hash.yy",}, @@ -911,7 +918,7 @@ {"name":"surface_draw_functions","order":7,"path":"scripts/surface_draw_functions/surface_draw_functions.yy",}, {"name":"pack_shelf","order":1,"path":"scripts/pack_shelf/pack_shelf.yy",}, {"name":"s_node_path_trim","order":6,"path":"sprites/s_node_path_trim/s_node_path_trim.yy",}, - {"name":"libfilesystem","order":10,"path":"extensions/libfilesystem/libfilesystem.yy",}, + {"name":"libfilesystem","order":4,"path":"extensions/libfilesystem/libfilesystem.yy",}, {"name":"node_channels_hsv","order":1,"path":"scripts/node_channels_hsv/node_channels_hsv.yy",}, {"name":"sh_stripe","order":10,"path":"shaders/sh_stripe/sh_stripe.yy",}, {"name":"node_path_trim","order":6,"path":"scripts/node_path_trim/node_path_trim.yy",}, @@ -925,6 +932,7 @@ {"name":"sh_grid_noise","order":8,"path":"shaders/sh_grid_noise/sh_grid_noise.yy",}, {"name":"draw_set_blend_mode","order":1,"path":"scripts/draw_set_blend_mode/draw_set_blend_mode.yy",}, {"name":"gameframe_macros","order":1,"path":"scripts/gameframe_macros/gameframe_macros.yy",}, + {"name":"panel_color","order":1,"path":"scripts/panel_color/panel_color.yy",}, {"name":"s_node_line","order":7,"path":"sprites/s_node_line/s_node_line.yy",}, {"name":"fd_rectangle_get_material_dissipation_value","order":9,"path":"scripts/fd_rectangle_get_material_dissipation_value/fd_rectangle_get_material_dissipation_value.yy",}, {"name":"node_counter","order":1,"path":"scripts/node_counter/node_counter.yy",}, @@ -1022,6 +1030,7 @@ {"name":"s_node_3d_cylinder","order":1,"path":"sprites/s_node_3d_cylinder/s_node_3d_cylinder.yy",}, {"name":"node_strand_break","order":9,"path":"scripts/node_strand_break/node_strand_break.yy",}, {"name":"s_node_vec_split","order":6,"path":"sprites/s_node_vec_split/s_node_vec_split.yy",}, + {"name":"s_node_regex_replace","order":10,"path":"sprites/s_node_regex_replace/s_node_regex_replace.yy",}, {"name":"paddingBox","order":9,"path":"scripts/paddingBox/paddingBox.yy",}, {"name":"fd_rectangle_set_visualization_shader","order":18,"path":"scripts/fd_rectangle_set_visualization_shader/fd_rectangle_set_visualization_shader.yy",}, {"name":"s_node_ase_layer","order":17,"path":"sprites/s_node_ase_layer/s_node_ase_layer.yy",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index 9e204efeb..9e7f247e4 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -137,6 +137,7 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"VFX","folderPath":"folders/nodes/icons/VFX.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"panels","folderPath":"folders/panels.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"_others","folderPath":"folders/panels/_others.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"colors","folderPath":"folders/panels/colors.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"graph","folderPath":"folders/panels/graph.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"inspectors","folderPath":"folders/panels/inspectors.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"components","folderPath":"folders/panels/inspectors/components.yy",}, @@ -150,6 +151,7 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"blend","folderPath":"folders/shader/blend.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"blur","folderPath":"folders/shader/blur.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"channels","folderPath":"folders/shader/channels.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"color selector","folderPath":"folders/shader/color selector.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"draw","folderPath":"folders/shader/draw.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"filter","folderPath":"folders/shader/filter.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"shadow caster","folderPath":"folders/shader/filter/shadow caster.yy",}, @@ -216,6 +218,7 @@ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_color_picker_sample_strip2.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_color_picker_sample1.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_color_picker_sample2.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_color.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_copy.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_cursor.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_delete_16.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",}, @@ -753,6 +756,7 @@ {"id":{"name":"node_struct","path":"scripts/node_struct/node_struct.yy",},}, {"id":{"name":"node_displacement","path":"scripts/node_displacement/node_displacement.yy",},}, {"id":{"name":"mask_function","path":"scripts/mask_function/mask_function.yy",},}, + {"id":{"name":"panel_palette","path":"scripts/panel_palette/panel_palette.yy",},}, {"id":{"name":"text_file","path":"scripts/text_file/text_file.yy",},}, {"id":{"name":"sh_trail_filler_pass1","path":"shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.yy",},}, {"id":{"name":"s_node_vfx_wind","path":"sprites/s_node_vfx_wind/s_node_vfx_wind.yy",},}, @@ -875,6 +879,7 @@ {"id":{"name":"node_combine_rgb","path":"scripts/node_combine_rgb/node_combine_rgb.yy",},}, {"id":{"name":"fd_rectangle_draw_part","path":"scripts/fd_rectangle_draw_part/fd_rectangle_draw_part.yy",},}, {"id":{"name":"checkbox","path":"scripts/checkbox/checkbox.yy",},}, + {"id":{"name":"node_string_regex_replace","path":"scripts/node_string_regex_replace/node_string_regex_replace.yy",},}, {"id":{"name":"s_node_particle","path":"sprites/s_node_particle/s_node_particle.yy",},}, {"id":{"name":"sh_flood_fill_thres","path":"shaders/sh_flood_fill_thres/sh_flood_fill_thres.yy",},}, {"id":{"name":"s_node_random","path":"sprites/s_node_random/s_node_random.yy",},}, @@ -986,6 +991,7 @@ {"id":{"name":"slider","path":"scripts/slider/slider.yy",},}, {"id":{"name":"s_node_convolution","path":"sprites/s_node_convolution/s_node_convolution.yy",},}, {"id":{"name":"fd_rectangle_get_velocity_time_step","path":"scripts/fd_rectangle_get_velocity_time_step/fd_rectangle_get_velocity_time_step.yy",},}, + {"id":{"name":"node_string_regex_match","path":"scripts/node_string_regex_match/node_string_regex_match.yy",},}, {"id":{"name":"node_9slice","path":"scripts/node_9slice/node_9slice.yy",},}, {"id":{"name":"fd_rectangle_add_velocity_surface","path":"scripts/fd_rectangle_add_velocity_surface/fd_rectangle_add_velocity_surface.yy",},}, {"id":{"name":"sh_grid_hex","path":"shaders/sh_grid_hex/sh_grid_hex.yy",},}, @@ -1018,6 +1024,7 @@ {"id":{"name":"s_node_iterator_amount","path":"sprites/s_node_iterator_amount/s_node_iterator_amount.yy",},}, {"id":{"name":"sh_color_adjust","path":"shaders/sh_color_adjust/sh_color_adjust.yy",},}, {"id":{"name":"sh_fd_visualize_thick_smoke_glsl","path":"shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.yy",},}, + {"id":{"name":"s_node_regex_match","path":"sprites/s_node_regex_match/s_node_regex_match.yy",},}, {"id":{"name":"surface_get_palette","path":"scripts/surface_get_palette/surface_get_palette.yy",},}, {"id":{"name":"sh_pixel_sort","path":"shaders/sh_pixel_sort/sh_pixel_sort.yy",},}, {"id":{"name":"s_node_vfx_destroy","path":"sprites/s_node_vfx_destroy/s_node_vfx_destroy.yy",},}, @@ -1133,6 +1140,7 @@ {"id":{"name":"spr_gameframe_buttons","path":"sprites/spr_gameframe_buttons/spr_gameframe_buttons.yy",},}, {"id":{"name":"s_node_draw_stack","path":"sprites/s_node_draw_stack/s_node_draw_stack.yy",},}, {"id":{"name":"delaunay","path":"scripts/delaunay/delaunay.yy",},}, + {"id":{"name":"sh_color_select_content","path":"shaders/sh_color_select_content/sh_color_select_content.yy",},}, {"id":{"name":"sh_outline","path":"shaders/sh_outline/sh_outline.yy",},}, {"id":{"name":"s_node_strandSim_break","path":"sprites/s_node_strandSim_break/s_node_strandSim_break.yy",},}, {"id":{"name":"s_node_scatter_point","path":"sprites/s_node_scatter_point/s_node_scatter_point.yy",},}, @@ -1239,6 +1247,7 @@ {"id":{"name":"s_transparent","path":"sprites/s_transparent/s_transparent.yy",},}, {"id":{"name":"o_dialog_animation","path":"objects/o_dialog_animation/o_dialog_animation.yy",},}, {"id":{"name":"s_node_3d_plane","path":"sprites/s_node_3d_plane/s_node_3d_plane.yy",},}, + {"id":{"name":"Regex","path":"extensions/Regex/Regex.yy",},}, {"id":{"name":"s_node_path_shift","path":"sprites/s_node_path_shift/s_node_path_shift.yy",},}, {"id":{"name":"node_rigid_sim","path":"scripts/node_rigid_sim/node_rigid_sim.yy",},}, {"id":{"name":"s_node_grid_tri","path":"sprites/s_node_grid_tri/s_node_grid_tri.yy",},}, @@ -1386,6 +1395,8 @@ {"id":{"name":"s_node_text_render","path":"sprites/s_node_text_render/s_node_text_render.yy",},}, {"id":{"name":"__init_global","path":"scripts/__init_global/__init_global.yy",},}, {"id":{"name":"sh_trail_filler_pass2","path":"shaders/sh_trail_filler_pass2/sh_trail_filler_pass2.yy",},}, + {"id":{"name":"sh_color_select_side","path":"shaders/sh_color_select_side/sh_color_select_side.yy",},}, + {"id":{"name":"s_node_regex_search","path":"sprites/s_node_regex_search/s_node_regex_search.yy",},}, {"id":{"name":"s_node_color_from_rgb","path":"sprites/s_node_color_from_rgb/s_node_color_from_rgb.yy",},}, {"id":{"name":"node_scale_algo","path":"scripts/node_scale_algo/node_scale_algo.yy",},}, {"id":{"name":"node_alpha_hash","path":"scripts/node_alpha_hash/node_alpha_hash.yy",},}, @@ -1430,6 +1441,7 @@ {"id":{"name":"sh_grid_noise","path":"shaders/sh_grid_noise/sh_grid_noise.yy",},}, {"id":{"name":"draw_set_blend_mode","path":"scripts/draw_set_blend_mode/draw_set_blend_mode.yy",},}, {"id":{"name":"gameframe_macros","path":"scripts/gameframe_macros/gameframe_macros.yy",},}, + {"id":{"name":"panel_color","path":"scripts/panel_color/panel_color.yy",},}, {"id":{"name":"s_node_line","path":"sprites/s_node_line/s_node_line.yy",},}, {"id":{"name":"fd_rectangle_get_material_dissipation_value","path":"scripts/fd_rectangle_get_material_dissipation_value/fd_rectangle_get_material_dissipation_value.yy",},}, {"id":{"name":"panel_graph","path":"scripts/panel_graph/panel_graph.yy",},}, @@ -1543,6 +1555,7 @@ {"id":{"name":"s_node_3d_cylinder","path":"sprites/s_node_3d_cylinder/s_node_3d_cylinder.yy",},}, {"id":{"name":"node_strand_break","path":"scripts/node_strand_break/node_strand_break.yy",},}, {"id":{"name":"s_node_vec_split","path":"sprites/s_node_vec_split/s_node_vec_split.yy",},}, + {"id":{"name":"s_node_regex_replace","path":"sprites/s_node_regex_replace/s_node_regex_replace.yy",},}, {"id":{"name":"paddingBox","path":"scripts/paddingBox/paddingBox.yy",},}, {"id":{"name":"fd_rectangle_set_visualization_shader","path":"scripts/fd_rectangle_set_visualization_shader/fd_rectangle_set_visualization_shader.yy",},}, {"id":{"name":"s_node_ase_layer","path":"sprites/s_node_ase_layer/s_node_ase_layer.yy",},}, diff --git a/datafiles/data/themes/default.zip b/datafiles/data/themes/default.zip index 2c963278d..8c616e6ae 100644 Binary files a/datafiles/data/themes/default.zip and b/datafiles/data/themes/default.zip differ diff --git a/objects/o_dialog_add_node/Create_0.gml b/objects/o_dialog_add_node/Create_0.gml index 680973967..7f45cf4c0 100644 --- a/objects/o_dialog_add_node/Create_0.gml +++ b/objects/o_dialog_add_node/Create_0.gml @@ -238,7 +238,7 @@ event_inherited(); return hh; }); - content_pane = new scrollPane(dialog_w - ui(136), dialog_h - ui(66), function(_y, _m) { + content_pane = new scrollPane(dialog_w - ui(140), dialog_h - ui(66), function(_y, _m) { draw_clear_alpha(c_white, 0); var hh = 0; var _hover = sHOVER && content_pane.hover; @@ -288,7 +288,7 @@ event_inherited(); var cProg = 0; hh += grid_space; - grid_width = (content_pane.surface_w - grid_space) / col - grid_space; + grid_width = round(content_pane.surface_w - grid_space) / col - grid_space; for(var index = 0; index < node_count; index++) { var _node = _list[| index]; @@ -463,8 +463,8 @@ event_inherited(); onResize = function() { catagory_pane.resize(ui(132), dialog_h - ui(66)); - content_pane.resize(dialog_w - ui(136), dialog_h - ui(66)); - search_pane.resize(dialog_w - ui(32), dialog_h - ui(66)); + content_pane.resize(dialog_w - ui(140), dialog_h - ui(66)); + search_pane.resize(dialog_w - ui(36), dialog_h - ui(66)); PREF_MAP[? "dialog_add_node_w"] = dialog_w; PREF_MAP[? "dialog_add_node_h"] = dialog_h; @@ -535,7 +535,7 @@ event_inherited(); ds_priority_destroy(pr_list); } - search_pane = new scrollPane(dialog_w - ui(32), dialog_h - ui(66), function(_y, _m) { + search_pane = new scrollPane(dialog_w - ui(36), dialog_h - ui(66), function(_y, _m) { draw_clear_alpha(c_white, 0); var equation = string_char_at(search_string, 0) == "="; @@ -567,7 +567,7 @@ event_inherited(); var index = 0; var name_height = 0; - grid_width = (search_pane.surface_w - grid_space) / col - grid_space; + grid_width = round(search_pane.surface_w - grid_space) / col - grid_space; hh += (grid_space + grid_size) * 2; for(var i = 0; i < amo; i++) { diff --git a/objects/o_dialog_arrayBox/Draw_64.gml b/objects/o_dialog_arrayBox/Draw_64.gml index 94e2d78b7..07ec0f262 100644 --- a/objects/o_dialog_arrayBox/Draw_64.gml +++ b/objects/o_dialog_arrayBox/Draw_64.gml @@ -2,7 +2,7 @@ #region draw draw_sprite_stretched(THEME.textbox, 3, dialog_x, dialog_y, dialog_w, dialog_h); - sc_content.active = sHOVER; + sc_content.setActiveFocus(sHOVER, sFOCUS); sc_content.draw(dialog_x, dialog_y); draw_sprite_stretched(THEME.textbox, 1, dialog_x, dialog_y, dialog_w, dialog_h); diff --git a/objects/o_dialog_assetbox/Draw_64.gml b/objects/o_dialog_assetbox/Draw_64.gml index 79e582c8d..b086e48f0 100644 --- a/objects/o_dialog_assetbox/Draw_64.gml +++ b/objects/o_dialog_assetbox/Draw_64.gml @@ -37,9 +37,9 @@ } } - folderPane.active = sHOVER; + folderPane.setActiveFocus(sHOVER, sFOCUS); folderPane.draw(dialog_x + ui(16), dialog_y + ui(48)); - contentPane.active = sHOVER; + contentPane.setActiveFocus(sHOVER, sFOCUS); contentPane.draw(dialog_x + ui(20) + folderW, dialog_y + ui(16)); #endregion \ No newline at end of file diff --git a/objects/o_dialog_fontscrollbox/Draw_64.gml b/objects/o_dialog_fontscrollbox/Draw_64.gml index 94e2d78b7..07ec0f262 100644 --- a/objects/o_dialog_fontscrollbox/Draw_64.gml +++ b/objects/o_dialog_fontscrollbox/Draw_64.gml @@ -2,7 +2,7 @@ #region draw draw_sprite_stretched(THEME.textbox, 3, dialog_x, dialog_y, dialog_w, dialog_h); - sc_content.active = sHOVER; + sc_content.setActiveFocus(sHOVER, sFOCUS); sc_content.draw(dialog_x, dialog_y); draw_sprite_stretched(THEME.textbox, 1, dialog_x, dialog_y, dialog_w, dialog_h); diff --git a/objects/o_dialog_panel/Draw_75.gml b/objects/o_dialog_panel/Draw_75.gml index 2a099ce1b..752456f8d 100644 --- a/objects/o_dialog_panel/Draw_75.gml +++ b/objects/o_dialog_panel/Draw_75.gml @@ -1 +1,3 @@ /// @description +if(!is_undefined(content) && content != noone) + content.drawGUI(); \ No newline at end of file diff --git a/objects/o_dialog_panel/o_dialog_panel.yy b/objects/o_dialog_panel/o_dialog_panel.yy index 868cee4b5..32faab47b 100644 --- a/objects/o_dialog_panel/o_dialog_panel.yy +++ b/objects/o_dialog_panel/o_dialog_panel.yy @@ -5,6 +5,7 @@ "eventList": [ {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,}, {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,}, + {"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":75,"eventType":8,"isDnD":false,}, ], "managed": true, "overriddenProperties": [], diff --git a/objects/o_dialog_preference/Draw_64.gml b/objects/o_dialog_preference/Draw_64.gml index 4c553afa9..2e3fd35ad 100644 --- a/objects/o_dialog_preference/Draw_64.gml +++ b/objects/o_dialog_preference/Draw_64.gml @@ -54,15 +54,15 @@ if !ready exit; if(page_current == 0) { current_list = pref_global; - sp_pref.active = sHOVER; + sp_pref.setActiveFocus(sHOVER, sFOCUS); sp_pref.draw(px, py); } else if(page_current == 1) { current_list = pref_node; - sp_pref.active = sHOVER; + sp_pref.setActiveFocus(sHOVER, sFOCUS); sp_pref.draw(px, py); } else if(page_current == 2) { current_list = pref_appr; - sp_pref.active = sHOVER; + sp_pref.setActiveFocus(sHOVER, sFOCUS); sp_pref.draw(px, py); } else if(page_current == 3) { var _w = ui(200); @@ -85,13 +85,13 @@ if !ready exit; sb_theme.setActiveFocus(sFOCUS, sHOVER); sb_theme.draw(x2 - ui(24) - _w, yy, _w, _h, PREF_MAP[? "theme"]); - sp_colors.active = sHOVER; + sp_colors.setActiveFocus(sHOVER, sFOCUS); sp_colors.draw(px, py + ui(40)); } else if(page_current == 4) { if(mouse_press(mb_left, sFOCUS)) hk_editing = noone; - sp_hotkey.active = sHOVER; + sp_hotkey.setActiveFocus(sHOVER, sFOCUS); sp_hotkey.draw(px, py); } #endregion \ No newline at end of file diff --git a/objects/o_dialog_release_note/Draw_64.gml b/objects/o_dialog_release_note/Draw_64.gml index 13eddf03f..b711cea76 100644 --- a/objects/o_dialog_release_note/Draw_64.gml +++ b/objects/o_dialog_release_note/Draw_64.gml @@ -13,6 +13,6 @@ if !ready exit; draw_sprite_stretched(THEME.ui_panel_bg, 0, dialog_x + ui(24), dialog_y + ui(48), dialog_w - ui(48), dialog_h - ui(72)); - sp_note.active = sHOVER; + sp_note.setActiveFocus(sHOVER, sFOCUS); sp_note.draw(dialog_x + ui(40), dialog_y + ui(56)); #endregion \ No newline at end of file diff --git a/objects/o_dialog_scrollbox/Create_0.gml b/objects/o_dialog_scrollbox/Create_0.gml index f9237acf8..3b9f0d3af 100644 --- a/objects/o_dialog_scrollbox/Create_0.gml +++ b/objects/o_dialog_scrollbox/Create_0.gml @@ -82,7 +82,7 @@ event_inherited(); continue; } - if(sHOVER && sc_content.hover && point_in_rectangle(_m[0], _m[1], 0, _ly + 1, _dw, _ly + hght - 1)) { + if(sc_content.hover && point_in_rectangle(_m[0], _m[1], 0, _ly + 1, _dw, _ly + hght - 1)) { selecting = i; hovering = data[i]; } @@ -90,7 +90,7 @@ event_inherited(); if(selecting == i) { draw_sprite_stretched_ext(THEME.textbox, 3, 0, _ly, _dw, hght, COLORS.dialog_menubox_highlight, 1); - if(sFOCUS && (mouse_press(mb_left) || keyboard_check_pressed(vk_enter))) { + if(sc_content.active && (mouse_press(mb_left) || keyboard_check_pressed(vk_enter))) { initVal = i; instance_destroy(); } @@ -115,7 +115,7 @@ event_inherited(); UNDO_HOLDING = false; } - if(sFOCUS) { + if(sc_content.active) { if(keyboard_check_pressed(vk_up)) { selecting--; if(selecting < 0) selecting = array_length(data) - 1; diff --git a/objects/o_dialog_scrollbox/Draw_64.gml b/objects/o_dialog_scrollbox/Draw_64.gml index fa8c05c89..e122d16ea 100644 --- a/objects/o_dialog_scrollbox/Draw_64.gml +++ b/objects/o_dialog_scrollbox/Draw_64.gml @@ -7,7 +7,7 @@ tb_search.draw(dialog_x + ui(8), dialog_y + ui(8), dialog_w - ui(16), ui(24), search_string); tb_search.sprite_index = 0; - sc_content.active = sHOVER; + sc_content.setActiveFocus(sHOVER, sFOCUS); sc_content.draw(dialog_x, dialog_y + ui(16 + 24)); draw_sprite_stretched(THEME.textbox, 1, dialog_x, dialog_y, dialog_w, dialog_h); diff --git a/objects/o_dialog_splash/Create_0.gml b/objects/o_dialog_splash/Create_0.gml index d09f25084..82251d09e 100644 --- a/objects/o_dialog_splash/Create_0.gml +++ b/objects/o_dialog_splash/Create_0.gml @@ -26,12 +26,12 @@ event_inherited(); var y0 = dialog_y + ui(128); var y1 = dialog_y + dialog_h - ui(16); - sp_recent.resize(x1 - x0 - ui(8), y1 - y0); + sp_recent.resize(x1 - x0 - ui(12), y1 - y0); x0 = x1 + ui(16); x1 = dialog_x + dialog_w - ui(16); - sp_sample.resize(x1 - x0 - ui(8), y1 - y0); + sp_sample.resize(x1 - x0 - ui(12), y1 - y0); } var x0 = dialog_x + ui(16); @@ -39,10 +39,10 @@ event_inherited(); var y0 = dialog_y + ui(128); var y1 = dialog_y + dialog_h - ui(16); - sp_recent = new scrollPane(x1 - x0 - ui(8), y1 - y0, function(_y, _m) { + sp_recent = new scrollPane(x1 - x0 - ui(12), y1 - y0, function(_y, _m) { draw_clear_alpha(COLORS.panel_bg_clear_inner, 0); var expand = PREF_MAP[? "splash_expand_recent"]; - var ww = ui(268); + var ww = ui(264); var hh = 0; var pad = ui(8); var hgt = ui(16) + line_height(f_p0b) + line_height(f_p1); @@ -111,7 +111,7 @@ event_inherited(); x0 = x1 + ui(16); x1 = dialog_x + dialog_w - ui(16); - sp_sample = new scrollPane(x1 - x0 - ui(8), y1 - y0, function(_y, _m) { + sp_sample = new scrollPane(x1 - x0 - ui(12), y1 - y0, function(_y, _m) { draw_clear_alpha(COLORS.panel_bg_clear_inner, 0); var list = project_page? STEAM_PROJECTS : SAMPLE_PROJECTS; diff --git a/objects/o_dialog_splash/Draw_64.gml b/objects/o_dialog_splash/Draw_64.gml index 490ecef38..906d420f6 100644 --- a/objects/o_dialog_splash/Draw_64.gml +++ b/objects/o_dialog_splash/Draw_64.gml @@ -114,7 +114,7 @@ if !ready exit; } if(expandAction) { - recent_width = PREF_MAP[? "splash_expand_recent"]? ui(576) : ui(288); + recent_width = PREF_MAP[? "splash_expand_recent"]? ui(564) : ui(288); resize(); } #endregion \ No newline at end of file diff --git a/objects/o_main/Create_0.gml b/objects/o_main/Create_0.gml index 3d1d829df..f42687f2d 100644 --- a/objects/o_main/Create_0.gml +++ b/objects/o_main/Create_0.gml @@ -35,9 +35,10 @@ draw_set_circle_precision(64); DIALOG_DEPTH_HOVER = 0; - UPDATE = RENDER_TYPE.none; - CURSOR = cr_default; - TOOLTIP = ""; + UPDATE = RENDER_TYPE.none; + CURSOR = cr_default; + TOOLTIP = ""; + DRAGGING = noone; KEYBOARD_STRING = ""; RENDER_QUEUE = ds_queue_create(); diff --git a/objects/o_main/Draw_75.gml b/objects/o_main/Draw_75.gml index e7132877e..f780b2ec7 100644 --- a/objects/o_main/Draw_75.gml +++ b/objects/o_main/Draw_75.gml @@ -70,6 +70,25 @@ TOOLTIP = ""; #endregion +#region dragging + if(DRAGGING != noone) { + switch(DRAGGING.type) { + case "Palette" : + drawPalette(DRAGGING.data, mouse_mx, mouse_my, ui(128), ui(24)); + break; + case "Color" : + draw_set_color(DRAGGING.data); + draw_set_alpha(0.5); + draw_rectangle(mouse_mx + ui(-16), mouse_my + ui(-16), mouse_mx + ui(-16 + 32), mouse_my + ui(-16 + 32), false); + draw_set_alpha(1); + break; + } + + if(mouse_release(mb_left)) + DRAGGING = noone; + } +#endregion + #region safe mode if(SAFE_MODE) { draw_sprite_stretched_ext(THEME.ui_panel_active, 0, 0, 0, WIN_W, WIN_H, COLORS._main_value_negative, 1); @@ -80,7 +99,12 @@ } #endregion +#region draw gui top + PANEL_MAIN.drawGUI(); +#endregion + #region frame draw_set_color(COLORS._main_icon_dark); draw_rectangle(1, 1, WIN_W - 2, WIN_H - 2, true); +#endregion #endregion \ No newline at end of file diff --git a/objects/o_main/Step_1.gml b/objects/o_main/Step_1.gml index 0fde953de..b22b2142f 100644 --- a/objects/o_main/Step_1.gml +++ b/objects/o_main/Step_1.gml @@ -34,7 +34,7 @@ #region auto save AUTO_SAVE_TIMER += delta_time / 1_000_000; - if(PREF_MAP[? "auto_save_time"] > 0 && AUTO_SAVE_TIMER > PREF_MAP[? "auto_save_time"]) { + if(MODIFIED && PREF_MAP[? "auto_save_time"] > 0 && AUTO_SAVE_TIMER > PREF_MAP[? "auto_save_time"]) { AUTO_SAVE_TIMER = 0; var loc = DIRECTORY + "Autosave/"; if(!directory_exists(loc)) diff --git a/scripts/append_function/append_function.gml b/scripts/append_function/append_function.gml index 4b2059b89..b12d841d1 100644 --- a/scripts/append_function/append_function.gml +++ b/scripts/append_function/append_function.gml @@ -15,7 +15,7 @@ function APPEND(_path, record = true) { } function __APPEND_MAP(_map) { - static log = true; + static log = false; APPENDING = true; UNDO_HOLDING = true; diff --git a/scripts/areaBox/areaBox.gml b/scripts/areaBox/areaBox.gml index 508559331..f5eb7e809 100644 --- a/scripts/areaBox/areaBox.gml +++ b/scripts/areaBox/areaBox.gml @@ -224,8 +224,7 @@ function areaBox(_onModify, _unit = noone) : widget() constructor { } for(var i = 0; i < 4; i++) { - tb[i].hover = hover; - tb[i].active = active; + tb[i].setActiveFocus(hover, active); tb[i].align = fa_center; } @@ -290,9 +289,7 @@ function areaBox(_onModify, _unit = noone) : widget() constructor { } if(unit != noone && unit.reference != noone) { - unit.triggerButton.hover = ihover; - unit.triggerButton.active = iactive; - + unit.triggerButton.setActiveFocus(hover, active); unit.draw(_x + ui(56 + 48 + 8), _y - ui(28), ui(32), ui(32), _m); } diff --git a/scripts/buttonColor/buttonColor.gml b/scripts/buttonColor/buttonColor.gml index f3d110467..bb75368bc 100644 --- a/scripts/buttonColor/buttonColor.gml +++ b/scripts/buttonColor/buttonColor.gml @@ -38,13 +38,14 @@ function buttonColor(_onApply, dialog = noone) : widget() constructor { h = _h; current_color = toNumber(_color); - b_picker.hover = hover; - b_picker.active = active; + b_picker.setActiveFocus(hover, active); b_picker.draw(_x + _w - ui(32), _y + _h / 2 - ui(16), ui(32), ui(32), _m, THEME.button_hide); var _cw = _w - ui(40); + var hoverRect = point_in_rectangle(_m[0], _m[1], _x, _y, _x + _cw, _y + _h); + var click = false; - if(ihover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + _cw, _y + _h)) { + if(ihover && hoverRect) { draw_sprite_stretched(THEME.button, 1, _x, _y, _cw, _h); if(mouse_press(mb_left, iactive)) { trigger(); @@ -62,8 +63,13 @@ function buttonColor(_onApply, dialog = noone) : widget() constructor { if(WIDGET_CURRENT == self) draw_sprite_stretched(THEME.widget_selecting, 0, _x - ui(3), _y - ui(3), _w + ui(6), _h + ui(6)); - resetFocus(); + if(DRAGGING && DRAGGING.type == "Color" && hover && hoverRect) { + draw_sprite_stretched_ext(THEME.ui_panel_active, 0, _x, _y, _cw, _h, COLORS._main_value_positive, 1); + if(mouse_release(mb_left)) + onApply(DRAGGING.data); + } + resetFocus(); return click; } } \ No newline at end of file diff --git a/scripts/buttonGroup/buttonGroup.gml b/scripts/buttonGroup/buttonGroup.gml index 1a390210e..a2522bc1f 100644 --- a/scripts/buttonGroup/buttonGroup.gml +++ b/scripts/buttonGroup/buttonGroup.gml @@ -60,8 +60,7 @@ function buttonGroupClass(_data, _onClick) : widget() constructor { if(display_button) { for(var i = 0; i < amo; i++) { - buttons[i].hover = hover; - buttons[i].active = active; + buttons[i].setActiveFocus(hover, active); var bx = _x + ww * i; var spr = i == 0 ? buttonSpr[0] : (i == amo - 1? buttonSpr[2] : buttonSpr[1]); @@ -89,8 +88,7 @@ function buttonGroupClass(_data, _onClick) : widget() constructor { } } } else { - sb_small.hover = hover; - sb_small.active = active; + sb_small.setActiveFocus(hover, active); sb_small.draw(_x, _y, _w, _h, data[_selecting], _m, _rx, _ry); } diff --git a/scripts/buttonPalette/buttonPalette.gml b/scripts/buttonPalette/buttonPalette.gml index c23956749..1ba362974 100644 --- a/scripts/buttonPalette/buttonPalette.gml +++ b/scripts/buttonPalette/buttonPalette.gml @@ -25,8 +25,9 @@ function buttonPalette(_onApply, dialog = noone) : widget() constructor { h = _h; current_palette = _color; - var click = false; - if(ihover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h)) { + var click = false; + var hoverRect = point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h); + if(ihover && hoverRect) { draw_sprite_stretched(THEME.button, 1, _x, _y, _w, _h); if(mouse_press(mb_left, iactive)) { trigger(); @@ -41,11 +42,16 @@ function buttonPalette(_onApply, dialog = noone) : widget() constructor { drawPalette(_color, _x + ui(6), _y + ui(6), _w - ui(12), _h - ui(12)); - resetFocus(); - if(WIDGET_CURRENT == self) draw_sprite_stretched(THEME.widget_selecting, 0, _x - ui(3), _y - ui(3), _w + ui(6), _h + ui(6)); + if(DRAGGING && DRAGGING.type == "Palette" && hover && hoverRect) { + draw_sprite_stretched_ext(THEME.ui_panel_active, 0, _x, _y, _w, _h, COLORS._main_value_positive, 1); + if(mouse_release(mb_left)) + onApply(DRAGGING.data); + } + + resetFocus(); return click; } } diff --git a/scripts/color_selector/color_selector.gml b/scripts/color_selector/color_selector.gml index 2bcae0935..dbbe91ffc 100644 --- a/scripts/color_selector/color_selector.gml +++ b/scripts/color_selector/color_selector.gml @@ -218,7 +218,7 @@ function colorSelector(onApply = noone) constructor { var tx = hue_x + ui(36); var ty = _y + ui(4); - scr_disp.active = focus; scr_disp.hover = hover; + scr_disp.setActiveFocus(hover, focus); scr_disp.draw(tx, ty, ui(190), ui(32), disp_mode, mouse_ui); #endregion @@ -245,9 +245,9 @@ function colorSelector(onApply = noone) constructor { draw_text(data_x, data_y + ui(36 * 1 + 15), "S") draw_text(data_x, data_y + ui(36 * 2 + 15), "V"); - tb_hue.active = focus; tb_hue.hover = hover; - tb_sat.active = focus; tb_sat.hover = hover; - tb_val.active = focus; tb_val.hover = hover; + tb_hue.setActiveFocus(hover, focus); + tb_sat.setActiveFocus(hover, focus); + tb_val.setActiveFocus(hover, focus); tb_hue.draw(data_x + ui(28), data_y + ui(36 * 0), ui(160), ui(30), round(color_get_hue(current_color)), mouse_ui); tb_sat.draw(data_x + ui(28), data_y + ui(36 * 1), ui(160), ui(30), round(color_get_saturation(current_color)), mouse_ui); @@ -260,9 +260,9 @@ function colorSelector(onApply = noone) constructor { draw_text(data_x, data_y + ui(36 * 1 + 15), "G"); draw_text(data_x, data_y + ui(36 * 2 + 15), "B"); - tb_red.active = focus; tb_red.hover = hover; - tb_green.active = focus; tb_green.hover = hover; - tb_blue.active = focus; tb_blue.hover = hover; + tb_red.setActiveFocus(hover, focus); + tb_green.setActiveFocus(hover, focus); + tb_blue.setActiveFocus(hover, focus); tb_red.draw (data_x + ui(28), data_y + ui(36 * 0), ui(160), ui(30), color_get_red(current_color), mouse_ui); tb_green.draw(data_x + ui(28), data_y + ui(36 * 1), ui(160), ui(30), color_get_green(current_color), mouse_ui); diff --git a/scripts/controlPointBox/controlPointBox.gml b/scripts/controlPointBox/controlPointBox.gml index b906914ae..82cf0ce0f 100644 --- a/scripts/controlPointBox/controlPointBox.gml +++ b/scripts/controlPointBox/controlPointBox.gml @@ -66,15 +66,15 @@ function controlPointBox(_onModify) : widget() constructor { x = _x; y = _y; - tbCx.hover = hover; tbCx.active = active; - tbCy.hover = hover; tbCy.active = active; - tbFx.hover = hover; tbFx.active = active; - tbFy.hover = hover; tbFy.active = active; - tbW.hover = hover; tbW.active = active; - sW.hover = hover; sW.active = active; - tbH.hover = hover; tbH.active = active; - scMode.hover = hover; scMode.active = active; - rot.hover = hover; rot.active = active; + tbCx.setActiveFocus(hover, active); + tbCy.setActiveFocus(hover, active); + tbFx.setActiveFocus(hover, active); + tbFy.setActiveFocus(hover, active); + tbW.setActiveFocus(hover, active); + sW.setActiveFocus(hover, active); + tbH.setActiveFocus(hover, active); + scMode.setActiveFocus(hover, active); + rot.setActiveFocus(hover, active); var yy = _y; diff --git a/scripts/draw_sprite_ext_override/draw_sprite_ext_override.gml b/scripts/draw_sprite_ext_override/draw_sprite_ext_override.gml index 24aaefc20..b9c1ffb60 100644 --- a/scripts/draw_sprite_ext_override/draw_sprite_ext_override.gml +++ b/scripts/draw_sprite_ext_override/draw_sprite_ext_override.gml @@ -2,11 +2,11 @@ #macro __draw_sprite_ext draw_sprite_ext function draw_sprite_ext_override(spr, ind, _x, _y, xscale = 1, yscale = 1, rot = 0, color = c_white, alpha = 1) { - __draw_sprite_ext(spr, ind, _x, _y, xscale, yscale, rot, color, alpha); + __draw_sprite_ext(spr, ind, round(_x), round(_y), xscale, yscale, rot, color, alpha); } function draw_sprite_uniform(spr, ind, _x, _y, scale, color = c_white) { - draw_sprite_ext(spr, ind, _x, _y, scale, scale, 0, color, 1); + draw_sprite_ext(spr, ind, round(_x), round(_y), scale, scale, 0, color, 1); } function draw_sprite_ui(spr, ind, _x, _y, xscale = 1, yscale = 1, rot = 0, color = c_white, alpha = 1) { @@ -15,9 +15,9 @@ function draw_sprite_ui(spr, ind, _x, _y, xscale = 1, yscale = 1, rot = 0, color var xscale_ui = ui(xscale) / UI_SPRITE_SCALE; var yscale_ui = ui(yscale) / UI_SPRITE_SCALE; - draw_sprite_ext(spr, ind, _x, _y, xscale_ui, yscale_ui, rot, color, alpha); + draw_sprite_ext(spr, ind, round(_x), round(_y), xscale_ui, yscale_ui, rot, color, alpha); } function draw_sprite_ui_uniform(spr, ind, _x, _y, scale = 1, color = c_white, alpha = 1, rot = 0) { - draw_sprite_ui(spr, ind, _x, _y, scale, scale, rot, color, alpha); + draw_sprite_ui(spr, ind, round(_x), round(_y), scale, scale, rot, color, alpha); } diff --git a/scripts/fontScrollBox/fontScrollBox.gml b/scripts/fontScrollBox/fontScrollBox.gml index 4c1ab6508..d41b8f779 100644 --- a/scripts/fontScrollBox/fontScrollBox.gml +++ b/scripts/fontScrollBox/fontScrollBox.gml @@ -33,8 +33,7 @@ function fontScrollBox(_onModify) : widget() constructor { w = _w; if(extra_button != noone) { - extra_button.hover = hover; - extra_button.active = active; + extra_button.setActiveFocus(hover, active); extra_button.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide); w -= ui(40); } diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index f0be400a7..d781ba293 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -33,7 +33,7 @@ globalvar VERSION, SAVEFILE_VERSION, VERSION_STRING; VERSION = 1140; SAVEFILE_VERSION = 1400; - VERSION_STRING = "1.14.0pr4"; + VERSION_STRING = "1.14.0pr5"; globalvar NODES, NODE_MAP, APPEND_MAP, HOTKEYS, HOTKEY_CONTEXT, NODE_INSTANCES; @@ -46,7 +46,7 @@ HOTKEY_CONTEXT = ds_list_create(); HOTKEY_CONTEXT[| 0] = ""; - globalvar CURSOR, TOOLTIP, DIALOG_DEPTH_HOVER; + globalvar CURSOR, TOOLTIP, DRAGGING, DIALOG_DEPTH_HOVER; globalvar UPDATE, RENDER_QUEUE; #endregion diff --git a/scripts/matrixGrid/matrixGrid.gml b/scripts/matrixGrid/matrixGrid.gml index 52bc0ff4c..88e292a3a 100644 --- a/scripts/matrixGrid/matrixGrid.gml +++ b/scripts/matrixGrid/matrixGrid.gml @@ -74,9 +74,7 @@ function matrixGrid(_type, _onModify, _unit = noone) : widget() constructor { h = _h; if(extras && instanceof(extras) == "buttonClass") { - extras.hover = hover; - extras.active = active; - + extras.setActiveFocus(hover, active); extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide); _w -= ui(40); } @@ -84,15 +82,12 @@ function matrixGrid(_type, _onModify, _unit = noone) : widget() constructor { if(unit != noone && unit.reference != noone) { _w += ui(4); - unit.triggerButton.hover = ihover; - unit.triggerButton.active = iactive; - + unit.triggerButton.setActiveFocus(ihover, iactive); unit.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m); _w -= ui(40); } - b_link.hover = hover; - b_link.active = active; + b_link.setActiveFocus(hover, active); b_link.icon_index = linked; b_link.icon_blend = linked? COLORS._main_accent : COLORS._main_icon; b_link.tooltip = linked? "Unlink values" : "Link values"; @@ -112,8 +107,7 @@ function matrixGrid(_type, _onModify, _unit = noone) : widget() constructor { for(var i = 0; i < 3; i++) for(var j = 0; j < 3; j++) { var ind = i * 3 + j; - tb[ind].hover = hover; - tb[ind].active = active; + tb[ind].setActiveFocus(hover, active); var bx = _x + ww * j; var by = _y + hh * i; diff --git a/scripts/nodeValue_drawer/nodeValue_drawer.gml b/scripts/nodeValue_drawer/nodeValue_drawer.gml index 7b444925a..93ba47552 100644 --- a/scripts/nodeValue_drawer/nodeValue_drawer.gml +++ b/scripts/nodeValue_drawer/nodeValue_drawer.gml @@ -255,14 +255,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover, _focus, _scr jun.editWidget.draw(editBoxX, editBoxY, jun.showValue(), _m, editBoxH); break; case VALUE_TYPE.color : - switch(jun.display_type) { - case VALUE_DISPLAY.gradient : - jun.editWidget.draw(editBoxX, editBoxY, editBoxW, editBoxH, jun.showValue(), _m); - break; - default : - jun.editWidget.draw(editBoxX, editBoxY, editBoxW, editBoxH, jun.showValue(), _m); - break; - } + jun.editWidget.draw(editBoxX, editBoxY, editBoxW, editBoxH, jun.showValue(), _m); break; case VALUE_TYPE.path : switch(jun.display_type) { diff --git a/scripts/node_array_get/node_array_get.gml b/scripts/node_array_get/node_array_get.gml index fa54c6c90..a0c84ee74 100644 --- a/scripts/node_array_get/node_array_get.gml +++ b/scripts/node_array_get/node_array_get.gml @@ -16,8 +16,6 @@ function Node_Array_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construct .setDisplay(VALUE_DISPLAY.enum_scroll, ["Clamp", "Loop", "Ping Pong"]) .rejectArray(); - inputs[| 3] = nodeValue("Index", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); - outputs[| 0] = nodeValue("Value", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, 0); static step = function() { @@ -30,7 +28,7 @@ function Node_Array_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construct } } - static getArray = function(_arr, index, _ovf, _dim = 0) { + static getArray = function(_arr, index, _ovf) { if(!is_array(_arr)) return; if(is_array(index)) return; @@ -38,12 +36,12 @@ function Node_Array_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construct switch(_ovf) { case 0 : - if(index < 0) index = _len - 1 + index; + if(index < 0) index = _len + index; index = clamp(index, 0, _len - 1); break; case 1 : index = safe_mod(index, _len); - if(index < 0) index = _len - 1 + index; + if(index < 0) index = _len + index; break; case 2 : var _pplen = (_len - 1) * 2; @@ -63,14 +61,13 @@ function Node_Array_Get(_x, _y, _group = noone) : Node(_x, _y, _group) construct var index = inputs[| 1].getValue(); var _ovf = inputs[| 2].getValue(); - var _dim = inputs[| 3].getValue(); var res = is_array(index)? array_create(array_length(index)) : 0; if(is_array(index)) { for( var i = 0; i < array_length(index); i++ ) - res[i] = getArray(_arr, index[i], _ovf, _dim); + res[i] = getArray(_arr, index[i], _ovf); } else - res = getArray(_arr, index, _ovf, _dim); + res = getArray(_arr, index, _ovf); outputs[| 0].setValue(res); } diff --git a/scripts/node_array_insert/node_array_insert.gml b/scripts/node_array_insert/node_array_insert.gml index cd6e2c550..61b745a9d 100644 --- a/scripts/node_array_insert/node_array_insert.gml +++ b/scripts/node_array_insert/node_array_insert.gml @@ -44,7 +44,7 @@ function Node_Array_Insert(_x, _y, _group = noone) : Node(_x, _y, _group) constr array_insert(arr, index[i], array_safe_get(value, i,, ARRAY_OVERFLOW.loop)); } } else { - if(index < 0) index = array_length(arr) - 1 + index; + if(index < 0) index = array_length(arr) + index; if(is_array(value)) { for( var i = 0; i < array_length(value); i++ ) diff --git a/scripts/node_array_remove/node_array_remove.gml b/scripts/node_array_remove/node_array_remove.gml index d7ec3235c..665f6e403 100644 --- a/scripts/node_array_remove/node_array_remove.gml +++ b/scripts/node_array_remove/node_array_remove.gml @@ -55,7 +55,7 @@ function Node_Array_Remove(_x, _y, _group = noone) : Node(_x, _y, _group) constr array_sort(index, false); for( var i = 0; i < array_length(index); i++ ) { - if(index[i] < 0) index[i] = array_length(arr) - 1 + index[i]; + if(index[i] < 0) index[i] = array_length(arr) + index[i]; array_delete(arr, index[i], 1); } } else { diff --git a/scripts/node_array_set/node_array_set.gml b/scripts/node_array_set/node_array_set.gml index b542abdb5..719b54806 100644 --- a/scripts/node_array_set/node_array_set.gml +++ b/scripts/node_array_set/node_array_set.gml @@ -40,11 +40,11 @@ function Node_Array_Set(_x, _y, _group = noone) : Node(_x, _y, _group) construct if(is_array(index)) { if(!is_array(value)) value = [ value ]; for( var i = 0; i < array_length(index); i++ ) { - if(index[i] < 0) index[i] = array_length(arr) - 1 + index[i]; + if(index[i] < 0) index[i] = array_length(arr) + index[i]; array_safe_set(arr, index[i], array_safe_get(value, i,, ARRAY_OVERFLOW.loop)); } } else { - if(index < 0) index = array_length(arr) - 1 + index; + if(index < 0) index = array_length(arr) + index; array_safe_set(arr, index, value); } diff --git a/scripts/node_color/node_color.gml b/scripts/node_color/node_color.gml index 0de699b46..6512af286 100644 --- a/scripts/node_color/node_color.gml +++ b/scripts/node_color/node_color.gml @@ -1,7 +1,6 @@ function Node_Color(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Color"; previewable = false; - w = 96; inputs[| 0] = nodeValue("Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); @@ -12,6 +11,9 @@ function Node_Color(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con return _data[0]; } + droppable = ["Color"]; + static onDrop = function() { inputs[| 0].setValue(DRAGGING.data); } + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); if(bbox.h < 1) return; diff --git a/scripts/node_corner/node_corner.gml b/scripts/node_corner/node_corner.gml index 9022b15d0..b168f67fd 100644 --- a/scripts/node_corner/node_corner.gml +++ b/scripts/node_corner/node_corner.gml @@ -54,7 +54,7 @@ function Node_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co shader_set(sh_corner); shader_set_uniform_f_array_safe(uniform_dim, [surface_get_width(_data[0]), surface_get_height(_data[0])]); shader_set_uniform_f(uniform_rad, wd); - shader_set_surface(sh_corner, "original", _data[0]); + shader_set_surface("original", _data[0]); draw_surface_safe(temp, 0, 0); BLEND_NORMAL; diff --git a/scripts/node_crop_content/node_crop_content.gml b/scripts/node_crop_content/node_crop_content.gml index 004dbd18b..446c84bd5 100644 --- a/scripts/node_crop_content/node_crop_content.gml +++ b/scripts/node_crop_content/node_crop_content.gml @@ -60,8 +60,8 @@ function Node_Crop_Content(_x, _y, _group = noone) : Node(_x, _y, _group) constr temp_surface[i] = surface_verify(temp_surface[i], 1, 1, cDep); shader_set(sh_find_boundary); - shader_set_f(sh_find_boundary, "dimension", _dim); - shader_set_i(sh_find_boundary, "mode", i); + shader_set_f("dimension", _dim); + shader_set_i("mode", i); surface_set_target(temp_surface[i]); DRAW_CLEAR BLEND_OVERRIDE; diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index f17b8ebc9..0bb7d4551 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -35,6 +35,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x draw_name = true; draggable = true; + droppable = []; input_display_list = -1; output_display_list = -1; @@ -1063,6 +1064,8 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x static onClone = function(_NewNode, target = PANEL_GRAPH.getCurrentContext()) {} + static onDrop = function() {} + static serialize = function(scale = false, preset = false) { var _map = ds_map_create(); //print(" > Serializing: " + name); @@ -1143,14 +1146,14 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x var _inputs = load_map[? "inputs"]; var amo = min(ds_list_size(inputs), ds_list_size(_inputs)); - printIf(TESTING, " > Applying deserialize to node " + name + " (amount: " + string(amo) + ")"); + //printIf(TESTING, " > Applying deserialize to node " + name + " (amount: " + string(amo) + ")"); for(var i = 0; i < amo; i++) { if(inputs[| i] == noone) continue; inputs[| i].applyDeserialize(_inputs[| i], load_scale, preset); } - printIf(TESTING, " > Applying deserialize to node " + name + " completed"); + //printIf(TESTING, " > Applying deserialize to node " + name + " completed"); doApplyDeserialize(); } diff --git a/scripts/node_flood_fill/node_flood_fill.gml b/scripts/node_flood_fill/node_flood_fill.gml index 4aeaa16da..6c4f0f299 100644 --- a/scripts/node_flood_fill/node_flood_fill.gml +++ b/scripts/node_flood_fill/node_flood_fill.gml @@ -63,8 +63,8 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group DRAW_CLEAR shader_set(sh_flood_fill_thres); - shader_set_f(sh_flood_fill_thres, "color", colaToVec4(_filC)); - shader_set_f(sh_flood_fill_thres, "thres", _thr); + shader_set_f("color", colaToVec4(_filC)); + shader_set_f("thres", _thr); BLEND_OVERRIDE draw_surface_safe(inSurf, 0, 0); BLEND_NORMAL @@ -85,8 +85,8 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group DRAW_CLEAR shader_set(sh_flood_fill_it); - shader_set_f(sh_flood_fill_it, "dimension", [ sw, sh ]); - shader_set_i(sh_flood_fill_it, "diagonal", _dia); + shader_set_f("dimension", [ sw, sh ]); + shader_set_i("diagonal", _dia); BLEND_OVERRIDE draw_surface_safe(temp_surface[!ind], 0, 0); BLEND_NORMAL @@ -98,8 +98,8 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group DRAW_CLEAR shader_set(sh_flood_fill_replace); - shader_set_f(sh_flood_fill_replace, "color", colToVec4(_col)); - shader_set_surface(sh_flood_fill_replace, "mask", temp_surface[ind]); + shader_set_f("color", colToVec4(_col)); + shader_set_surface("mask", temp_surface[ind]); BLEND_OVERRIDE draw_surface_safe(inSurf, 0, 0); BLEND_NORMAL diff --git a/scripts/node_fluid_repulse/node_fluid_repulse.gml b/scripts/node_fluid_repulse/node_fluid_repulse.gml index 389886caf..207fc2632 100644 --- a/scripts/node_fluid_repulse/node_fluid_repulse.gml +++ b/scripts/node_fluid_repulse/node_fluid_repulse.gml @@ -55,7 +55,7 @@ function Node_Fluid_Repulse(_x, _y, _group = noone) : Node_Fluid(_x, _y, _group) shader_set(sh_fd_repulse); BLEND_OVERRIDE; - shader_set_f(sh_fd_repulse, "strength", _str); + shader_set_f("strength", _str); draw_sprite_stretched(s_fx_pixel, 0, _pos[0] - _rad, _pos[1] - _rad, _rad * 2, _rad * 2); BLEND_NORMAL; shader_reset(); diff --git a/scripts/node_palette/node_palette.gml b/scripts/node_palette/node_palette.gml index 1e301e932..1255e776f 100644 --- a/scripts/node_palette/node_palette.gml +++ b/scripts/node_palette/node_palette.gml @@ -17,6 +17,9 @@ function Node_Palette(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c ["Trim", true], 1 ]; + droppable = ["Palette"]; + static onDrop = function() { inputs[| 0].setValue(DRAGGING.data); } + static process_data = function(_outSurf, _data, _output_index, _array_index) { var pal = _data[0]; var ran = _data[1]; diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index f7d7fb5ff..21d872f56 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -396,14 +396,11 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { addNodeObject(compose, "Camera", s_node_camera, "Node_Camera", [1, Node_Camera],, "Create camera that crop image to fix dimension with control of position, zoom. Also can be use to create parallax effect."); addNodeObject(compose, "Render Spritesheet", s_node_sprite_sheet, "Node_Render_Sprite_Sheet", [1, Node_Render_Sprite_Sheet],, "Create spritesheet from image array or animation."); addNodeObject(compose, "Pack Sprites", s_node_pack_sprite, "Node_Pack_Sprites", [1, Node_Pack_Sprites],, "Combine array of images with different dimension using different algorithms.").setVersion(1140); - - var renderNode = ds_list_create(); - addNodeCatagory("Render", renderNode); - ds_list_add(renderNode, "Renders"); - addNodeObject(renderNode, "Render Spritesheet", s_node_sprite_sheet, "Node_Render_Sprite_Sheet", [1, Node_Render_Sprite_Sheet]); - addNodeObject(renderNode, "Pack Sprites", s_node_pack_sprite, "Node_Pack_Sprites", [1, Node_Pack_Sprites]).setVersion(1140); - if(!DEMO) addNodeObject(renderNode, "Export", s_node_export, "Node_Export", [0, Node_create_Export]); - //addNodeObject(renderNode, "Preview timeline", s_node_timeline_preview,"Node_Timeline_Preview", [1, Node_create_Timeline_Preview]); + + if(!DEMO) { + ds_list_add(compose, "Export"); + addNodeObject(compose, "Export", s_node_export, "Node_Export", [0, Node_create_Export]); + } var values = ds_list_create(); addNodeCatagory("Values", values); @@ -427,15 +424,18 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { addNodeObject(values, "Scatter Points", s_node_scatter_point, "Node_Scatter_Points", [1, Node_Scatter_Points],, "Generate array of vector 2 points for scattering.").setVersion(1120); ds_list_add(values, "Texts"); - addNodeObject(values, "Text", s_node_text, "Node_String", [1, Node_String]); - addNodeObject(values, "Unicode", s_node_unicode, "Node_Unicode", [1, Node_Unicode]); - addNodeObject(values, "Text Length", s_node_text_length, "Node_String_Length", [1, Node_String_Length]).setVersion(1138); - addNodeObject(values, "Combine Text", s_node_text_combine, "Node_String_Merge", [1, Node_String_Merge]); - addNodeObject(values, "Join Text", s_node_text_join, "Node_String_Join", [1, Node_String_Join]).setVersion(1120); - addNodeObject(values, "Split Text", s_node_text_splice, "Node_String_Split", [1, Node_String_Split]); - addNodeObject(values, "Trim Text", s_node_text_trim, "Node_String_Trim", [1, Node_String_Trim]).setVersion(1080); - addNodeObject(values, "Get Character", s_node_text_char_get, "Node_String_Get_Char", [1, Node_String_Get_Char]).setVersion(1100); - + addNodeObject(values, "Text", s_node_text, "Node_String", [1, Node_String]); + addNodeObject(values, "Unicode", s_node_unicode, "Node_Unicode", [1, Node_Unicode]); + addNodeObject(values, "Text Length", s_node_text_length, "Node_String_Length", [1, Node_String_Length]).setVersion(1138); + addNodeObject(values, "Combine Text", s_node_text_combine, "Node_String_Merge", [1, Node_String_Merge]); + addNodeObject(values, "Join Text", s_node_text_join, "Node_String_Join", [1, Node_String_Join]).setVersion(1120); + addNodeObject(values, "Split Text", s_node_text_splice, "Node_String_Split", [1, Node_String_Split]); + addNodeObject(values, "Trim Text", s_node_text_trim, "Node_String_Trim", [1, Node_String_Trim]).setVersion(1080); + addNodeObject(values, "Get Character", s_node_text_char_get, "Node_String_Get_Char", [1, Node_String_Get_Char]).setVersion(1100); + addNodeObject(values, "RegEx Match", s_node_regex_match, "Node_String_Regex_Match", [1, Node_String_Regex_Match]).setVersion(1140); + addNodeObject(values, "RegEx Search", s_node_regex_search, "Node_String_Regex_Search", [1, Node_String_Regex_Search]).setVersion(1140); + addNodeObject(values, "RegEx Replace", s_node_regex_replace, "Node_String_Regex_Replace", [1, Node_String_Regex_Replace]).setVersion(1140); + ds_list_add(values, "Arrays"); addNodeObject(values, "Array", s_node_array, "Node_Array", [1, Node_Array]); addNodeObject(values, "Array Range", s_node_array_range, "Node_Array_Range", [1, Node_Array_Range],, "Create array of numbers by setting start, end and step length."); diff --git a/scripts/node_solid/node_solid.gml b/scripts/node_solid/node_solid.gml index 7ffc0eeff..213dd669e 100644 --- a/scripts/node_solid/node_solid.gml +++ b/scripts/node_solid/node_solid.gml @@ -21,6 +21,9 @@ function Node_Solid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con attribute_surface_depth(); + droppable = ["Color"]; + static onDrop = function() { inputs[| 1].setValue(DRAGGING.data); } + static process_data = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; var _col = _data[1]; diff --git a/scripts/node_string_regex_match/node_string_regex_match.gml b/scripts/node_string_regex_match/node_string_regex_match.gml new file mode 100644 index 000000000..ec96d7d7a --- /dev/null +++ b/scripts/node_string_regex_match/node_string_regex_match.gml @@ -0,0 +1,32 @@ +function Node_String_Regex_Match(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { + name = "RegEx Match"; + previewable = false; + + w = 96; + + inputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "") + .setVisible(true, true); + + inputs[| 1] = nodeValue("Regex", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); + + outputs[| 0] = nodeValue("Results", self, JUNCTION_CONNECT.output, VALUE_TYPE.boolean, false); + + input_display_list = [ + 0, 1, + ]; + + function process_data(_output, _data, _index = 0) { + var str = _data[0]; + var reg = _data[1]; + + return RegexMatch(str, reg); + } + + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + var str = inputs[| 0].getValue(); + var bbox = drawGetBbox(xx, yy, _s); + + draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text); + draw_text_bbox(bbox, str); + } +} \ No newline at end of file diff --git a/scripts/node_string_regex_match/node_string_regex_match.yy b/scripts/node_string_regex_match/node_string_regex_match.yy new file mode 100644 index 000000000..5edba1217 --- /dev/null +++ b/scripts/node_string_regex_match/node_string_regex_match.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_string_regex_match", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "texts", + "path": "folders/nodes/data/value/texts.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_string_regex_replace/node_string_regex_replace.gml b/scripts/node_string_regex_replace/node_string_regex_replace.gml new file mode 100644 index 000000000..ac93ec37c --- /dev/null +++ b/scripts/node_string_regex_replace/node_string_regex_replace.gml @@ -0,0 +1,35 @@ +function Node_String_Regex_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { + name = "RegEx Replace"; + previewable = false; + + w = 96; + + inputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "") + .setVisible(true, true); + + inputs[| 1] = nodeValue("Regex", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); + + inputs[| 2] = nodeValue("Replacement", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); + + outputs[| 0] = nodeValue("Results", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); + + input_display_list = [ + 0, 1, 2, + ]; + + function process_data(_output, _data, _index = 0) { + var str = _data[0]; + var reg = _data[1]; + var rep = _data[2]; + + return RegexReplace(str, reg, rep); + } + + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + var str = outputs[| 0].getValue(); + var bbox = drawGetBbox(xx, yy, _s); + + draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text); + draw_text_bbox(bbox, str); + } +} \ No newline at end of file diff --git a/scripts/node_string_regex_replace/node_string_regex_replace.yy b/scripts/node_string_regex_replace/node_string_regex_replace.yy new file mode 100644 index 000000000..51a3b257b --- /dev/null +++ b/scripts/node_string_regex_replace/node_string_regex_replace.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_string_regex_replace", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "texts", + "path": "folders/nodes/data/value/texts.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_string_regex_replace601/node_string_regex_replace601.gml b/scripts/node_string_regex_replace601/node_string_regex_replace601.gml deleted file mode 100644 index 5bc390814..000000000 --- a/scripts/node_string_regex_replace601/node_string_regex_replace601.gml +++ /dev/null @@ -1,3 +0,0 @@ -function node_string_regex_replace601(){ - -} \ No newline at end of file diff --git a/scripts/node_string_regex_search/node_string_regex_search.gml b/scripts/node_string_regex_search/node_string_regex_search.gml index f11b4632a..6b0783058 100644 --- a/scripts/node_string_regex_search/node_string_regex_search.gml +++ b/scripts/node_string_regex_search/node_string_regex_search.gml @@ -9,24 +9,22 @@ function Node_String_Regex_Search(_x, _y, _group = noone) : Node_Processor(_x, _ inputs[| 1] = nodeValue("Regex", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); - outputs[| 0] = nodeValue("Results", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); + outputs[| 0] = nodeValue("Results", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, []); input_display_list = [ - ["Text", false], 0, - ["RegEx", false], 1, + 0, 1, ]; - function step() { - var mode = inputs[| 4].getValue(); - } - function process_data(_output, _data, _index = 0) { var str = _data[0]; - return str; + var reg = _data[1]; + + var res = RegexSearch(str, reg); + return json_parse(res); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { - var str = outputs[| 0].getValue(); + var str = outputs[| 0].getValue(); var bbox = drawGetBbox(xx, yy, _s); draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text); diff --git a/scripts/node_string_regex_search600/node_string_regex_search600.gml b/scripts/node_string_regex_search600/node_string_regex_search600.gml deleted file mode 100644 index a53e34103..000000000 --- a/scripts/node_string_regex_search600/node_string_regex_search600.gml +++ /dev/null @@ -1,3 +0,0 @@ -function node_string_regex_search600(){ - -} \ No newline at end of file diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index 54e991aa9..f124542fc 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -1489,7 +1489,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru if(_map == undefined) return; if(_map == noone) return; - printIf(TESTING, " |- Applying deserialize to junction " + name + " of node " + node.name); + //printIf(TESTING, " |- Applying deserialize to junction " + name + " of node " + node.name); on_end = ds_map_try_get(_map, "on end", on_end); visible = ds_map_try_get(_map, "visible", visible); unit.mode = ds_map_try_get(_map, "unit", VALUE_UNIT.constant); diff --git a/scripts/paddingBox/paddingBox.gml b/scripts/paddingBox/paddingBox.gml index 6e7ff1708..210975685 100644 --- a/scripts/paddingBox/paddingBox.gml +++ b/scripts/paddingBox/paddingBox.gml @@ -68,8 +68,7 @@ function paddingBox(_onModify, _unit = noone) : widget() constructor { draw_sprite_ui_uniform(THEME.inspector_padding, 0, _x, _y + ui(64)); for(var i = 0; i < 4; i++) { - tb[i].hover = hover; - tb[i].active = active; + tb[i].setActiveFocus(hover, active); tb[i].align = fa_center; } @@ -78,8 +77,7 @@ function paddingBox(_onModify, _unit = noone) : widget() constructor { tb[2].draw(_x - ui(64) - ui(64), _y + ui(64 - 17), ui(64), TEXTBOX_HEIGHT, _data[2], _m); tb[3].draw(_x - ui(32), _y + ui(64 + 48 + 8), ui(64), TEXTBOX_HEIGHT, _data[3], _m); - b_link.hover = hover; - b_link.active = active; + b_link.setActiveFocus(hover, active); b_link.icon_index = linked; b_link.icon_blend = linked? COLORS._main_accent : COLORS._main_icon; b_link.tooltip = linked? "Unlink axis" : "Link axis"; @@ -89,9 +87,7 @@ function paddingBox(_onModify, _unit = noone) : widget() constructor { b_link.draw(bx + ui(4), by + ui(4), ui(24), ui(24), _m, THEME.button_hide); if(unit != noone && unit.reference != noone) { - unit.triggerButton.hover = ihover; - unit.triggerButton.active = iactive; - + unit.triggerButton.setActiveFocus(ihover, iactive); unit.draw(_x + ui(48), _y - ui(25), ui(32), ui(32), _m); } diff --git a/scripts/panel_collection/panel_collection.gml b/scripts/panel_collection/panel_collection.gml index c05386c1c..257c94a5f 100644 --- a/scripts/panel_collection/panel_collection.gml +++ b/scripts/panel_collection/panel_collection.gml @@ -24,11 +24,11 @@ function Panel_Collection() : PanelContent() constructor { search_list = ds_list_create(); file_dragging = noone; - _menu_node = noone; + _menu_node = noone; updated_path = noone; updated_prog = 0; - data_path = ""; + data_path = ""; static initMenu = function() { if(_menu_node == noone) return; @@ -113,7 +113,7 @@ function Panel_Collection() : PanelContent() constructor { tb_search.auto_update = true; contentView = 0; - contentPane = new scrollPane(content_w, content_h, function(_y, _m) { + contentPane = new scrollPane(content_w - ui(6), content_h, function(_y, _m) { draw_clear_alpha(c_white, 0); var nodes = search_string == ""? context.content : search_list; @@ -143,7 +143,7 @@ function Panel_Collection() : PanelContent() constructor { var yy = _y + grid_space; var name_height = 0; - grid_width = (contentPane.surface_w - grid_space) / col - grid_space; + grid_width = round(contentPane.surface_w - grid_space) / col - grid_space; hh += grid_space; @@ -280,7 +280,7 @@ function Panel_Collection() : PanelContent() constructor { return hh; }); - folderPane = new scrollPane(group_w - ui(4), content_h, function(_y, _m) { + folderPane = new scrollPane(group_w - ui(8), content_h, function(_y, _m) { draw_clear_alpha(COLORS.panel_bg_clear, 0); draw_sprite_stretched(THEME.ui_panel_bg, 0, ui(8), 0, folderPane.surface_w - ui(8), folderPane.surface_h); var hh = ui(8); @@ -300,9 +300,8 @@ function Panel_Collection() : PanelContent() constructor { function onResize() { initSize(); - folderPane.resize(group_w - ui(4), content_h); - contentPane.resize(content_w, content_h); - folderPane.resize(group_w - ui(4), content_h); + folderPane.resize(group_w - ui(8), content_h); + contentPane.resize(content_w - ui(6), content_h); } function setContext(cont) { @@ -341,10 +340,10 @@ function Panel_Collection() : PanelContent() constructor { var content_y = ui(48); draw_sprite_stretched(THEME.ui_panel_bg, 1, group_w, content_y, content_w, content_h); - contentPane.active = pHOVER; + contentPane.setActiveFocus(pFOCUS, pHOVER); contentPane.draw(group_w, content_y, mx - group_w, my - content_y); - folderPane.active = pHOVER; + folderPane.setActiveFocus(pFOCUS, pHOVER); folderPane.draw(0, content_y, mx, my - content_y); #region resize width @@ -461,56 +460,58 @@ function Panel_Collection() : PanelContent() constructor { tb_search.draw(tb_x, tb_y, tb_w, TEXTBOX_HEIGHT, search_string, [mx, my]); } - + } + + function drawGUI() { if(file_dragging) { if(file_dragging.spr) - draw_sprite_ext(file_dragging.spr, 0, mx, my, 1, 1, 0, c_white, 0.5); + draw_sprite_ext(file_dragging.spr, 0, mouse_mx, mouse_my, 1, 1, 0, c_white, 0.5); if(panelHover(PANEL_GRAPH)) - dragToGraph(); + dragToGraph(HOVER.getContent()); if(mouse_release(mb_left)) file_dragging = noone; } } - static dragToGraph = function() { + static dragToGraph = function(graph) { var path = file_dragging.path; - ds_list_clear(PANEL_GRAPH.nodes_select_list); + ds_list_clear(graph.nodes_select_list); if(string_lower(filename_ext(path)) == ".png") { var app = Node_create_Image_path(0, 0, path); - PANEL_GRAPH.node_focus = app; - PANEL_GRAPH.node_dragging = app; - PANEL_GRAPH.node_drag_sx = app.x; - PANEL_GRAPH.node_drag_sy = app.y; + graph.node_focus = app; + graph.node_dragging = app; + graph.node_drag_sx = app.x; + graph.node_drag_sy = app.y; } else { var app = APPEND(file_dragging.path); if(!is_struct(app) && ds_exists(app, ds_type_list)) { - PANEL_GRAPH.node_focus = noone; - ds_list_copy(PANEL_GRAPH.nodes_select_list, app); + graph.node_focus = noone; + ds_list_copy(graph.nodes_select_list, app); if(!ds_list_empty(app)) { - PANEL_GRAPH.node_dragging = app[| 0]; - PANEL_GRAPH.node_drag_sx = app[| 0].x; - PANEL_GRAPH.node_drag_sy = app[| 0].y; + graph.node_dragging = app[| 0]; + graph.node_drag_sx = app[| 0].x; + graph.node_drag_sy = app[| 0].y; } ds_list_destroy(app); } else { - PANEL_GRAPH.node_focus = app; - PANEL_GRAPH.node_dragging = app; - PANEL_GRAPH.node_drag_sx = app.x; - PANEL_GRAPH.node_drag_sy = app.y; + graph.node_focus = app; + graph.node_dragging = app; + graph.node_drag_sx = app.x; + graph.node_drag_sy = app.y; } } - PANEL_GRAPH.node_drag_mx = 0; - PANEL_GRAPH.node_drag_my = 0; + graph.node_drag_mx = 0; + graph.node_drag_my = 0; - PANEL_GRAPH.node_drag_ox = 0; - PANEL_GRAPH.node_drag_oy = 0; + graph.node_drag_ox = 0; + graph.node_drag_oy = 0; file_dragging = false; } diff --git a/scripts/panel_data/panel_data.gml b/scripts/panel_data/panel_data.gml index ce15635f4..965193112 100644 --- a/scripts/panel_data/panel_data.gml +++ b/scripts/panel_data/panel_data.gml @@ -649,12 +649,21 @@ function Panel(_parent, _x, _y, _w, _h) constructor { menuCall(,, menu); } } - } + } if(o_main.panel_dragging != noone && m_ot && !key_mod_press(CTRL)) checkHover(); } + function drawGUI() { + for( var i = 0; i < ds_list_size(childs); i++ ) + childs[| i].drawGUI(); + + var con = getContent(); + if(con == noone) return; + con.drawGUI(); + } + function extract() { var con = getContent(); con.dragSurface = surface_clone(content_surface); @@ -794,7 +803,8 @@ function PanelContent() constructor { y = 0; w = 640; h = 480; - padding = ui(16); + padding = ui(16); + title_height = ui(24); tab_x = 0; @@ -848,6 +858,7 @@ function PanelContent() constructor { function stepBegin() {} function draw(panel) { + self.panel = panel; pFOCUS = FOCUS == panel && panel.mouse_active; pHOVER = HOVER == panel && panel.mouse_active; @@ -855,6 +866,8 @@ function PanelContent() constructor { } function drawContent(panel) {} + + function drawGUI() {} } function setFocus(target, fstring = noone) { diff --git a/scripts/panel_function/panel_function.gml b/scripts/panel_function/panel_function.gml index 4e94670ba..207641cc7 100644 --- a/scripts/panel_function/panel_function.gml +++ b/scripts/panel_function/panel_function.gml @@ -58,6 +58,9 @@ case "Panel_Notification" : return new Panel_Notification(); case "Panel_Nodes" : return new Panel_Nodes(); case "Panel_Globalvar" : return new Panel_Globalvar(); + + case "Panel_Color" : return new Panel_Color(); + case "Panel_Palette" : return new Panel_Palette(); } return noone; diff --git a/scripts/panel_graph/panel_graph.gml b/scripts/panel_graph/panel_graph.gml index c7e38c538..8f1da7197 100644 --- a/scripts/panel_graph/panel_graph.gml +++ b/scripts/panel_graph/panel_graph.gml @@ -1718,6 +1718,38 @@ function Panel_Graph() : PanelContent() constructor { draw_text(w - ui(8), ui(28), get_text("panel_graph_rendering", "Rendering") + "..."); else if(UPDATE == RENDER_TYPE.full) draw_text(w - ui(8), ui(28), get_text("panel_graph_rendering_partial", "Rendering partial") + "..."); + + if(DRAGGING && pHOVER) { + var droppable = true; + if(node_hovering && array_exists(node_hovering.droppable, DRAGGING.type)) { + var n = node_hovering; + var nx = graph_x + n.x * graph_s; + var ny = graph_y + n.y * graph_s; + var nw = n.w * graph_s; + var nh = n.h * graph_s; + + draw_sprite_stretched_ext(THEME.ui_panel_active, 0, nx, ny, nw, nh, COLORS._main_value_positive, 1); + if(mouse_release(mb_left)) + node_hovering.onDrop(); + } else { + draw_sprite_stretched_ext(THEME.ui_panel_active, 0, 2, 2, w - 4, h - 4, COLORS._main_value_positive, 1); + if(mouse_release(mb_left)) + checkDropItem(); + } + } + } + + static checkDropItem = function() { + switch(DRAGGING.type) { + case "Color": + var node = nodeBuild("Node_Color", mouse_grid_x, mouse_grid_y, getCurrentContext()); + node.inputs[| 0].setValue(DRAGGING.data); + break; + case "Palette": + var node = nodeBuild("Node_Palette", mouse_grid_x, mouse_grid_y, getCurrentContext()); + node.inputs[| 0].setValue(DRAGGING.data); + break; + } } static bringNodeToFront = function(node) { diff --git a/scripts/panel_inspector/panel_inspector.gml b/scripts/panel_inspector/panel_inspector.gml index 00856fdb5..2494fc494 100644 --- a/scripts/panel_inspector/panel_inspector.gml +++ b/scripts/panel_inspector/panel_inspector.gml @@ -19,7 +19,7 @@ function Panel_Inspector() : PanelContent() constructor { prop_selecting = noone; function initSize() { - content_w = w - ui(28); + content_w = w - ui(32); content_h = h - top_bar_h - ui(12); } initSize(); @@ -271,8 +271,7 @@ function Panel_Inspector() : PanelContent() constructor { var hh = ui(40); //tb_prop_filter.register(contentPane); - //tb_prop_filter.active = pFOCUS; - //tb_prop_filter.hover = pHOVER; + //tb_prop_filter.setActiveFocus(pHOVER, pFOCUS); //tb_prop_filter.draw(ui(32), _y + ui(4), con_w - ui(64), ui(28), filter_text, _m); //draw_sprite_ui(THEME.search, 0, ui(32 + 16), _y + ui(4 + 14), 1, 1, 0, COLORS._main_icon, 1); @@ -505,8 +504,7 @@ function Panel_Inspector() : PanelContent() constructor { function drawInspectingNode() { tb_node_name.font = f_h5; tb_node_name.hide = true; - tb_node_name.active = pFOCUS; - tb_node_name.hover = pHOVER; + tb_node_name.setActiveFocus(pFOCUS, pHOVER); tb_node_name.align = fa_center; var txt = inspecting.display_name == ""? inspecting.name : inspecting.display_name; tb_node_name.draw(ui(64), ui(14), w - ui(128), ui(32), txt, [mx, my], VALUE_DISPLAY.node_title); @@ -608,7 +606,7 @@ function Panel_Inspector() : PanelContent() constructor { } } - contentPane.active = pHOVER; + contentPane.setActiveFocus(pFOCUS, pHOVER); contentPane.draw(ui(16), top_bar_h, mx - ui(16), my - top_bar_h); if(!locked && PANEL_GRAPH.node_focus && inspecting != PANEL_GRAPH.node_focus) { diff --git a/scripts/panel_menu/panel_menu.gml b/scripts/panel_menu/panel_menu.gml index 52561f641..70de8d1f1 100644 --- a/scripts/panel_menu/panel_menu.gml +++ b/scripts/panel_menu/panel_menu.gml @@ -177,9 +177,21 @@ function Panel_Menu() : PanelContent() constructor { menuItem(get_text("panel_menu_workspace", "Workspace"), function() { panelAdd("Panel_Workspace", true) },,, function() { return findPanel("Panel_Workspace") != noone; } ), menuItem(get_text("panel_menu_animation", "Animation"), function() { panelAdd("Panel_Animation", true) },,, function() { return findPanel("Panel_Animation") != noone; } ), menuItem(get_text("panel_menu_notification", "Notification"), function() { panelAdd("Panel_Notification", true) },,, function() { return findPanel("Panel_Notification") != noone; } ), - menuItem(get_text("panel_menu_nodes", "Nodes"), function() { panelAdd("Panel_Nodes", true) },,, function() { return findPanel("Panel_Nodes") != noone; } ), menuItem(get_text("panel_menu_globalvar", "Global Variables"), function() { panelAdd("Panel_Globalvar", true) },,, function() { return findPanel("Panel_Globalvar") != noone; } ), - menuItem(get_text("tunnels", "Tunnels"), function() { panelAdd("Panel_Tunnels", true) },,, function() { return findPanel("Panel_Tunnels") != noone; } ), + + menuItem(get_text("panel_menu_nodes", "Nodes"), function(_x, _y, _depth) { + return submenuCall(_x, _y, _depth, [ + menuItem(get_text("panel_menu_nodes", "Nodes"), function() { panelAdd("Panel_Nodes", true) },,, function() { return findPanel("Panel_Nodes") != noone; } ), + menuItem(get_text("tunnels", "Tunnels"), function() { panelAdd("Panel_Tunnels", true) },,, function() { return findPanel("Panel_Tunnels") != noone; } ), + ]); + } ).setIsShelf(), + + menuItem(get_text("panel_menu_color", "Color"), function(_x, _y, _depth) { + return submenuCall(_x, _y, _depth, [ + menuItem(get_text("panel_menu_color", "Color"), function() { panelAdd("Panel_Color", true) },,, function() { return findPanel("Panel_Color") != noone; } ), + menuItem(get_text("panel_menu_palette", "Palette"), function() { panelAdd("Panel_Palette", true) },,, function() { return findPanel("Panel_Palette") != noone; } ), + ]); + } ).setIsShelf(), ]], [ get_text("panel_menu_help", "Help"), menu_help ], ] diff --git a/scripts/panel_palette603/panel_palette603.gml b/scripts/panel_palette603/panel_palette603.gml deleted file mode 100644 index d64ba82ad..000000000 --- a/scripts/panel_palette603/panel_palette603.gml +++ /dev/null @@ -1,3 +0,0 @@ -function panel_palette603(){ - -} \ No newline at end of file diff --git a/scripts/panel_preview/panel_preview.gml b/scripts/panel_preview/panel_preview.gml index cbd5744ad..de398b3c4 100644 --- a/scripts/panel_preview/panel_preview.gml +++ b/scripts/panel_preview/panel_preview.gml @@ -307,8 +307,7 @@ function Panel_Preview() : PanelContent() constructor { ww = max(ww, string_width(_node.outputs[| i].name) + ui(40)); } sbChannel.data_list = chName; - sbChannel.hover = pHOVER; - sbChannel.active = pFOCUS; + sbChannel.setActiveFocus(pFOCUS, pHOVER); sbChannel.draw(_x - ww, _y - hh / 2, ww, hh, currName, [mx, my], x, y); right_menu_y += ui(40); diff --git a/scripts/panel_preview_window/panel_preview_window.gml b/scripts/panel_preview_window/panel_preview_window.gml index 7950499dc..bb5fbaf78 100644 --- a/scripts/panel_preview_window/panel_preview_window.gml +++ b/scripts/panel_preview_window/panel_preview_window.gml @@ -56,11 +56,6 @@ function Panel_Preview_Window() : PanelContent() constructor { ] function drawContent(panel) { - var px = 0; - var py = 0; - var pw = w; - var ph = h; - if(node_target == noone) return; title = node_target.getFullName(); surfaceCheck(); @@ -85,9 +80,9 @@ function Panel_Preview_Window() : PanelContent() constructor { var sw = surface_get_width(s); var sh = surface_get_height(s); if(scale == 0) - scale = min(pw / sw, ph / sh); - var sx = dx + pw / 2 - (sw * scale) / 2 + panx; - var sy = dy + ph / 2 - (sh * scale) / 2 + pany; + scale = min(w / sw, h / sh); + var sx = dx + w / 2 - (sw * scale) / 2 + panx; + var sy = dy + h / 2 - (sh * scale) / 2 + pany; draw_surface_ext_safe(s, sx, sy, scale, scale, 0, c_white, 1); draw_set_color(COLORS._main_icon); @@ -101,7 +96,7 @@ function Panel_Preview_Window() : PanelContent() constructor { dx += (sw + 2) * scale; } surface_reset_target(); - draw_surface_safe(content_surface, px, py); + draw_surface_safe(content_surface, 0, 0); if(panning) { panx = pan_sx + (mouse_mx - pan_mx); diff --git a/scripts/panel_preview_window602/panel_preview_window602.gml b/scripts/panel_preview_window602/panel_preview_window602.gml deleted file mode 100644 index fb41157d3..000000000 --- a/scripts/panel_preview_window602/panel_preview_window602.gml +++ /dev/null @@ -1,3 +0,0 @@ -function panel_preview_window602(){ - -} \ No newline at end of file diff --git a/scripts/panel_tunnels/panel_tunnels.gml b/scripts/panel_tunnels/panel_tunnels.gml index 2de718f14..2e14608b1 100644 --- a/scripts/panel_tunnels/panel_tunnels.gml +++ b/scripts/panel_tunnels/panel_tunnels.gml @@ -1,14 +1,13 @@ function Panel_Tunnels() : PanelContent() constructor { - #region data - title = "Tunnels"; - showHeader = false; + title = "Tunnels"; + showHeader = false; + title_height = 64; + padding = 24; + #region data w = ui(320); h = ui(480); - title_height = 64; - padding = 24; - build_x = 0; build_y = 0; diff --git a/scripts/pathArrayBox/pathArrayBox.gml b/scripts/pathArrayBox/pathArrayBox.gml index ea7ed1e74..1dab2f600 100644 --- a/scripts/pathArrayBox/pathArrayBox.gml +++ b/scripts/pathArrayBox/pathArrayBox.gml @@ -22,8 +22,7 @@ function pathArrayBox(_target, _data, _onClick) : widget() constructor { w = _w; h = _h; - openPath.hover = hover; - openPath.active = active; + openPath.setActiveFocus(hover, active); openPath.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide); _w -= ui(40); diff --git a/scripts/rangeBox/rangeBox.gml b/scripts/rangeBox/rangeBox.gml index b5250c3f2..443cef829 100644 --- a/scripts/rangeBox/rangeBox.gml +++ b/scripts/rangeBox/rangeBox.gml @@ -54,8 +54,7 @@ function rangeBox(_type, _onModify) : widget() constructor { w = _w; h = _h; - b_link.hover = hover; - b_link.active = active; + b_link.setActiveFocus(hover, active); b_link.icon_index = linked; b_link.icon_blend = linked? COLORS._main_accent : COLORS._main_icon; b_link.tooltip = linked? "Unlink axis" : "Link axis"; @@ -68,9 +67,7 @@ function rangeBox(_type, _onModify) : widget() constructor { _w -= ui(28); if(extras != -1 && is_struct(extras) && instanceof(extras) == "buttonClass") { - extras.hover = hover; - extras.active = active; - + extras.setActiveFocus(hover, active); extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide); _w -= ui(40); } @@ -78,8 +75,7 @@ function rangeBox(_type, _onModify) : widget() constructor { if(is_array(_data) && array_length(_data) >= 2) { var ww = _w / 2; for(var i = 0; i < 2; i++) { - tb[i].hover = hover; - tb[i].active = active; + tb[i].setActiveFocus(hover, active); var bx = _x + ww * i; tb[i].draw(bx + ui(44), _y, ww - ui(44), _h, _data[i], _m); diff --git a/scripts/rotator/rotator.gml b/scripts/rotator/rotator.gml index 5330d9330..2a2f3804c 100644 --- a/scripts/rotator/rotator.gml +++ b/scripts/rotator/rotator.gml @@ -33,8 +33,7 @@ function rotator(_onModify, _step = -1) : widget() constructor { var knob_y = _y + ui(48) * scale; if(draw_tb) { - tb_value.hover = hover; - tb_value.active = active; + tb_value.setActiveFocus(hover, active); tb_value.draw(_x + ui(64), knob_y - ui(17), ui(64), TEXTBOX_HEIGHT, _data, _m); } diff --git a/scripts/rotatorRange/rotatorRange.gml b/scripts/rotatorRange/rotatorRange.gml index bc836cd46..57e0d25a8 100644 --- a/scripts/rotatorRange/rotatorRange.gml +++ b/scripts/rotatorRange/rotatorRange.gml @@ -33,10 +33,8 @@ function rotatorRange(_onModify) : widget() constructor { var knob_y = _y + ui(48); - tb_min.active = active; - tb_min.hover = hover; - tb_max.active = active; - tb_max.hover = hover; + tb_min.setActiveFocus(hover, active); + tb_max.setActiveFocus(hover, active); tb_min.draw(_x - ui(40 + 16 + 80), knob_y - TEXTBOX_HEIGHT / 2, ui(80), TEXTBOX_HEIGHT, array_safe_get(_data, 0), _m); tb_max.draw(_x + ui(40 + 16), knob_y - TEXTBOX_HEIGHT / 2, ui(80), TEXTBOX_HEIGHT, array_safe_get(_data, 1), _m); diff --git a/scripts/scrollBox/scrollBox.gml b/scripts/scrollBox/scrollBox.gml index 16b0fe7b4..ef7471944 100644 --- a/scripts/scrollBox/scrollBox.gml +++ b/scripts/scrollBox/scrollBox.gml @@ -37,8 +37,7 @@ function scrollBox(_data, _onModify, update_hover = true) : widget() constructor w = _w; if(extra_button != noone) { - extra_button.hover = hover; - extra_button.active = active; + extra_button.setActiveFocus(hover, active); extra_button.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide); w -= ui(40); } diff --git a/scripts/scrollPane/scrollPane.gml b/scripts/scrollPane/scrollPane.gml index ff400c5a5..79d3e3052 100644 --- a/scripts/scrollPane/scrollPane.gml +++ b/scripts/scrollPane/scrollPane.gml @@ -40,7 +40,7 @@ function scrollPane(_w, _h, ondraw) : widget() constructor { self.y = y; var mx = _mx, my = _my; - hover = point_in_rectangle(mx, my, 0, 0, surface_w, surface_h); + hover &= point_in_rectangle(mx, my, 0, 0, surface_w, surface_h); if(!is_surface(surface)) surface = surface_create_valid(surface_w, surface_h); surface_set_target(surface); @@ -59,13 +59,14 @@ function scrollPane(_w, _h, ondraw) : widget() constructor { scroll_y = round(scroll_y_raw); draw_surface_safe(surface, x, y); - if(active && !key_mod_press(SHIFT) && point_in_rectangle(mx, my, 0, 0, surface_w, surface_h)) { + if(hover && !key_mod_press(SHIFT)) { if(mouse_wheel_down()) scroll_y_to -= scroll_step; if(mouse_wheel_up()) scroll_y_to += scroll_step; } if(abs(content_h) > 0) { - draw_scroll(x + surface_w + ui(4), y + ui(6), true, surface_h - ui(12), -scroll_y / content_h, surface_h / (surface_h + content_h), + var scr_w = sprite_get_width(THEME.ui_scrollbar); + draw_scroll(x + w - scr_w, y + ui(6), true, surface_h - ui(12), -scroll_y / content_h, surface_h / (surface_h + content_h), COLORS.scrollbar_bg, COLORS.scrollbar_idle, COLORS.scrollbar_hover, x + _mx, y + _my); } } diff --git a/scripts/shader_functions/shader_functions.gml b/scripts/shader_functions/shader_functions.gml index 2dcebbe6e..256a37185 100644 --- a/scripts/shader_functions/shader_functions.gml +++ b/scripts/shader_functions/shader_functions.gml @@ -1,4 +1,5 @@ -function shader_set_i(shader, uniform, value) { +function shader_set_i(uniform, value) { + var shader = shader_current(); if(is_array(value)) { shader_set_i_array(shader, uniform, value); return; @@ -19,7 +20,8 @@ function shader_set_i_array(shader, uniform, array) { shader_set_uniform_i_array(shader_get_uniform(shader, uniform), array); } -function shader_set_f(shader, uniform, value) { +function shader_set_f(uniform, value) { + var shader = shader_current(); if(is_array(value)) { shader_set_f_array(shader, uniform, value); return; @@ -47,7 +49,8 @@ function shader_set_uniform_f_array_safe(uniform, array) { shader_set_uniform_f_array(uniform, array); } -function shader_set_surface(shader, sampler, surface) { +function shader_set_surface(sampler, surface) { + var shader = shader_current(); if(!is_surface(surface)) return; var t = shader_get_sampler_index(shader, sampler); @@ -68,8 +71,8 @@ function shader_set_surface(shader, sampler, surface) { var intp = ds_map_try_get(attributes, "interpolation", 0); gpu_set_tex_filter(intp); - shader_set_i(shader, "interpolation", intp); - shader_set_f(shader, "sampleDimension", surface_get_width(surface), surface_get_height(surface)); + shader_set_i("interpolation", intp); + shader_set_f("sampleDimension", surface_get_width(surface), surface_get_height(surface)); } function surface_set_shader(surface, shader = sh_sample, clear = true, blend = BLEND.over) { diff --git a/scripts/slider/slider.gml b/scripts/slider/slider.gml index 3db619e7a..c8eaeefc0 100644 --- a/scripts/slider/slider.gml +++ b/scripts/slider/slider.gml @@ -63,8 +63,7 @@ function slider(_min, _max, _step, _onModify = noone, _onRelease = noone) : widg if(tb_w > 0) { sw = _w - (tb_w + ui(16)); - tb_value.hover = hover; - tb_value.active = active; + tb_value.setActiveFocus(hover, active); tb_value.draw(_x + sw + ui(16), _y, tb_w, _h, _data, _m); } diff --git a/scripts/sliderRange/sliderRange.gml b/scripts/sliderRange/sliderRange.gml index f394e6419..b9afd946b 100644 --- a/scripts/sliderRange/sliderRange.gml +++ b/scripts/sliderRange/sliderRange.gml @@ -40,12 +40,10 @@ function sliderRange(_min, _max, _step, _onModify) : widget() constructor { var tb_w = ui(64); var sw = _w - (tb_w + ui(16)) * 2; - tb_value_min.hover = hover; - tb_value_min.active = active; + tb_value_min.setActiveFocus(hover, active); tb_value_min.draw(_x, _y, tb_w, TEXTBOX_HEIGHT, _data[0], _m); - tb_value_max.hover = hover; - tb_value_max.active = active; + tb_value_max.setActiveFocus(hover, active); tb_value_max.draw(_x + _w - tb_w, _y, tb_w, TEXTBOX_HEIGHT, _data[1], _m); var _x0 = _x + tb_w + ui(16); diff --git a/scripts/string_decimal/string_decimal.gml b/scripts/string_decimal/string_decimal.gml index 61de69cca..342a0c436 100644 --- a/scripts/string_decimal/string_decimal.gml +++ b/scripts/string_decimal/string_decimal.gml @@ -15,7 +15,7 @@ function toNumber(str) { var expo = 0; if(string_pos("e", str)) { var pos = string_pos("e", str); - expo = toNumber(string_copy(str, pos + 1, string_length(str) - pos)); + expo = real(string_copy(str, pos + 1, string_length(str) - pos)); } str = string_replace_all(str, ",", "."); diff --git a/scripts/textArea/textArea.gml b/scripts/textArea/textArea.gml index edb094716..5c2419e53 100644 --- a/scripts/textArea/textArea.gml +++ b/scripts/textArea/textArea.gml @@ -369,9 +369,7 @@ function textArea(_input, _onModify, _extras = noone) : textInput(_input, _onMod //} if(extras && instanceof(extras) == "buttonClass") { - extras.hover = hover; - extras.active = active; - + extras.setActiveFocus(hover, active); extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide); _w -= ui(40); } diff --git a/scripts/textBox/textBox.gml b/scripts/textBox/textBox.gml index 27237b154..5a4983eaf 100644 --- a/scripts/textBox/textBox.gml +++ b/scripts/textBox/textBox.gml @@ -305,9 +305,7 @@ function textBox(_input, _onModify, _extras = noone) : textInput(_input, _onModi h = _h; if(extras && instanceof(extras) == "buttonClass") { - extras.hover = hover; - extras.active = active; - + extras.setActiveFocus(hover, active); extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide); _w -= ui(40); } diff --git a/scripts/vectorBox/vectorBox.gml b/scripts/vectorBox/vectorBox.gml index 776468acb..8150ad0d2 100644 --- a/scripts/vectorBox/vectorBox.gml +++ b/scripts/vectorBox/vectorBox.gml @@ -73,9 +73,7 @@ function vectorBox(_size, _type, _onModify, _unit = noone) : widget() constructo if(!is_array(_data)) return; if(extras && instanceof(extras) == "buttonClass") { - extras.hover = hover; - extras.active = active; - + extras.setActiveFocus(hover, active); extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide); _w -= ui(40); } @@ -83,15 +81,12 @@ function vectorBox(_size, _type, _onModify, _unit = noone) : widget() constructo if(unit != noone && unit.reference != noone) { _w += ui(4); - unit.triggerButton.hover = ihover; - unit.triggerButton.active = iactive; - + unit.triggerButton.setActiveFocus(ihover, iactive); unit.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m); _w -= ui(40); } - b_link.hover = hover; - b_link.active = active; + b_link.setActiveFocus(hover, active); b_link.icon_index = linked; b_link.icon_blend = linked? COLORS._main_accent : COLORS._main_icon; b_link.tooltip = linked? "Unlink axis" : "Link axis"; @@ -106,8 +101,7 @@ function vectorBox(_size, _type, _onModify, _unit = noone) : widget() constructo var sz = min(size, array_length(_data)); var ww = _w / sz; for(var i = 0; i < sz; i++) { - tb[i].hover = hover; - tb[i].active = active; + tb[i].setActiveFocus(hover, active); var bx = _x + ww * i; tb[i].draw(bx + ui(24), _y, ww - ui(24), _h, _data[i], _m); diff --git a/scripts/vectorRangeBox/vectorRangeBox.gml b/scripts/vectorRangeBox/vectorRangeBox.gml index d9d0b2f26..dbd00697f 100644 --- a/scripts/vectorRangeBox/vectorRangeBox.gml +++ b/scripts/vectorRangeBox/vectorRangeBox.gml @@ -63,8 +63,7 @@ function vectorRangeBox(_size, _type, _onModify, _unit = noone) : widget() const w = _w; h = _h * 2 + ui(4); - b_link.hover = hover; - b_link.active = active; + b_link.setActiveFocus(hover, active); b_link.icon_index = linked; b_link.icon_blend = linked? COLORS._main_accent : COLORS._main_icon; b_link.tooltip = linked? "Unlink axis" : "Link axis"; @@ -77,17 +76,14 @@ function vectorRangeBox(_size, _type, _onModify, _unit = noone) : widget() const _w -= ui(28); if(extras && instanceof(extras) == "buttonClass") { - extras.hover = hover; - extras.active = active; - + extras.setActiveFocus(hover, active); extras.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide); _w -= ui(40); } var ww = _w / size * 2; for(var i = 0; i < size; i++) { - tb[i].hover = hover; - tb[i].active = active; + tb[i].setActiveFocus(hover, active); var bx = _x + ww * floor(i / 2); var by = _y + i % 2 * (_h + ui(4)); diff --git a/shaders/Shader178/Shader178.fsh b/shaders/Shader178/Shader178.fsh deleted file mode 100644 index e28a17897..000000000 --- a/shaders/Shader178/Shader178.fsh +++ /dev/null @@ -1,10 +0,0 @@ -// -// Simple passthrough fragment shader -// -varying vec2 v_vTexcoord; -varying vec4 v_vColour; - -void main() -{ - gl_FragColor = v_vColour * texture2D( gm_BaseTexture, v_vTexcoord ); -} diff --git a/shaders/sh_color_select_content/sh_color_select_content.fsh b/shaders/sh_color_select_content/sh_color_select_content.fsh new file mode 100644 index 000000000..8f10a2460 --- /dev/null +++ b/shaders/sh_color_select_content/sh_color_select_content.fsh @@ -0,0 +1,22 @@ +// +// Simple passthrough fragment shader +// +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +uniform int mode; +uniform float hue; +uniform float val; + +vec3 hsv2rgb(vec3 c) { + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); +} + +void main() { + if(mode == 0) + gl_FragColor = vec4(hsv2rgb(vec3(hue, v_vTexcoord.x, 1. - v_vTexcoord.y)), 1.); + else if(mode == 1) + gl_FragColor = vec4(hsv2rgb(vec3(v_vTexcoord.x, 1. - v_vTexcoord.y, val)), 1.); +} diff --git a/shaders/Shader178/Shader178.vsh b/shaders/sh_color_select_content/sh_color_select_content.vsh similarity index 100% rename from shaders/Shader178/Shader178.vsh rename to shaders/sh_color_select_content/sh_color_select_content.vsh diff --git a/shaders/sh_color_select_content/sh_color_select_content.yy b/shaders/sh_color_select_content/sh_color_select_content.yy new file mode 100644 index 000000000..8e0e1b644 --- /dev/null +++ b/shaders/sh_color_select_content/sh_color_select_content.yy @@ -0,0 +1,10 @@ +{ + "resourceType": "GMShader", + "resourceVersion": "1.0", + "name": "sh_color_select_content", + "parent": { + "name": "color selector", + "path": "folders/shader/color selector.yy", + }, + "type": 1, +} \ No newline at end of file diff --git a/shaders/sh_color_select_side/sh_color_select_side.fsh b/shaders/sh_color_select_side/sh_color_select_side.fsh new file mode 100644 index 000000000..17612d177 --- /dev/null +++ b/shaders/sh_color_select_side/sh_color_select_side.fsh @@ -0,0 +1,21 @@ +// +// Simple passthrough fragment shader +// +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +uniform int mode; +uniform float hue; + +vec3 hsv2rgb(vec3 c) { + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); +} + +void main() { + if(mode == 0) + gl_FragColor = vec4(hsv2rgb(vec3(v_vTexcoord.y, 1., 1.)), 1.); + else if(mode == 1) + gl_FragColor = vec4(hsv2rgb(vec3(hue, 1., 1. - v_vTexcoord.y)), 1.); +} diff --git a/shaders/sh_color_select_side179/sh_color_select_side179.vsh b/shaders/sh_color_select_side/sh_color_select_side.vsh similarity index 100% rename from shaders/sh_color_select_side179/sh_color_select_side179.vsh rename to shaders/sh_color_select_side/sh_color_select_side.vsh diff --git a/shaders/sh_color_select_side/sh_color_select_side.yy b/shaders/sh_color_select_side/sh_color_select_side.yy new file mode 100644 index 000000000..819659b45 --- /dev/null +++ b/shaders/sh_color_select_side/sh_color_select_side.yy @@ -0,0 +1,10 @@ +{ + "resourceType": "GMShader", + "resourceVersion": "1.0", + "name": "sh_color_select_side", + "parent": { + "name": "color selector", + "path": "folders/shader/color selector.yy", + }, + "type": 1, +} \ No newline at end of file diff --git a/shaders/sh_color_select_side179/sh_color_select_side179.fsh b/shaders/sh_color_select_side179/sh_color_select_side179.fsh deleted file mode 100644 index e28a17897..000000000 --- a/shaders/sh_color_select_side179/sh_color_select_side179.fsh +++ /dev/null @@ -1,10 +0,0 @@ -// -// Simple passthrough fragment shader -// -varying vec2 v_vTexcoord; -varying vec4 v_vColour; - -void main() -{ - gl_FragColor = v_vColour * texture2D( gm_BaseTexture, v_vTexcoord ); -} diff --git a/sprites/s_node_regex_match/04450ea2-1694-49f2-aaec-77d2e8e5e5d3.png b/sprites/s_node_regex_match/04450ea2-1694-49f2-aaec-77d2e8e5e5d3.png new file mode 100644 index 000000000..7f023049f Binary files /dev/null and b/sprites/s_node_regex_match/04450ea2-1694-49f2-aaec-77d2e8e5e5d3.png differ diff --git a/sprites/s_node_regex_match/layers/04450ea2-1694-49f2-aaec-77d2e8e5e5d3/8ec94179-93c4-4944-b587-f4506d8c6206.png b/sprites/s_node_regex_match/layers/04450ea2-1694-49f2-aaec-77d2e8e5e5d3/8ec94179-93c4-4944-b587-f4506d8c6206.png new file mode 100644 index 000000000..7f023049f Binary files /dev/null and b/sprites/s_node_regex_match/layers/04450ea2-1694-49f2-aaec-77d2e8e5e5d3/8ec94179-93c4-4944-b587-f4506d8c6206.png differ diff --git a/sprites/s_node_regex_match/s_node_regex_match.yy b/sprites/s_node_regex_match/s_node_regex_match.yy new file mode 100644 index 000000000..4eeb8a53b --- /dev/null +++ b/sprites/s_node_regex_match/s_node_regex_match.yy @@ -0,0 +1,74 @@ +{ + "resourceType": "GMSprite", + "resourceVersion": "1.0", + "name": "s_node_regex_match", + "bbox_bottom": 51, + "bbox_left": 3, + "bbox_right": 61, + "bbox_top": 9, + "bboxMode": 0, + "collisionKind": 1, + "collisionTolerance": 0, + "DynamicTexturePage": false, + "edgeFiltering": false, + "For3D": false, + "frames": [ + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"04450ea2-1694-49f2-aaec-77d2e8e5e5d3",}, + ], + "gridX": 0, + "gridY": 0, + "height": 64, + "HTile": false, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"8ec94179-93c4-4944-b587-f4506d8c6206","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + ], + "nineSlice": null, + "origin": 4, + "parent": { + "name": "texts", + "path": "folders/nodes/icons/value/texts.yy", + }, + "preMultiplyAlpha": false, + "sequence": { + "resourceType": "GMSequence", + "resourceVersion": "1.4", + "name": "s_node_regex_match", + "autoRecord": true, + "backdropHeight": 768, + "backdropImageOpacity": 0.5, + "backdropImagePath": "", + "backdropWidth": 1366, + "backdropXOffset": 0.0, + "backdropYOffset": 0.0, + "events": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "eventStubScript": null, + "eventToFunction": {}, + "length": 1.0, + "lockOrigin": false, + "moments": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "playback": 1, + "playbackSpeed": 30.0, + "playbackSpeedType": 0, + "showBackdrop": true, + "showBackdropImage": false, + "timeUnits": 1, + "tracks": [ + {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[ + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"04450ea2-1694-49f2-aaec-77d2e8e5e5d3","path":"sprites/s_node_regex_match/s_node_regex_match.yy",},},},"Disabled":false,"id":"3fc6ec2d-416e-468d-a3a8-ad4fb264114e","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, + ], + "visibleRange": null, + "volume": 1.0, + "xorigin": 32, + "yorigin": 32, + }, + "swatchColours": null, + "swfPrecision": 2.525, + "textureGroupId": { + "name": "Default", + "path": "texturegroups/Default", + }, + "type": 0, + "VTile": false, + "width": 64, +} \ No newline at end of file diff --git a/sprites/s_node_regex_replace/45218b7c-326b-4ac4-8179-80cd601782ba.png b/sprites/s_node_regex_replace/45218b7c-326b-4ac4-8179-80cd601782ba.png new file mode 100644 index 000000000..f27538d05 Binary files /dev/null and b/sprites/s_node_regex_replace/45218b7c-326b-4ac4-8179-80cd601782ba.png differ diff --git a/sprites/s_node_regex_replace/layers/45218b7c-326b-4ac4-8179-80cd601782ba/d971bc08-524c-4881-8202-5b70474a913c.png b/sprites/s_node_regex_replace/layers/45218b7c-326b-4ac4-8179-80cd601782ba/d971bc08-524c-4881-8202-5b70474a913c.png new file mode 100644 index 000000000..f27538d05 Binary files /dev/null and b/sprites/s_node_regex_replace/layers/45218b7c-326b-4ac4-8179-80cd601782ba/d971bc08-524c-4881-8202-5b70474a913c.png differ diff --git a/sprites/s_node_regex_replace/s_node_regex_replace.yy b/sprites/s_node_regex_replace/s_node_regex_replace.yy new file mode 100644 index 000000000..dc789a68e --- /dev/null +++ b/sprites/s_node_regex_replace/s_node_regex_replace.yy @@ -0,0 +1,74 @@ +{ + "resourceType": "GMSprite", + "resourceVersion": "1.0", + "name": "s_node_regex_replace", + "bbox_bottom": 57, + "bbox_left": 8, + "bbox_right": 56, + "bbox_top": 9, + "bboxMode": 0, + "collisionKind": 1, + "collisionTolerance": 0, + "DynamicTexturePage": false, + "edgeFiltering": false, + "For3D": false, + "frames": [ + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"45218b7c-326b-4ac4-8179-80cd601782ba",}, + ], + "gridX": 0, + "gridY": 0, + "height": 64, + "HTile": false, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"d971bc08-524c-4881-8202-5b70474a913c","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + ], + "nineSlice": null, + "origin": 4, + "parent": { + "name": "texts", + "path": "folders/nodes/icons/value/texts.yy", + }, + "preMultiplyAlpha": false, + "sequence": { + "resourceType": "GMSequence", + "resourceVersion": "1.4", + "name": "s_node_regex_replace", + "autoRecord": true, + "backdropHeight": 768, + "backdropImageOpacity": 0.5, + "backdropImagePath": "", + "backdropWidth": 1366, + "backdropXOffset": 0.0, + "backdropYOffset": 0.0, + "events": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "eventStubScript": null, + "eventToFunction": {}, + "length": 1.0, + "lockOrigin": false, + "moments": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "playback": 1, + "playbackSpeed": 30.0, + "playbackSpeedType": 0, + "showBackdrop": true, + "showBackdropImage": false, + "timeUnits": 1, + "tracks": [ + {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[ + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"45218b7c-326b-4ac4-8179-80cd601782ba","path":"sprites/s_node_regex_replace/s_node_regex_replace.yy",},},},"Disabled":false,"id":"60528a3c-cf44-4a5e-b0ff-78a3cd514747","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, + ], + "visibleRange": null, + "volume": 1.0, + "xorigin": 32, + "yorigin": 32, + }, + "swatchColours": null, + "swfPrecision": 2.525, + "textureGroupId": { + "name": "Default", + "path": "texturegroups/Default", + }, + "type": 0, + "VTile": false, + "width": 64, +} \ No newline at end of file diff --git a/sprites/s_node_regex_search/f5d7c358-341c-45e8-ba80-dc202953e3d0.png b/sprites/s_node_regex_search/f5d7c358-341c-45e8-ba80-dc202953e3d0.png new file mode 100644 index 000000000..bc1c4ffe9 Binary files /dev/null and b/sprites/s_node_regex_search/f5d7c358-341c-45e8-ba80-dc202953e3d0.png differ diff --git a/sprites/s_node_regex_search/layers/f5d7c358-341c-45e8-ba80-dc202953e3d0/4afdb023-b0f8-4e7e-9a56-e302c83e4c06.png b/sprites/s_node_regex_search/layers/f5d7c358-341c-45e8-ba80-dc202953e3d0/4afdb023-b0f8-4e7e-9a56-e302c83e4c06.png new file mode 100644 index 000000000..bc1c4ffe9 Binary files /dev/null and b/sprites/s_node_regex_search/layers/f5d7c358-341c-45e8-ba80-dc202953e3d0/4afdb023-b0f8-4e7e-9a56-e302c83e4c06.png differ diff --git a/sprites/s_node_regex_search/s_node_regex_search.yy b/sprites/s_node_regex_search/s_node_regex_search.yy new file mode 100644 index 000000000..87fdebdf9 --- /dev/null +++ b/sprites/s_node_regex_search/s_node_regex_search.yy @@ -0,0 +1,74 @@ +{ + "resourceType": "GMSprite", + "resourceVersion": "1.0", + "name": "s_node_regex_search", + "bbox_bottom": 51, + "bbox_left": 7, + "bbox_right": 56, + "bbox_top": 9, + "bboxMode": 0, + "collisionKind": 1, + "collisionTolerance": 0, + "DynamicTexturePage": false, + "edgeFiltering": false, + "For3D": false, + "frames": [ + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"f5d7c358-341c-45e8-ba80-dc202953e3d0",}, + ], + "gridX": 0, + "gridY": 0, + "height": 64, + "HTile": false, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"4afdb023-b0f8-4e7e-9a56-e302c83e4c06","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + ], + "nineSlice": null, + "origin": 4, + "parent": { + "name": "texts", + "path": "folders/nodes/icons/value/texts.yy", + }, + "preMultiplyAlpha": false, + "sequence": { + "resourceType": "GMSequence", + "resourceVersion": "1.4", + "name": "s_node_regex_search", + "autoRecord": true, + "backdropHeight": 768, + "backdropImageOpacity": 0.5, + "backdropImagePath": "", + "backdropWidth": 1366, + "backdropXOffset": 0.0, + "backdropYOffset": 0.0, + "events": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "eventStubScript": null, + "eventToFunction": {}, + "length": 1.0, + "lockOrigin": false, + "moments": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "playback": 1, + "playbackSpeed": 30.0, + "playbackSpeedType": 0, + "showBackdrop": true, + "showBackdropImage": false, + "timeUnits": 1, + "tracks": [ + {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[ + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"f5d7c358-341c-45e8-ba80-dc202953e3d0","path":"sprites/s_node_regex_search/s_node_regex_search.yy",},},},"Disabled":false,"id":"36f61a9f-2ca8-4f00-a3f5-7cd1b4546fbc","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, + ], + "visibleRange": null, + "volume": 1.0, + "xorigin": 32, + "yorigin": 32, + }, + "swatchColours": null, + "swfPrecision": 2.525, + "textureGroupId": { + "name": "Default", + "path": "texturegroups/Default", + }, + "type": 0, + "VTile": false, + "width": 64, +} \ No newline at end of file