Frame render fix

This commit is contained in:
Tanasart 2023-03-12 08:28:21 +07:00
parent 9155123dbe
commit 8971a3c8a4
49 changed files with 3488 additions and 2015 deletions

View file

@ -103,7 +103,10 @@
{"name":"VFX","order":134,"path":"folders/nodes/icons/VFX.yy",}, {"name":"VFX","order":134,"path":"folders/nodes/icons/VFX.yy",},
{"name":"panels","order":2,"path":"folders/panels.yy",}, {"name":"panels","order":2,"path":"folders/panels.yy",},
{"name":"data","order":9,"path":"folders/panels/data.yy",}, {"name":"data","order":9,"path":"folders/panels/data.yy",},
{"name":"graph","order":11,"path":"folders/panels/data/graph.yy",},
{"name":"inspectors","order":6,"path":"folders/panels/data/inspectors.yy",}, {"name":"inspectors","order":6,"path":"folders/panels/data/inspectors.yy",},
{"name":"menu","order":12,"path":"folders/panels/data/menu.yy",},
{"name":"preview","order":10,"path":"folders/panels/data/preview.yy",},
{"name":"preview","order":7,"path":"folders/panels/preview.yy",}, {"name":"preview","order":7,"path":"folders/panels/preview.yy",},
{"name":"overlay","order":4,"path":"folders/panels/preview/overlay.yy",}, {"name":"overlay","order":4,"path":"folders/panels/preview/overlay.yy",},
{"name":"shader","order":8,"path":"folders/shader.yy",}, {"name":"shader","order":8,"path":"folders/shader.yy",},
@ -132,6 +135,7 @@
{"name":"sh_perlin","order":1,"path":"shaders/sh_perlin/sh_perlin.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",}, {"name":"node_tool","order":10,"path":"scripts/node_tool/node_tool.yy",},
{"name":"sh_find_pixel","order":46,"path":"shaders/sh_find_pixel/sh_find_pixel.yy",}, {"name":"sh_find_pixel","order":46,"path":"shaders/sh_find_pixel/sh_find_pixel.yy",},
{"name":"panel_preview_window","order":1,"path":"scripts/panel_preview_window/panel_preview_window.yy",},
{"name":"sh_scale3x","order":29,"path":"shaders/sh_scale3x/sh_scale3x.yy",}, {"name":"sh_scale3x","order":29,"path":"shaders/sh_scale3x/sh_scale3x.yy",},
{"name":"node_csv_file_write","order":13,"path":"scripts/node_csv_file_write/node_csv_file_write.yy",}, {"name":"node_csv_file_write","order":13,"path":"scripts/node_csv_file_write/node_csv_file_write.yy",},
{"name":"surface_functions","order":5,"path":"scripts/surface_functions/surface_functions.yy",}, {"name":"surface_functions","order":5,"path":"scripts/surface_functions/surface_functions.yy",},
@ -189,7 +193,6 @@
{"name":"fd_rectangle_set_material_time_step","order":8,"path":"scripts/fd_rectangle_set_material_time_step/fd_rectangle_set_material_time_step.yy",}, {"name":"fd_rectangle_set_material_time_step","order":8,"path":"scripts/fd_rectangle_set_material_time_step/fd_rectangle_set_material_time_step.yy",},
{"name":"s_node_path_sample","order":3,"path":"sprites/s_node_path_sample/s_node_path_sample.yy",}, {"name":"s_node_path_sample","order":3,"path":"sprites/s_node_path_sample/s_node_path_sample.yy",},
{"name":"s_node_colorize","order":13,"path":"sprites/s_node_colorize/s_node_colorize.yy",}, {"name":"s_node_colorize","order":13,"path":"sprites/s_node_colorize/s_node_colorize.yy",},
{"name":"panel_preview","order":3,"path":"scripts/panel_preview/panel_preview.yy",},
{"name":"s_node_sepearte_shape","order":33,"path":"sprites/s_node_sepearte_shape/s_node_sepearte_shape.yy",}, {"name":"s_node_sepearte_shape","order":33,"path":"sprites/s_node_sepearte_shape/s_node_sepearte_shape.yy",},
{"name":"s_node_text_join","order":5,"path":"sprites/s_node_text_join/s_node_text_join.yy",}, {"name":"s_node_text_join","order":5,"path":"sprites/s_node_text_join/s_node_text_join.yy",},
{"name":"s_node_polar","order":5,"path":"sprites/s_node_polar/s_node_polar.yy",}, {"name":"s_node_polar","order":5,"path":"sprites/s_node_polar/s_node_polar.yy",},
@ -228,6 +231,7 @@
{"name":"node_gradient_points","order":20,"path":"scripts/node_gradient_points/node_gradient_points.yy",}, {"name":"node_gradient_points","order":20,"path":"scripts/node_gradient_points/node_gradient_points.yy",},
{"name":"_f_code","order":9,"path":"fonts/_f_code/_f_code.yy",}, {"name":"_f_code","order":9,"path":"fonts/_f_code/_f_code.yy",},
{"name":"sh_combine_rgb","order":40,"path":"shaders/sh_combine_rgb/sh_combine_rgb.yy",}, {"name":"sh_combine_rgb","order":40,"path":"shaders/sh_combine_rgb/sh_combine_rgb.yy",},
{"name":"o_dialog_panel","order":13,"path":"objects/o_dialog_panel/o_dialog_panel.yy",},
{"name":"s_node_vfx","order":9,"path":"sprites/s_node_vfx/s_node_vfx.yy",}, {"name":"s_node_vfx","order":9,"path":"sprites/s_node_vfx/s_node_vfx.yy",},
{"name":"fd_rectangle_get_velocity_maccormack_weight","order":23,"path":"scripts/fd_rectangle_get_velocity_maccormack_weight/fd_rectangle_get_velocity_maccormack_weight.yy",}, {"name":"fd_rectangle_get_velocity_maccormack_weight","order":23,"path":"scripts/fd_rectangle_get_velocity_maccormack_weight/fd_rectangle_get_velocity_maccormack_weight.yy",},
{"name":"sh_fd_advect_material_rgba_8_glsl","order":5,"path":"shaders/sh_fd_advect_material_rgba_8_glsl/sh_fd_advect_material_rgba_8_glsl.yy",}, {"name":"sh_fd_advect_material_rgba_8_glsl","order":5,"path":"shaders/sh_fd_advect_material_rgba_8_glsl/sh_fd_advect_material_rgba_8_glsl.yy",},
@ -284,6 +288,7 @@
{"name":"s_node_HSV_combine","order":42,"path":"sprites/s_node_HSV_combine/s_node_HSV_combine.yy",}, {"name":"s_node_HSV_combine","order":42,"path":"sprites/s_node_HSV_combine/s_node_HSV_combine.yy",},
{"name":"o_dialog_release_note","order":8,"path":"objects/o_dialog_release_note/o_dialog_release_note.yy",}, {"name":"o_dialog_release_note","order":8,"path":"objects/o_dialog_release_note/o_dialog_release_note.yy",},
{"name":"sh_fd_advect_material_rgba_16_glsl","order":4,"path":"shaders/sh_fd_advect_material_rgba_16_glsl/sh_fd_advect_material_rgba_16_glsl.yy",}, {"name":"sh_fd_advect_material_rgba_16_glsl","order":4,"path":"shaders/sh_fd_advect_material_rgba_16_glsl/sh_fd_advect_material_rgba_16_glsl.yy",},
{"name":"panel_inspector","order":1,"path":"scripts/panel_inspector/panel_inspector.yy",},
{"name":"node_padding","order":9,"path":"scripts/node_padding/node_padding.yy",}, {"name":"node_padding","order":9,"path":"scripts/node_padding/node_padding.yy",},
{"name":"node_VFX_group","order":4,"path":"scripts/node_VFX_group/node_VFX_group.yy",}, {"name":"node_VFX_group","order":4,"path":"scripts/node_VFX_group/node_VFX_group.yy",},
{"name":"s_node_vfx_attract","order":8,"path":"sprites/s_node_vfx_attract/s_node_vfx_attract.yy",}, {"name":"s_node_vfx_attract","order":8,"path":"sprites/s_node_vfx_attract/s_node_vfx_attract.yy",},
@ -348,6 +353,7 @@
{"name":"node_feedback_output","order":2,"path":"scripts/node_feedback_output/node_feedback_output.yy",}, {"name":"node_feedback_output","order":2,"path":"scripts/node_feedback_output/node_feedback_output.yy",},
{"name":"node_lua_surface","order":2,"path":"scripts/node_lua_surface/node_lua_surface.yy",}, {"name":"node_lua_surface","order":2,"path":"scripts/node_lua_surface/node_lua_surface.yy",},
{"name":"sh_blur_directional","order":4,"path":"shaders/sh_blur_directional/sh_blur_directional.yy",}, {"name":"sh_blur_directional","order":4,"path":"shaders/sh_blur_directional/sh_blur_directional.yy",},
{"name":"panel_tunnels","order":1,"path":"scripts/panel_tunnels/panel_tunnels.yy",},
{"name":"node_processor","order":8,"path":"scripts/node_processor/node_processor.yy",}, {"name":"node_processor","order":8,"path":"scripts/node_processor/node_processor.yy",},
{"name":"animation_controller","order":1,"path":"scripts/animation_controller/animation_controller.yy",}, {"name":"animation_controller","order":1,"path":"scripts/animation_controller/animation_controller.yy",},
{"name":"s_node_shadow","order":34,"path":"sprites/s_node_shadow/s_node_shadow.yy",}, {"name":"s_node_shadow","order":34,"path":"sprites/s_node_shadow/s_node_shadow.yy",},
@ -580,7 +586,6 @@
{"name":"o_dialog_tunnels","order":6,"path":"objects/o_dialog_tunnels/o_dialog_tunnels.yy",}, {"name":"o_dialog_tunnels","order":6,"path":"objects/o_dialog_tunnels/o_dialog_tunnels.yy",},
{"name":"s_node_erode","order":21,"path":"sprites/s_node_erode/s_node_erode.yy",}, {"name":"s_node_erode","order":21,"path":"sprites/s_node_erode/s_node_erode.yy",},
{"name":"node_particle","order":14,"path":"scripts/node_particle/node_particle.yy",}, {"name":"node_particle","order":14,"path":"scripts/node_particle/node_particle.yy",},
{"name":"level_histogram","order":1,"path":"scripts/level_histogram/level_histogram.yy",},
{"name":"node_array_range","order":12,"path":"scripts/node_array_range/node_array_range.yy",}, {"name":"node_array_range","order":12,"path":"scripts/node_array_range/node_array_range.yy",},
{"name":"s_node_tunnel_in","order":21,"path":"sprites/s_node_tunnel_in/s_node_tunnel_in.yy",}, {"name":"s_node_tunnel_in","order":21,"path":"sprites/s_node_tunnel_in/s_node_tunnel_in.yy",},
{"name":"o_dialog_graph_grid","order":3,"path":"objects/o_dialog_graph_grid/o_dialog_graph_grid.yy",}, {"name":"o_dialog_graph_grid","order":3,"path":"objects/o_dialog_graph_grid/o_dialog_graph_grid.yy",},
@ -622,6 +627,7 @@
{"name":"node_checkerboard","order":13,"path":"scripts/node_checkerboard/node_checkerboard.yy",}, {"name":"node_checkerboard","order":13,"path":"scripts/node_checkerboard/node_checkerboard.yy",},
{"name":"node_gradient_output","order":5,"path":"scripts/node_gradient_output/node_gradient_output.yy",}, {"name":"node_gradient_output","order":5,"path":"scripts/node_gradient_output/node_gradient_output.yy",},
{"name":"display_refresh","order":17,"path":"scripts/display_refresh/display_refresh.yy",}, {"name":"display_refresh","order":17,"path":"scripts/display_refresh/display_refresh.yy",},
{"name":"panel_workspace","order":1,"path":"scripts/panel_workspace/panel_workspace.yy",},
{"name":"fd_rectangle_assure_surfaces_exist","order":2,"path":"scripts/fd_rectangle_assure_surfaces_exist/fd_rectangle_assure_surfaces_exist.yy",}, {"name":"fd_rectangle_assure_surfaces_exist","order":2,"path":"scripts/fd_rectangle_assure_surfaces_exist/fd_rectangle_assure_surfaces_exist.yy",},
{"name":"fd_rectangle_material_surface_was_created","order":13,"path":"scripts/fd_rectangle_material_surface_was_created/fd_rectangle_material_surface_was_created.yy",}, {"name":"fd_rectangle_material_surface_was_created","order":13,"path":"scripts/fd_rectangle_material_surface_was_created/fd_rectangle_material_surface_was_created.yy",},
{"name":"s_node_fluidSim_apply_velocity","order":2,"path":"sprites/s_node_fluidSim_apply_velocity/s_node_fluidSim_apply_velocity.yy",}, {"name":"s_node_fluidSim_apply_velocity","order":2,"path":"sprites/s_node_fluidSim_apply_velocity/s_node_fluidSim_apply_velocity.yy",},
@ -756,6 +762,7 @@
{"name":"node_trail","order":16,"path":"scripts/node_trail/node_trail.yy",}, {"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":"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":"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":"render_data","order":2,"path":"scripts/render_data/render_data.yy",}, {"name":"render_data","order":2,"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":"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",}, {"name":"fd_rectangle_get_velocity_height","order":22,"path":"scripts/fd_rectangle_get_velocity_height/fd_rectangle_get_velocity_height.yy",},
@ -864,7 +871,6 @@
{"name":"gameframe_macros","order":1,"path":"scripts/gameframe_macros/gameframe_macros.yy",}, {"name":"gameframe_macros","order":1,"path":"scripts/gameframe_macros/gameframe_macros.yy",},
{"name":"s_node_line","order":7,"path":"sprites/s_node_line/s_node_line.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":"fd_rectangle_get_material_dissipation_value","order":9,"path":"scripts/fd_rectangle_get_material_dissipation_value/fd_rectangle_get_material_dissipation_value.yy",},
{"name":"panel_graph","order":1,"path":"scripts/panel_graph/panel_graph.yy",},
{"name":"node_counter","order":1,"path":"scripts/node_counter/node_counter.yy",}, {"name":"node_counter","order":1,"path":"scripts/node_counter/node_counter.yy",},
{"name":"s_node_shape_polygon","order":25,"path":"sprites/s_node_shape_polygon/s_node_shape_polygon.yy",}, {"name":"s_node_shape_polygon","order":25,"path":"sprites/s_node_shape_polygon/s_node_shape_polygon.yy",},
{"name":"sh_color_picker_hue","order":7,"path":"shaders/sh_color_picker_hue/sh_color_picker_hue.yy",}, {"name":"sh_color_picker_hue","order":7,"path":"shaders/sh_color_picker_hue/sh_color_picker_hue.yy",},
@ -900,7 +906,6 @@
{"name":"sh_level","order":11,"path":"shaders/sh_level/sh_level.yy",}, {"name":"sh_level","order":11,"path":"shaders/sh_level/sh_level.yy",},
{"name":"sh_grid_tri","order":20,"path":"shaders/sh_grid_tri/sh_grid_tri.yy",}, {"name":"sh_grid_tri","order":20,"path":"shaders/sh_grid_tri/sh_grid_tri.yy",},
{"name":"s_node_text","order":1,"path":"sprites/s_node_text/s_node_text.yy",}, {"name":"s_node_text","order":1,"path":"sprites/s_node_text/s_node_text.yy",},
{"name":"panel_menu","order":2,"path":"scripts/panel_menu/panel_menu.yy",},
{"name":"s_node_ase_file","order":18,"path":"sprites/s_node_ase_file/s_node_ase_file.yy",}, {"name":"s_node_ase_file","order":18,"path":"sprites/s_node_ase_file/s_node_ase_file.yy",},
{"name":"draw_line_round","order":4,"path":"scripts/draw_line_round/draw_line_round.yy",}, {"name":"draw_line_round","order":4,"path":"scripts/draw_line_round/draw_line_round.yy",},
{"name":"vectorBox","order":18,"path":"scripts/vectorBox/vectorBox.yy",}, {"name":"vectorBox","order":18,"path":"scripts/vectorBox/vectorBox.yy",},
@ -926,6 +931,7 @@
{"name":"s_node_shadow_cast","order":47,"path":"sprites/s_node_shadow_cast/s_node_shadow_cast.yy",}, {"name":"s_node_shadow_cast","order":47,"path":"sprites/s_node_shadow_cast/s_node_shadow_cast.yy",},
{"name":"path_function","order":4,"path":"scripts/path_function/path_function.yy",}, {"name":"path_function","order":4,"path":"scripts/path_function/path_function.yy",},
{"name":"fd_rectangle_set_velocity_dissipation_value","order":14,"path":"scripts/fd_rectangle_set_velocity_dissipation_value/fd_rectangle_set_velocity_dissipation_value.yy",}, {"name":"fd_rectangle_set_velocity_dissipation_value","order":14,"path":"scripts/fd_rectangle_set_velocity_dissipation_value/fd_rectangle_set_velocity_dissipation_value.yy",},
{"name":"panel_history","order":2,"path":"scripts/panel_history/panel_history.yy",},
{"name":"sh_channel_H","order":3,"path":"shaders/sh_channel_H/sh_channel_H.yy",}, {"name":"sh_channel_H","order":3,"path":"shaders/sh_channel_H/sh_channel_H.yy",},
{"name":"s_node_RGB","order":32,"path":"sprites/s_node_RGB/s_node_RGB.yy",}, {"name":"s_node_RGB","order":32,"path":"sprites/s_node_RGB/s_node_RGB.yy",},
{"name":"fd_rectangle_draw","order":9,"path":"scripts/fd_rectangle_draw/fd_rectangle_draw.yy",}, {"name":"fd_rectangle_draw","order":9,"path":"scripts/fd_rectangle_draw/fd_rectangle_draw.yy",},

View file

@ -129,7 +129,10 @@
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"VFX","folderPath":"folders/nodes/icons/VFX.yy",}, {"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":"panels","folderPath":"folders/panels.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"data","folderPath":"folders/panels/data.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"data","folderPath":"folders/panels/data.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"graph","folderPath":"folders/panels/data/graph.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"inspectors","folderPath":"folders/panels/data/inspectors.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"inspectors","folderPath":"folders/panels/data/inspectors.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"menu","folderPath":"folders/panels/data/menu.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"preview","folderPath":"folders/panels/data/preview.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"preview","folderPath":"folders/panels/preview.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"preview","folderPath":"folders/panels/preview.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"overlay","folderPath":"folders/panels/preview/overlay.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"overlay","folderPath":"folders/panels/preview/overlay.yy",},
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"shader","folderPath":"folders/shader.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"shader","folderPath":"folders/shader.yy",},
@ -239,6 +242,7 @@
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_splash_thumbnail.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_splash_thumbnail.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_split_view_strip3.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_split_view_strip3.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_tile_view_strip4.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_tile_view_strip4.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_toggle.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_visibility.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_icon_visibility.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_info.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_info.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_itch.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_itch.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
@ -329,6 +333,7 @@
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_active.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_active.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_bg_name.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_bg_name.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_bg_pill.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_bg.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_bg.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_draw_area.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_draw_area.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_draw_path.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_draw_path.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
@ -510,6 +515,7 @@
{"id":{"name":"sh_normal_light","path":"shaders/sh_normal_light/sh_normal_light.yy",},}, {"id":{"name":"sh_normal_light","path":"shaders/sh_normal_light/sh_normal_light.yy",},},
{"id":{"name":"node_tool","path":"scripts/node_tool/node_tool.yy",},}, {"id":{"name":"node_tool","path":"scripts/node_tool/node_tool.yy",},},
{"id":{"name":"sh_find_pixel","path":"shaders/sh_find_pixel/sh_find_pixel.yy",},}, {"id":{"name":"sh_find_pixel","path":"shaders/sh_find_pixel/sh_find_pixel.yy",},},
{"id":{"name":"panel_preview_window","path":"scripts/panel_preview_window/panel_preview_window.yy",},},
{"id":{"name":"sh_scale3x","path":"shaders/sh_scale3x/sh_scale3x.yy",},}, {"id":{"name":"sh_scale3x","path":"shaders/sh_scale3x/sh_scale3x.yy",},},
{"id":{"name":"node_csv_file_write","path":"scripts/node_csv_file_write/node_csv_file_write.yy",},}, {"id":{"name":"node_csv_file_write","path":"scripts/node_csv_file_write/node_csv_file_write.yy",},},
{"id":{"name":"surface_functions","path":"scripts/surface_functions/surface_functions.yy",},}, {"id":{"name":"surface_functions","path":"scripts/surface_functions/surface_functions.yy",},},
@ -619,6 +625,7 @@
{"id":{"name":"_f_code","path":"fonts/_f_code/_f_code.yy",},}, {"id":{"name":"_f_code","path":"fonts/_f_code/_f_code.yy",},},
{"id":{"name":"sh_combine_rgb","path":"shaders/sh_combine_rgb/sh_combine_rgb.yy",},}, {"id":{"name":"sh_combine_rgb","path":"shaders/sh_combine_rgb/sh_combine_rgb.yy",},},
{"id":{"name":"object_get_depth","path":"scripts/object_get_depth/object_get_depth.yy",},}, {"id":{"name":"object_get_depth","path":"scripts/object_get_depth/object_get_depth.yy",},},
{"id":{"name":"o_dialog_panel","path":"objects/o_dialog_panel/o_dialog_panel.yy",},},
{"id":{"name":"colToVec4","path":"scripts/colToVec4/colToVec4.yy",},}, {"id":{"name":"colToVec4","path":"scripts/colToVec4/colToVec4.yy",},},
{"id":{"name":"s_node_vfx","path":"sprites/s_node_vfx/s_node_vfx.yy",},}, {"id":{"name":"s_node_vfx","path":"sprites/s_node_vfx/s_node_vfx.yy",},},
{"id":{"name":"fd_rectangle_get_velocity_maccormack_weight","path":"scripts/fd_rectangle_get_velocity_maccormack_weight/fd_rectangle_get_velocity_maccormack_weight.yy",},}, {"id":{"name":"fd_rectangle_get_velocity_maccormack_weight","path":"scripts/fd_rectangle_get_velocity_maccormack_weight/fd_rectangle_get_velocity_maccormack_weight.yy",},},
@ -758,6 +765,7 @@
{"id":{"name":"node_feedback_output","path":"scripts/node_feedback_output/node_feedback_output.yy",},}, {"id":{"name":"node_feedback_output","path":"scripts/node_feedback_output/node_feedback_output.yy",},},
{"id":{"name":"node_lua_surface","path":"scripts/node_lua_surface/node_lua_surface.yy",},}, {"id":{"name":"node_lua_surface","path":"scripts/node_lua_surface/node_lua_surface.yy",},},
{"id":{"name":"sh_blur_directional","path":"shaders/sh_blur_directional/sh_blur_directional.yy",},}, {"id":{"name":"sh_blur_directional","path":"shaders/sh_blur_directional/sh_blur_directional.yy",},},
{"id":{"name":"panel_tunnels","path":"scripts/panel_tunnels/panel_tunnels.yy",},},
{"id":{"name":"node_processor","path":"scripts/node_processor/node_processor.yy",},}, {"id":{"name":"node_processor","path":"scripts/node_processor/node_processor.yy",},},
{"id":{"name":"animation_controller","path":"scripts/animation_controller/animation_controller.yy",},}, {"id":{"name":"animation_controller","path":"scripts/animation_controller/animation_controller.yy",},},
{"id":{"name":"s_node_shadow","path":"sprites/s_node_shadow/s_node_shadow.yy",},}, {"id":{"name":"s_node_shadow","path":"sprites/s_node_shadow/s_node_shadow.yy",},},
@ -1067,6 +1075,7 @@
{"id":{"name":"node_checkerboard","path":"scripts/node_checkerboard/node_checkerboard.yy",},}, {"id":{"name":"node_checkerboard","path":"scripts/node_checkerboard/node_checkerboard.yy",},},
{"id":{"name":"node_gradient_output","path":"scripts/node_gradient_output/node_gradient_output.yy",},}, {"id":{"name":"node_gradient_output","path":"scripts/node_gradient_output/node_gradient_output.yy",},},
{"id":{"name":"display_refresh","path":"scripts/display_refresh/display_refresh.yy",},}, {"id":{"name":"display_refresh","path":"scripts/display_refresh/display_refresh.yy",},},
{"id":{"name":"panel_workspace","path":"scripts/panel_workspace/panel_workspace.yy",},},
{"id":{"name":"fd_rectangle_assure_surfaces_exist","path":"scripts/fd_rectangle_assure_surfaces_exist/fd_rectangle_assure_surfaces_exist.yy",},}, {"id":{"name":"fd_rectangle_assure_surfaces_exist","path":"scripts/fd_rectangle_assure_surfaces_exist/fd_rectangle_assure_surfaces_exist.yy",},},
{"id":{"name":"fd_rectangle_material_surface_was_created","path":"scripts/fd_rectangle_material_surface_was_created/fd_rectangle_material_surface_was_created.yy",},}, {"id":{"name":"fd_rectangle_material_surface_was_created","path":"scripts/fd_rectangle_material_surface_was_created/fd_rectangle_material_surface_was_created.yy",},},
{"id":{"name":"s_node_fluidSim_apply_velocity","path":"sprites/s_node_fluidSim_apply_velocity/s_node_fluidSim_apply_velocity.yy",},}, {"id":{"name":"s_node_fluidSim_apply_velocity","path":"sprites/s_node_fluidSim_apply_velocity/s_node_fluidSim_apply_velocity.yy",},},
@ -1213,6 +1222,7 @@
{"id":{"name":"json_prettify","path":"scripts/json_prettify/json_prettify.yy",},}, {"id":{"name":"json_prettify","path":"scripts/json_prettify/json_prettify.yy",},},
{"id":{"name":"s_node_loop_output","path":"sprites/s_node_loop_output/s_node_loop_output.yy",},}, {"id":{"name":"s_node_loop_output","path":"sprites/s_node_loop_output/s_node_loop_output.yy",},},
{"id":{"name":"_p_dialog","path":"objects/_p_dialog/_p_dialog.yy",},}, {"id":{"name":"_p_dialog","path":"objects/_p_dialog/_p_dialog.yy",},},
{"id":{"name":"panel_notification","path":"scripts/panel_notification/panel_notification.yy",},},
{"id":{"name":"render_data","path":"scripts/render_data/render_data.yy",},}, {"id":{"name":"render_data","path":"scripts/render_data/render_data.yy",},},
{"id":{"name":"o_dialog_graph_view","path":"objects/o_dialog_graph_view/o_dialog_graph_view.yy",},}, {"id":{"name":"o_dialog_graph_view","path":"objects/o_dialog_graph_view/o_dialog_graph_view.yy",},},
{"id":{"name":"fd_rectangle_get_velocity_height","path":"scripts/fd_rectangle_get_velocity_height/fd_rectangle_get_velocity_height.yy",},}, {"id":{"name":"fd_rectangle_get_velocity_height","path":"scripts/fd_rectangle_get_velocity_height/fd_rectangle_get_velocity_height.yy",},},
@ -1413,6 +1423,7 @@
{"id":{"name":"s_node_shadow_cast","path":"sprites/s_node_shadow_cast/s_node_shadow_cast.yy",},}, {"id":{"name":"s_node_shadow_cast","path":"sprites/s_node_shadow_cast/s_node_shadow_cast.yy",},},
{"id":{"name":"path_function","path":"scripts/path_function/path_function.yy",},}, {"id":{"name":"path_function","path":"scripts/path_function/path_function.yy",},},
{"id":{"name":"fd_rectangle_set_velocity_dissipation_value","path":"scripts/fd_rectangle_set_velocity_dissipation_value/fd_rectangle_set_velocity_dissipation_value.yy",},}, {"id":{"name":"fd_rectangle_set_velocity_dissipation_value","path":"scripts/fd_rectangle_set_velocity_dissipation_value/fd_rectangle_set_velocity_dissipation_value.yy",},},
{"id":{"name":"panel_history","path":"scripts/panel_history/panel_history.yy",},},
{"id":{"name":"sh_channel_H","path":"shaders/sh_channel_H/sh_channel_H.yy",},}, {"id":{"name":"sh_channel_H","path":"shaders/sh_channel_H/sh_channel_H.yy",},},
{"id":{"name":"s_node_RGB","path":"sprites/s_node_RGB/s_node_RGB.yy",},}, {"id":{"name":"s_node_RGB","path":"sprites/s_node_RGB/s_node_RGB.yy",},},
{"id":{"name":"fd_rectangle_draw","path":"scripts/fd_rectangle_draw/fd_rectangle_draw.yy",},}, {"id":{"name":"fd_rectangle_draw","path":"scripts/fd_rectangle_draw/fd_rectangle_draw.yy",},},

Binary file not shown.

View file

@ -864,6 +864,13 @@
"yorigin": 16, "yorigin": 16,
"slice": null "slice": null
}, },
"icon_toggle": {
"path": "./icon/s_icon_toggle.png",
"subimages": 1,
"xorigin": 16,
"yorigin": 16,
"slice": null
},
"inspector_area": { "inspector_area": {
"path": "./inspector/s_inspector_area_strip2.png", "path": "./inspector/s_inspector_area_strip2.png",
"subimages": 2, "subimages": 2,
@ -1149,6 +1156,19 @@
"yorigin": 12, "yorigin": 12,
"slice": null "slice": null
}, },
"node_bg_pill": {
"path": "./node/s_node_bg_pill.png",
"subimages": 1,
"xorigin": 0,
"yorigin": 0,
"slice": {
"enabled": true,
"left": 15,
"right": 15,
"top": 15,
"bottom": 15
}
},
"node_slider": { "node_slider": {
"path": "./node/widget/s_node_slider.png", "path": "./node/widget/s_node_slider.png",
"subimages": 5, "subimages": 5,

File diff suppressed because it is too large Load diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

View file

@ -37,8 +37,8 @@
if(!draggable) return; if(!draggable) return;
if(dialog_dragging) { if(dialog_dragging) {
dialog_x = clamp(dialog_drag_sx + mouse_mx - dialog_drag_mx, 0, WIN_W); dialog_x = clamp(dialog_drag_sx + mouse_mx - dialog_drag_mx, ui(16) - dialog_w, WIN_W - ui(16));
dialog_y = clamp(dialog_drag_sy + mouse_my - dialog_drag_my, ui(40), WIN_H); dialog_y = clamp(dialog_drag_sy + mouse_my - dialog_drag_my, ui(16) - dialog_h, WIN_H - ui(16));
if(mouse_release(mb_left)) if(mouse_release(mb_left))
dialog_dragging = false; dialog_dragging = false;

View file

@ -59,6 +59,8 @@ event_inherited();
if(_menuItem.spr != noone) if(_menuItem.spr != noone)
show_icon = true; show_icon = true;
if(_menuItem.toggle != noone)
show_icon = true;
} }
dialog_w = max(dialog_w, ww); dialog_w = max(dialog_w, ww);

View file

@ -90,6 +90,11 @@
draw_sprite_ui(spr, ind, dialog_x + ui(24), yy + hght / 2,,,, COLORS._main_icon, _menuItem.active * 0.5 + 0.25); draw_sprite_ui(spr, ind, dialog_x + ui(24), yy + hght / 2,,,, COLORS._main_icon, _menuItem.active * 0.5 + 0.25);
} }
if(_menuItem.toggle != noone) {
var tog = _menuItem.toggle();
if(tog) draw_sprite_ui(THEME.icon_toggle, 0, dialog_x + ui(24), yy + hght / 2,,,, COLORS._main_icon);
}
draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text); draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text);
draw_set_alpha(_menuItem.active * 0.75 + 0.25); draw_set_alpha(_menuItem.active * 0.75 + 0.25);
draw_text(tx, yy + hght / 2, label); draw_text(tx, yy + hght / 2, label);

View file

@ -0,0 +1,59 @@
/// @description
event_inherited();
#region panel
dialog_w = 640;
dialog_h = 480;
padding = ui(8);
title_height = ui(24);
dialog_resizable = true;
panel = surface_create(dialog_w, dialog_h);
mask_surface = noone;
content = noone;
destroy_on_click_out = true;
function setContent(content) {
self.content = content;
if(struct_has(content, "title_height"))
title_height = content.title_height;
dialog_w = content.w + content.showHeader * padding * 2;
dialog_h = content.h + content.showHeader * (padding * 2 + title_height);
dialog_w_min = content.min_w;
dialog_h_min = content.min_h;
content.in_dialog = true;
if(instanceof(content) == "Panel_Menu")
destroy_on_click_out = false;
}
function resetMask() {
if(!content) return;
mask_surface = surface_verify(mask_surface, dialog_w - content.showHeader * padding * 2,
dialog_h - content.showHeader * (padding * 2 + title_height));
surface_set_target(mask_surface);
draw_clear(c_black);
gpu_set_blendmode(bm_subtract);
draw_sprite_stretched(THEME.ui_panel_bg, 0, 0, 0, dialog_w - content.showHeader * padding * 2,
dialog_h - content.showHeader * (padding * 2 + title_height));
gpu_set_blendmode(bm_normal);
surface_reset_target();
}
resetMask();
onResize = function() {
panel = surface_verify(panel, dialog_w, dialog_h);
resetMask();
if(content) {
content.w = dialog_w - content.showHeader * padding * 2;
content.h = dialog_h - content.showHeader * (padding * 2 + title_height);
content.onResize();
}
}
#endregion

View file

@ -0,0 +1,89 @@
/// @description
if !ready exit;
#region base UI
var p = ui(8);
var m_in = point_in_rectangle(mouse_mx, mouse_my, dialog_x + p, dialog_y + p, dialog_x + dialog_w - p, dialog_y + dialog_h - p);
var m_ot = point_in_rectangle(mouse_mx, mouse_my, dialog_x, dialog_y, dialog_x + dialog_w, dialog_y + dialog_h);
draw_sprite_stretched(THEME.dialog_bg, 0, dialog_x, dialog_y, dialog_w, dialog_h);
#endregion
#region content
if(!is_undefined(content) && content != noone) {
var cx = dialog_x + content.showHeader * padding;
var cy = dialog_y + content.showHeader * (padding + title_height);
content.x = cx;
content.y = cy;
content.onStepBegin();
content.pFOCUS = sFOCUS;
content.pHOVER = sHOVER;
panel = surface_verify(panel, dialog_w - content.showHeader * padding * 2,
dialog_h - content.showHeader * (padding * 2 + title_height));
if(!is_surface(mask_surface))
resetMask();
surface_set_target(panel);
draw_clear_alpha(0, 0);
content.drawContent(panel);
gpu_set_blendmode(bm_subtract);
draw_surface_safe(mask_surface, 0, 0);
gpu_set_blendmode(bm_normal);
surface_reset_target();
draw_surface(panel, cx, cy);
}
#endregion
#region overlay
if(content.showHeader) {
draw_sprite_stretched_ext(THEME.dialog_bg, 0, dialog_x, dialog_y, dialog_w, title_height + ui(8), COLORS._main_icon_light, 1);
draw_set_text(f_p2, fa_left, fa_top, COLORS._main_text_sub);
draw_text_cut(dialog_x + ui(32), dialog_y + ui(8), content.title, dialog_w - ui(32 + 32));
if(instanceof(content) != "Panel_Menu")
if(buttonInstant(THEME.button_hide, dialog_x + dialog_w - ui(28), dialog_y + ui(8), ui(20), ui(20), mouse_ui, sFOCUS, sHOVER, "", THEME.window_exit) == 2)
instance_destroy();
}
var bx = content.showHeader? dialog_x + ui(8) : dialog_x + ui(24);
var by = content.showHeader? dialog_y + ui(8) : dialog_y + ui(18);
var txt = destroy_on_click_out? get_text("pin", "Pin") : get_text("unpin", "Unpin");
var cc = destroy_on_click_out? COLORS._main_icon : COLORS._main_icon_light;
var ind = !destroy_on_click_out;
var ss = content.showHeader? ui(20) : ui(28);
var sc = content.showHeader? 0.75 : 1;
if(instanceof(content) != "Panel_Menu")
if(buttonInstant(THEME.button_hide, bx, by, ss, ss, mouse_ui, sFOCUS, sHOVER, txt, THEME.pin, ind, cc,, sc) == 2)
destroy_on_click_out = !destroy_on_click_out;
if(sFOCUS)
draw_sprite_stretched_ext(THEME.dialog_active, 0, dialog_x, dialog_y, dialog_w, dialog_h, COLORS._main_accent, 1);
if(!m_in && m_ot) {
draw_sprite_stretched_ext(THEME.dialog_active, 0, dialog_x, dialog_y, dialog_w, dialog_h, c_white, 0.4);
if(DOUBLE_CLICK) {
content.dragSurface = surface_clone(panel);
o_main.panel_dragging = content;
content.in_dialog = false;
instance_destroy();
} else if(mouse_press(mb_right)) {
menuCall(,, [
menuItem("Move", function() {
content.dragSurface = surface_clone(panel);
o_main.panel_dragging = content;
content.in_dialog = false;
panel_mouse = 1;
instance_destroy();
}),
]);
}
}
#endregion

View file

@ -0,0 +1,37 @@
{
"resourceType": "GMObject",
"resourceVersion": "1.0",
"name": "o_dialog_panel",
"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,},
],
"managed": true,
"overriddenProperties": [],
"parent": {
"name": "dialog",
"path": "folders/dialog.yy",
},
"parentObjectId": {
"name": "_p_dialog",
"path": "objects/_p_dialog/_p_dialog.yy",
},
"persistent": false,
"physicsAngularDamping": 0.1,
"physicsDensity": 0.5,
"physicsFriction": 0.2,
"physicsGroup": 1,
"physicsKinematic": false,
"physicsLinearDamping": 0.1,
"physicsObject": false,
"physicsRestitution": 0.1,
"physicsSensor": false,
"physicsShape": 1,
"physicsShapePoints": [],
"physicsStartAwake": true,
"properties": [],
"solid": false,
"spriteId": null,
"spriteMaskId": null,
"visible": true,
}

View file

@ -62,7 +62,7 @@
addHotkey("", "Redo", "Z", MOD_KEY.ctrl | MOD_KEY.shift, function() { REDO(); }); addHotkey("", "Redo", "Z", MOD_KEY.ctrl | MOD_KEY.shift, function() { REDO(); });
addHotkey("", "Full panel", "`", MOD_KEY.none, set_focus_fullscreen); addHotkey("", "Full panel", "`", MOD_KEY.none, set_focus_fullscreen);
addHotkey("", "Open notification", vk_f12, MOD_KEY.none, function() { dialogCall(o_dialog_notifications); }); addHotkey("", "Open notification", vk_f12, MOD_KEY.none, function() { dialogPanelCall(new Panel_Notification()); });
addHotkey("", "Fullscreen", vk_f11, MOD_KEY.none, function() { addHotkey("", "Fullscreen", vk_f11, MOD_KEY.none, function() {
if(gameframe_is_fullscreen_window()) if(gameframe_is_fullscreen_window())

View file

@ -63,10 +63,16 @@
_k = ds_map_find_next(NODE_MAP, _k); _k = ds_map_find_next(NODE_MAP, _k);
} }
if(UPDATE & RENDER_TYPE.full || (ANIMATOR.rendering && ANIMATOR.frame_progress)) if(ANIMATOR.is_playing || ANIMATOR.rendering) {
if(ANIMATOR.frame_progress)
Render(); Render();
else if(UPDATE & RENDER_TYPE.partial) ANIMATOR.frame_progress = false;
} else {
if(UPDATE & RENDER_TYPE.full) {
Render();
} else if(UPDATE & RENDER_TYPE.partial)
Render(true); Render(true);
}
UPDATE = RENDER_TYPE.none; UPDATE = RENDER_TYPE.none;
#endregion #endregion

View file

@ -73,7 +73,7 @@ function buttonClass(_onClick, _icon = noone) : widget() constructor {
} }
} }
function buttonInstant(spr, _x, _y, _w, _h, _m, _act, _hvr, _tip = "", _icon = noone, _icon_index = 0, _icon_blend = COLORS._main_icon, _icon_alpha = 1) { function buttonInstant(spr, _x, _y, _w, _h, _m, _act, _hvr, _tip = "", _icon = noone, _icon_index = 0, _icon_blend = COLORS._main_icon, _icon_alpha = 1, _icon_scale = 1) {
var res = 0; var res = 0;
var cc = is_array(_icon_blend)? _icon_blend[0] : _icon_blend; var cc = is_array(_icon_blend)? _icon_blend[0] : _icon_blend;
@ -102,7 +102,7 @@ function buttonInstant(spr, _x, _y, _w, _h, _m, _act, _hvr, _tip = "", _icon = n
draw_sprite_stretched(spr, 0, _x, _y, _w, _h); draw_sprite_stretched(spr, 0, _x, _y, _w, _h);
if(_icon) if(_icon)
draw_sprite_ui_uniform(_icon, _icon_index, _x + _w / 2, _y + _h / 2, 1, cc, _icon_alpha); draw_sprite_ui_uniform(_icon, _icon_index, _x + _w / 2, _y + _h / 2, _icon_scale, cc, _icon_alpha);
return res; return res;
} }

View file

@ -11,10 +11,26 @@ function dialogCall(_dia, _x = noone, _y = noone, param = {}, create = false) {
dia.resetPosition(); dia.resetPosition();
var args = variable_struct_get_names(param); var args = variable_struct_get_names(param);
for( var i = 0; i < array_length(args); i++ ) { for( var i = 0; i < array_length(args); i++ )
variable_instance_set(dia, args[i], variable_struct_get(param, args[i])); variable_instance_set(dia, args[i], variable_struct_get(param, args[i]));
setFocus(dia.id, "Dialog");
return dia;
} }
function dialogPanelCall(_panel, _x = noone, _y = noone) {
if(_x == noone) _x = WIN_SW / 2;
if(_y == noone) _y = WIN_SH / 2;
var dia = instance_create_depth(_x, _y, 0, o_dialog_panel);
dia.setContent(_panel);
dia.x = _x;
dia.y = _y;
dia.xstart = _x;
dia.ystart = _y;
dia.resetPosition();
setFocus(dia.id, "Dialog"); setFocus(dia.id, "Dialog");
return dia; return dia;
} }
@ -31,15 +47,16 @@ function submenuCall(_x, _y, _depth, menu = []) {
return dia; return dia;
} }
function menuItem(name, func, spr = noone, hotkey = noone) { function menuItem(name, func, spr = noone, hotkey = noone, toggle = noone) {
return new MenuItem(name, func, spr, hotkey); return new MenuItem(name, func, spr, hotkey, toggle);
} }
function MenuItem(name, func, spr = noone, hotkey = noone) constructor { function MenuItem(name, func, spr = noone, hotkey = noone, toggle = noone) constructor {
active = true; active = true;
self.name = name; self.name = name;
self.func = func; self.func = func;
self.spr = spr; self.spr = spr;
self.hotkey = hotkey; self.hotkey = hotkey;
self.toggle = toggle;
isShelf = false; isShelf = false;

View file

@ -87,8 +87,9 @@ function distance_to_elbow(mx, my, x0, y0, x1, y1, cx, cy, _s, indexIn = 1, inde
} }
} }
function elbow_distance_center(mx, my, x0, y0, x1, y1, cx, cy, _s) { function elbow_distance_center(mx, my, x0, y0, x1, y1, cx, cy, _s, indexIn = 1, indexOut = 1) {
var inv = x1 - 16 * _s <= x0 + 16 * _s; var inv = x1 - 16 * _s * indexOut <= x0 + 16 * _s * indexIn;
if(inv) if(inv)
return distance_to_line(mx, my, x0, cy, x1, cy); return distance_to_line(mx, my, x0, cy, x1, cy);
else else

View file

@ -209,16 +209,21 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
var _s = floor((index - input_fix_len) / data_length); var _s = floor((index - input_fix_len) / data_length);
inputs[| index + 0] = nodeValue(_s? ("Surface " + string(_s)) : "Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); inputs[| index + 0] = nodeValue(_s? ("Surface " + string(_s)) : "Background", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
inputs[| index + 0].surface_index = index;
inputs[| index + 0].hover_effect = 0;
inputs[| index + 1] = nodeValue("Position " + string(_s), self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] ) inputs[| index + 1] = nodeValue("Position " + string(_s), self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] )
.setDisplay(VALUE_DISPLAY.vector) .setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return [ overlay_w, overlay_h ]; }); .setUnitRef(function(index) { return [ overlay_w, overlay_h ]; });
inputs[| index + 1].surface_index = index;
inputs[| index + 2] = nodeValue("Rotation " + string(_s), self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) inputs[| index + 2] = nodeValue("Rotation " + string(_s), self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 )
.setDisplay(VALUE_DISPLAY.rotation); .setDisplay(VALUE_DISPLAY.rotation);
inputs[| index + 2].surface_index = index;
inputs[| index + 3] = nodeValue("Scale " + string(_s), self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ] ) inputs[| index + 3] = nodeValue("Scale " + string(_s), self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ] )
.setDisplay(VALUE_DISPLAY.vector); .setDisplay(VALUE_DISPLAY.vector);
inputs[| index + 3].surface_index = index;
array_push(input_display_list, index + 0); array_push(input_display_list, index + 0);
array_push(input_display_list, index + 1); array_push(input_display_list, index + 1);
@ -252,6 +257,182 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
overlay_w = 0; overlay_w = 0;
overlay_h = 0; overlay_h = 0;
static getInputAmount = function() {
return input_fix_len + (ds_list_size(inputs) - input_fix_len) / data_length;
}
static getInputIndex = function(index) {
if(index < input_fix_len) return index;
return input_fix_len + (index - input_fix_len) * data_length;
}
static setHeight = function() {
var _hi = ui(32);
var _ho = ui(32);
for( var i = 0; i < getInputAmount(); i++ )
if(inputs[| getInputIndex(i)].isVisible())
_hi += 24;
for( var i = 0; i < ds_list_size(outputs); i++ )
if(outputs[| i].isVisible())
_ho += 24;
h = max(min_h, (preview_surface && previewable)? 128 : 0, _hi, _ho);
}
static drawJunctions = function(_x, _y, _mx, _my, _s) {
if(!active) return;
var hover = noone;
var amo = array_length(input_display_list);
var hov = PANEL_GRAPH._junction_hovering;
var ind = -1;
if(hov != noone && struct_has(hov, "surface_index"))
ind = hov.surface_index;
for( var i = 0; i < getInputAmount(); i++ ) {
var idx = getInputIndex(i);
if(!inputs[| idx].isVisible()) continue;
if(inputs[| idx].drawJunction(_s, _mx, _my, 1.5))
hover = inputs[| idx];
if(idx >= input_fix_len && inputs[| idx].hover_effect > 0) {
var _px0 = 999999;
var _py0 = 999999;
var _px1 = -999999;
var _py1 = -999999;
var _drw = false;
var _hov = inputs[| idx].hover_effect;
for( var j = 1; j < data_length; j++ ) {
if(!inputs[| idx + j].isVisible()) continue;
_px0 = min( _px0, inputs[| idx + j].x );
_py0 = min( _py0, inputs[| idx + j].y );
_px1 = max( _px1, inputs[| idx + j].x );
_py1 = max( _py1, inputs[| idx + j].y );
_drw = true;
}
if(!_drw) continue;
if(_hov > 0.5)
draw_sprite_stretched_ext(THEME.node_bg_pill, 0, _px0 - 16 * _s, _py0 - 16 * _s, _px1 - _px0 + 32 * _s, _py1 - _py0 + 32 * _s, COLORS._main_icon_dark, (_hov - 0.5) * 2);
for( var j = 1; j < data_length; j++ ) {
if(inputs[| idx + j].drawJunction(_s, _mx, _my, 1.5))
hover = inputs[| idx + j];
}
}
}
for(var i = 0; i < ds_list_size(outputs); i++)
if(outputs[| i].drawJunction(_s, _mx, _my))
hover = outputs[| i];
return hover;
}
static drawJunctionNames = function(_x, _y, _mx, _my, _s) {
if(!active) return;
var amo = input_display_list == -1? ds_list_size(inputs) : array_length(input_display_list);
var jun;
var xx = x * _s + _x;
var yy = y * _s + _y;
show_input_name = PANEL_GRAPH.pHOVER && point_in_rectangle(_mx, _my, xx - 8 * _s, yy + 20 * _s, xx + 8 * _s, yy + h * _s);
show_output_name = PANEL_GRAPH.pHOVER && point_in_rectangle(_mx, _my, xx + (w - 8) * _s, yy + 20 * _s, xx + (w + 8) * _s, yy + h * _s);
var hov = PANEL_GRAPH._junction_hovering;
var ind = -1;
if(hov != noone && struct_has(hov, "surface_index"))
ind = hov.surface_index;
if(ind != -1) {
for( var j = 1; j < data_length; j++ )
inputs[| ind + j].drawNameBG(_s);
for( var j = 1; j < data_length; j++ )
inputs[| ind + j].drawName(_s, _mx, _my);
} else if(show_input_name) {
for( var i = 0; i < getInputAmount(); i++ ) {
var idx = getInputIndex(i);
if(idx == ind) continue;
inputs[| idx].drawNameBG(_s);
}
for( var i = 0; i < getInputAmount(); i++ ) {
var idx = getInputIndex(i);
if(idx == ind) continue;
inputs[| idx].drawName(_s, _mx, _my);
}
}
if(show_output_name) {
for(var i = 0; i < ds_list_size(outputs); i++)
outputs[| i].drawNameBG(_s);
for(var i = 0; i < ds_list_size(outputs); i++)
outputs[| i].drawName(_s, _mx, _my);
}
}
static preDraw = function(_x, _y, _s) {
var xx = x * _s + _x;
var yy = y * _s + _y;
var jun;
var inamo = input_display_list == -1? ds_list_size(inputs) : array_length(input_display_list);
var _in = yy + ui(32) * _s;
var hov = PANEL_GRAPH._junction_hovering;
var ind = -1;
if(hov != noone && struct_has(hov, "surface_index"))
ind = hov.surface_index;
for( var i = 0; i < getInputAmount(); i++ ) {
var idx = getInputIndex(i);
jun = ds_list_get(inputs, idx, noone);
if(jun == noone || is_undefined(jun)) continue;
jun.x = xx;
jun.y = _in;
if(i >= input_fix_len) {
jun.hover_effect = lerp_float(jun.hover_effect, ind == idx, 3);
var sp = jun.hover_effect * 24;
var sx = xx - sp * _s;
var sy = _in;
for( var j = 1; j < data_length; j++ ) {
var _jun = ds_list_get(inputs, idx + j, noone);
_jun.x = sx;
_jun.y = sy;
sy += sp * _s * _jun.isVisible();
}
}
_in += 24 * _s * jun.isVisible();
}
var outamo = output_display_list == -1? ds_list_size(outputs) : array_length(output_display_list);
xx = xx + w * _s;
_in = yy + ui(32) * _s;
for(var i = 0; i < outamo; i++) {
var idx = getOutputJunctionIndex(i);
jun = outputs[| idx];
jun.x = xx;
jun.y = _in;
_in += 24 * _s * jun.isVisible();
}
}
static onValueFromUpdate = function(index) { static onValueFromUpdate = function(index) {
if(LOADING || APPENDING) return; if(LOADING || APPENDING) return;

View file

@ -569,7 +569,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
hover = distance_to_elbow(mx, my, frx, fry, jx, jy, cx, cy, _s, jun.value_from.drawLineIndex, jun.drawLineIndex) < max(th * 2, 6); hover = distance_to_elbow(mx, my, frx, fry, jx, jy, cx, cy, _s, jun.value_from.drawLineIndex, jun.drawLineIndex) < max(th * 2, 6);
if(PANEL_GRAPH._junction_hovering == noone) if(PANEL_GRAPH._junction_hovering == noone)
jun.draw_line_shift_hover = elbow_distance_center(mx, my, frx, fry, jx, jy, cx, cy, _s) < max(th * 2, 6); jun.draw_line_shift_hover = hover;
break; break;
case 3 : case 3 :
hover = distance_to_elbow_diag(mx, my, frx, fry, jx, jy, cx, cy, _s, jun.value_from.drawLineIndex, jun.drawLineIndex) < max(th * 2, 6); hover = distance_to_elbow_diag(mx, my, frx, fry, jx, jy, cx, cy, _s, jun.value_from.drawLineIndex, jun.drawLineIndex) < max(th * 2, 6);

View file

@ -326,6 +326,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
else else
p = pathString(p, suff); p = pathString(p, suff);
//print("Exporting " + p);
p = save_surface(surf, p); p = save_surface(surf, p);
if(form != NODE_EXPORT_FORMAT.gif) { if(form != NODE_EXPORT_FORMAT.gif) {

View file

@ -134,6 +134,9 @@
#region utilities #region utilities
function previewWindow(node) { function previewWindow(node) {
if(node == noone) return; if(node == noone) return;
var dia = dialogCall(o_dialog_preview_window, mouse_mx, mouse_my, {node_target: node, preview_channel: node.preview_channel}, true); var win = new Panel_Preview_Window();
win.node_target = node;
win.preview_channel = node.preview_channel;
var dia = dialogPanelCall(win, mouse_mx, mouse_my);
} }
#endregion #endregion

View file

@ -26,7 +26,8 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct
var yy = _y + y * _s; var yy = _y + y * _s;
var hover = PANEL_GRAPH.pHOVER && point_in_rectangle(_mx, _my, xx, yy, xx + w * _s, yy + h * _s); var hover = PANEL_GRAPH.pHOVER && point_in_rectangle(_mx, _my, xx, yy, xx + w * _s, yy + h * _s);
hover |= instance_exists(o_dialog_tunnels) && o_dialog_tunnels.tunnel_hover == self; var tun = findPanel("Panel_Tunnels");
hover |= tun && tun.tunnel_hover == self;
if(!hover) return; if(!hover) return;
var _key = inputs[| 0].getValue(); var _key = inputs[| 0].getValue();

View file

@ -31,7 +31,8 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc
var yy = _y + y * _s; var yy = _y + y * _s;
var hover = PANEL_GRAPH.pHOVER && point_in_rectangle(_mx, _my, xx, yy, xx + w * _s, yy + h * _s); var hover = PANEL_GRAPH.pHOVER && point_in_rectangle(_mx, _my, xx, yy, xx + w * _s, yy + h * _s);
hover |= instance_exists(o_dialog_tunnels) && o_dialog_tunnels.tunnel_hover == self; var tun = findPanel("Panel_Tunnels");
hover |= tun && tun.tunnel_hover == self;
if(!hover) return; if(!hover) return;
var _key = inputs[| 0].getValue(); var _key = inputs[| 0].getValue();

View file

@ -1278,18 +1278,17 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
return -1; return -1;
} }
static drawJunction = function(_s, _mx, _my) { static drawJunction = function(_s, _mx, _my, sca = 1) {
if(!isVisible()) return false; if(!isVisible()) return false;
var ss = max(0.25, _s / 2); var ss = max(0.25, _s / 2);
var is_hover = false; var is_hover = false;
if(PANEL_GRAPH.pHOVER && point_in_circle(_mx, _my, x, y, 10 * _s)) { if(PANEL_GRAPH.pHOVER && point_in_circle(_mx, _my, x, y, 10 * _s * sca)) {
is_hover = true; is_hover = true;
draw_sprite_ext(isArray()? THEME.node_junctions_array_hover : THEME.node_junctions_single_hover, type, x, y, ss, ss, 0, c_white, 1); draw_sprite_ext(isArray()? THEME.node_junctions_array_hover : THEME.node_junctions_single_hover, type, x, y, ss, ss, 0, c_white, 1);
} else { } else
draw_sprite_ext(isArray()? THEME.node_junctions_array : THEME.node_junctions_single, type, x, y, ss, ss, 0, c_white, 1); draw_sprite_ext(isArray()? THEME.node_junctions_array : THEME.node_junctions_single, type, x, y, ss, ss, 0, c_white, 1);
}
return is_hover; return is_hover;
} }

View file

@ -6,10 +6,11 @@ enum KEYFRAME_DRAG_TYPE {
} }
function Panel_Animation() : PanelContent() constructor { function Panel_Animation() : PanelContent() constructor {
title = "Animation";
context_str = "Animation"; context_str = "Animation";
timeline_h = ui(28); timeline_h = ui(28);
min_w = ui(32); min_w = ui(40);
min_h = ui(48); min_h = ui(48);
tool_width = ui(280); tool_width = ui(280);
@ -1397,14 +1398,24 @@ function Panel_Animation() : PanelContent() constructor {
function drawAnimationControl() { function drawAnimationControl() {
var bx = ui(8); var bx = ui(8);
var by = h - ui(40); var by = h - ui(40);
var mini = w < ui(348);
if(w < ui(348)) { if(mini) by = h - ui(40);
bx = w / 2 - ui(36) * 6 / 2;
by = h - ui(40);
}
for( var i = 0; i < array_length(control_buttons); i++ ) { var amo = array_length(control_buttons);
var but = control_buttons[i]; var col = floor((w - ui(8)) / ui(36));
var row = ceil(amo / col);
if(col < 1) return;
for( var i = 0; i < row; i++ ) {
var colAmo = min(amo - i * col, col);
if(mini)
bx = w / 2 - ui(36) * colAmo / 2;
for( var j = 0; j < colAmo; j++ ) {
var ind = i * col + j;
if(ind >= amo) return;
var but = control_buttons[ind];
var txt = but[0](); var txt = but[0]();
var ind = but[1](); var ind = but[1]();
var cc = but[2](); var cc = but[2]();
@ -1416,13 +1427,16 @@ function Panel_Animation() : PanelContent() constructor {
bx += ui(36); bx += ui(36);
} }
if(w < ui(348)) {
if(h < 72) return;
}
if(mini) {
var y0 = ui(8); var y0 = ui(8);
var y1 = h - ui(48); var y1 = by - ui(8) + ui(36);
var cy = (y0 + y1) / 2; var cy = (y0 + y1) / 2;
if(y1 - y0 < 12) return;
draw_sprite_stretched(THEME.ui_panel_bg, 1, ui(8), y0, w - ui(16), y1 - y0); draw_sprite_stretched(THEME.ui_panel_bg, 1, ui(8), y0, w - ui(16), y1 - y0);
var pw = w - ui(16); var pw = w - ui(16);
@ -1439,16 +1453,16 @@ function Panel_Animation() : PanelContent() constructor {
var txt = string(ANIMATOR.current_frame + 1) + "/" + string(ANIMATOR.frames_total); var txt = string(ANIMATOR.current_frame + 1) + "/" + string(ANIMATOR.frames_total);
if(h < 100) { if(y1 - y0 < ui(40)) {
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text_sub); draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text_sub);
draw_text(ui(16), cy, "Frame"); draw_text(ui(16), cy, "Frame");
draw_set_text(f_p1, fa_right, fa_center, ANIMATOR.is_playing? COLORS._main_accent : COLORS._main_text_sub); draw_set_text(f_p1, fa_right, fa_center, ANIMATOR.is_playing? COLORS._main_accent : COLORS._main_text_sub);
draw_text(w - ui(16), cy, txt); draw_text(w - ui(16), cy, txt);
} else { } else {
draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text_sub); draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text_sub);
draw_text(w / 2, cy - ui(16), "Frame"); draw_text(w / 2, cy - ui(12), "Frame");
draw_set_text(f_h3, fa_center, fa_center, ANIMATOR.is_playing? COLORS._main_accent : COLORS._main_text_sub); draw_set_text(f_h5, fa_center, fa_center, ANIMATOR.is_playing? COLORS._main_accent : COLORS._main_text_sub);
draw_text(w / 2, cy + ui(6), txt); draw_text(w / 2, cy + ui(6), txt);
} }
return; return;
@ -1458,19 +1472,18 @@ function Panel_Animation() : PanelContent() constructor {
if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, get_text("panel_animation_animation_settings", "Animation settings"), THEME.animation_setting, 2) == 2) if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, get_text("panel_animation_animation_settings", "Animation settings"), THEME.animation_setting, 2) == 2)
dialogCall(o_dialog_animation, x + bx + 32, y + by - 8); dialogCall(o_dialog_animation, x + bx + 32, y + by - 8);
if(dope_sheet_h > 8) { by -= ui(40); if(by < 8) return;
by -= ui(40);
if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, get_text("panel_animation_scale_animation", "Scale animation"), THEME.animation_timing, 2) == 2) { if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, get_text("panel_animation_scale_animation", "Scale animation"), THEME.animation_timing, 2) == 2) {
var dia = dialogCall(o_dialog_anim_time_scaler, x + bx + ui(32), y + by - ui(8)); var dia = dialogCall(o_dialog_anim_time_scaler, x + bx + ui(32), y + by - ui(8));
dia.anchor = ANCHOR.right | ANCHOR.bottom; dia.anchor = ANCHOR.right | ANCHOR.bottom;
} }
if(by < ui(28)) return;
by = ui(8); by = ui(8);
var txt = show_node_outside_context? get_text("panel_animation_hide_node", "Hide node outside context") : get_text("panel_animation_show_node", "Show node outside context"); var txt = show_node_outside_context? get_text("panel_animation_hide_node", "Hide node outside context") : get_text("panel_animation_show_node", "Show node outside context");
if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(24), [mx, my], pFOCUS, pHOVER, txt, THEME.junc_visible, show_node_outside_context) == 2) if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(24), [mx, my], pFOCUS, pHOVER, txt, THEME.junc_visible, show_node_outside_context) == 2)
show_node_outside_context = !show_node_outside_context; show_node_outside_context = !show_node_outside_context;
} }
}
function drawContent(panel) { function drawContent(panel) {
draw_clear_alpha(COLORS.panel_bg_clear, 0); draw_clear_alpha(COLORS.panel_bg_clear, 0);

View file

@ -1,4 +1,5 @@
function Panel_Collection() : PanelContent() constructor { function Panel_Collection() : PanelContent() constructor {
title = "Collection"
expandable = false; expandable = false;
group_w = ui(180); group_w = ui(180);
@ -278,11 +279,13 @@ function Panel_Collection() : PanelContent() constructor {
}); });
folderPane = new scrollPane(group_w - ui(4), content_h, function(_y, _m) { folderPane = new scrollPane(group_w - ui(4), content_h, function(_y, _m) {
draw_clear(COLORS.panel_bg_clear); 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); var hh = ui(8);
_y += ui(8);
for(var i = 0; i < ds_list_size(root.subDir); i++) { for(var i = 0; i < ds_list_size(root.subDir); i++) {
var hg = root.subDir[| i].draw(self, ui(8), _y, _m, folderPane.w - ui(20), pHOVER && folderPane.hover, pFOCUS, root); var hg = root.subDir[| i].draw(self, ui(8 + in_dialog * 8), _y, _m, folderPane.w - ui(20), pHOVER && folderPane.hover, pFOCUS, root);
hh += hg; hh += hg;
_y += hg; _y += hg;
} }

View file

@ -339,18 +339,18 @@ function Panel(_parent, _x, _y, _w, _h) constructor {
function draw() { function draw() {
if(content != noone) { if(content != noone) {
if(!keyboard_check(ord("W"))) //if(!keyboard_check(ord("W")))
drawPanel(); drawPanel();
return; return;
} }
if(keyboard_check(ord("W")) && point_in_rectangle(mouse_mx, mouse_my, x, y, x + w, y + h)) { //if(keyboard_check(ord("W")) && point_in_rectangle(mouse_mx, mouse_my, x, y, x + w, y + h)) {
draw_set_color(c_lime); // draw_set_color(c_lime);
draw_set_alpha(0.1); // draw_set_alpha(0.1);
draw_rectangle(x + 8, y + 8, x + w - 8, y + h - 8, false); // draw_rectangle(x + 8, y + 8, x + w - 8, y + h - 8, false);
draw_set_alpha(1); // draw_set_alpha(1);
draw_rectangle(x + 8, y + 8, x + w - 8, y + h - 8, true); // draw_rectangle(x + 8, y + 8, x + w - 8, y + h - 8, true);
} //}
if(ds_list_empty(childs)) if(ds_list_empty(childs))
return; return;
@ -432,9 +432,39 @@ function Panel(_parent, _x, _y, _w, _h) constructor {
draw_surface_safe(content_surface, x, y); draw_surface_safe(content_surface, x, y);
if(FOCUS == self) { if(FOCUS == self && parent != noone) {
draw_sprite_stretched_ext(THEME.ui_panel_active, 0, x + padding, y + padding, w - padding * 2, h - padding * 2, COLORS._main_accent, 1); draw_sprite_stretched_ext(THEME.ui_panel_active, 0, x + padding, y + padding, w - padding * 2, h - padding * 2, COLORS._main_accent, 1);
if(content && !m_in && m_ot && DOUBLE_CLICK) {
if(content && !m_in && m_ot) {
draw_sprite_stretched_ext(THEME.ui_panel_active, 0, x + padding, y + padding, w - padding * 2, h - padding * 2, c_white, 0.4);
if(DOUBLE_CLICK) {
extract();
panel_mouse = 0;
} else if(mouse_press(mb_right)) {
var arr = [
menuItem("Move", function() {
extract();
panel_mouse = 1;
}),
menuItem("Pop out", function() { popWindow(); }, THEME.node_goto),
];
if(instanceof(content) != "Panel_Menu")
array_push(arr, menuItem("Close", function() {
extract();
o_main.panel_dragging = noone;
}, THEME.cross));
menuCall(,, arr);
}
}
}
if(o_main.panel_dragging != noone && m_ot && !key_mod_press(CTRL))
checkHover();
}
function extract() {
content.dragSurface = surface_clone(content_surface); content.dragSurface = surface_clone(content_surface);
o_main.panel_dragging = content; o_main.panel_dragging = content;
@ -462,10 +492,11 @@ function Panel(_parent, _x, _y, _w, _h) constructor {
ds_list_clear(parent.childs); ds_list_clear(parent.childs);
} }
} }
}
if(o_main.panel_dragging != noone && m_ot && !key_mod_press(CTRL)) function popWindow() {
checkHover(); dialogPanelCall(content);
extract();
o_main.panel_dragging = noone;
} }
function checkHover() { function checkHover() {
@ -476,40 +507,56 @@ function Panel(_parent, _x, _y, _w, _h) constructor {
draw_set_color(COLORS._main_accent); draw_set_color(COLORS._main_accent);
o_main.panel_hovering = self; o_main.panel_hovering = self;
var x0 = x + p;
var y0 = y + p;
var x1 = x + w - p;
var y1 = y + h - p;
var xc = x + w / 2;
var yc = y + h / 2;
if(self == PANEL_MAIN && point_in_rectangle(mouse_mx, mouse_my, x + w * 1 / 3, y + h * 1 / 3, x + w * 2 / 3, y + h * 2 / 3)) {
o_main.panel_split = 4;
o_main.panel_draw_x0_to = x + w * 1 / 3;
o_main.panel_draw_y0_to = y + h * 1 / 3;
o_main.panel_draw_x1_to = x + w * 2 / 3;
o_main.panel_draw_y1_to = y + h * 2 / 3;
} else {
if(dx + dy > 1) { if(dx + dy > 1) {
if((1 - dx) + dy > 1) { if((1 - dx) + dy > 1) {
draw_set_alpha(.4); o_main.panel_draw_x0_to = x0;
draw_roundrect_ext(x + p, y + h / 2 + p, x + w - p, y + h - p, 8, 8, false); o_main.panel_draw_y0_to = yc;
draw_set_alpha(1.); o_main.panel_draw_x1_to = x1;
draw_roundrect_ext(x + p, y + h / 2 + p, x + w - p, y + h - p, 8, 8, true); o_main.panel_draw_y1_to = y1;
o_main.panel_split = 3; o_main.panel_split = 3;
} else { } else {
draw_set_alpha(.4); o_main.panel_draw_x0_to = xc;
draw_roundrect_ext(x + p + w / 2, y + p, x + w - p, y + h - p, 8, 8, false); o_main.panel_draw_y0_to = y0;
draw_set_alpha(1.); o_main.panel_draw_x1_to = x1;
draw_roundrect_ext(x + p + w / 2, y + p, x + w - p, y + h - p, 8, 8, true); o_main.panel_draw_y1_to = y1;
o_main.panel_split = 1; o_main.panel_split = 1;
} }
} else { } else {
if((1 - dx) + dy > 1) { if((1 - dx) + dy > 1) {
draw_set_alpha(.4); o_main.panel_draw_x0_to = x0;
draw_roundrect_ext(x + p, y + p, x + w / 2 - p, y + h - p, 8, 8, false); o_main.panel_draw_y0_to = y0;
draw_set_alpha(1.); o_main.panel_draw_x1_to = xc;
draw_roundrect_ext(x + p, y + p, x + w / 2 - p, y + h - p, 8, 8, true); o_main.panel_draw_y1_to = y1;
o_main.panel_split = 2; o_main.panel_split = 2;
} else { } else {
draw_set_alpha(.4); o_main.panel_draw_x0_to = x0;
draw_roundrect_ext(x + p, y + p, x + w - p, y + h / 2 - p, 8, 8, false); o_main.panel_draw_y0_to = y0;
draw_set_alpha(1.); o_main.panel_draw_x1_to = x1;
draw_roundrect_ext(x + p, y + p, x + w - p, y + h / 2 - p, 8, 8, true); o_main.panel_draw_y1_to = yc;
o_main.panel_split = 0; o_main.panel_split = 0;
} }
} }
} }
}
function remove() { function remove() {
if(parent == noone) { if(parent == noone) {
@ -525,6 +572,7 @@ function Panel(_parent, _x, _y, _w, _h) constructor {
} }
function PanelContent() constructor { function PanelContent() constructor {
title = "";
context_str = ""; context_str = "";
draggable = true; draggable = true;
expandable = true; expandable = true;
@ -544,7 +592,10 @@ function PanelContent() constructor {
pFOCUS = false; pFOCUS = false;
pHOVER = false; pHOVER = false;
in_dialog = false;
dragSurface = surface_create(1, 1); dragSurface = surface_create(1, 1);
showHeader = true;
function refresh() { function refresh() {
onResize(); onResize();

View file

@ -18,6 +18,9 @@
graph, graph,
collection collection
} }
#macro PANEL_PADDING padding = in_dialog? ui(24) : ui(16); \
title_height = in_dialog? ui(64) : ui(56);
#endregion #endregion
#region functions #region functions
@ -50,7 +53,8 @@
loadPanelStruct(pan[1], str.content[1]); loadPanelStruct(pan[1], str.content[1]);
} }
} else { } else {
panel.set(getPanelFromName(str.content)); var cont = getPanelFromName(str.content)
if(cont != noone) panel.set(cont);
} }
} }
@ -62,6 +66,10 @@
case "Panel_Preview" : return PANEL_PREVIEW; case "Panel_Preview" : return PANEL_PREVIEW;
case "Panel_Graph" : return PANEL_GRAPH; case "Panel_Graph" : return PANEL_GRAPH;
case "Panel_Collection" : return PANEL_COLLECTION; case "Panel_Collection" : return PANEL_COLLECTION;
case "Panel_Workspace" : return new Panel_Workspace();
case "Panel_Tunnels" : return new Panel_Tunnels();
case "Panel_History" : return new Panel_History();
} }
return noone; return noone;
@ -87,6 +95,9 @@
p[ str.index].set(PANEL_COLLECTION); p[ str.index].set(PANEL_COLLECTION);
p[!str.index].set(pan); p[!str.index].set(pan);
} else {
var pan = getPanelFromName(panel);
if(pan) dialogPanelCall(pan);
} }
} }
@ -128,7 +139,19 @@
PANEL_MAIN.refresh(); PANEL_MAIN.refresh();
} }
function findPanel(_type, _pane, _res) { function findPanel(_type, _pane = PANEL_MAIN) {
var pan = _findPanel(_type, _pane);
if(pan) return pan;
with(o_dialog_panel) {
if(instanceof(content) == _type)
return content;
}
return noone;
}
function _findPanel(_type, _pane, _res = noone) {
if(instanceof(_pane) != "Panel") if(instanceof(_pane) != "Panel")
return _res; return _res;
if(!ds_exists(_pane.childs, ds_type_list)) if(!ds_exists(_pane.childs, ds_type_list))
@ -138,9 +161,8 @@
return _pane.content; return _pane.content;
for(var i = 0; i < ds_list_size(_pane.childs); i++) { for(var i = 0; i < ds_list_size(_pane.childs); i++) {
var _re = findPanel(_type, _pane.childs[| i], _res); var _re = _findPanel(_type, _pane.childs[| i], _res);
if(_re != noone) if(_re != noone) _res = _re;
_res = _re;
} }
return _res; return _res;
@ -150,15 +172,56 @@
panel_dragging = noone; panel_dragging = noone;
panel_hovering = noone; panel_hovering = noone;
panel_split = 0; panel_split = 0;
panel_mouse = 0;
panel_draw_x0 = noone; panel_draw_x0_to = noone;
panel_draw_y0 = noone; panel_draw_y0_to = noone;
panel_draw_x1 = noone; panel_draw_x1_to = noone;
panel_draw_y1 = noone; panel_draw_y1_to = noone;
panel_draw_depth = 0;
} }
function panelDraw() { function panelDraw() {
panel_draw_x0 = panel_draw_x0 == noone? panel_draw_x0_to : lerp_float(panel_draw_x0, panel_draw_x0_to, 3);
panel_draw_y0 = panel_draw_y0 == noone? panel_draw_y0_to : lerp_float(panel_draw_y0, panel_draw_y0_to, 3);
panel_draw_x1 = panel_draw_x1 == noone? panel_draw_x1_to : lerp_float(panel_draw_x1, panel_draw_x1_to, 3);
panel_draw_y1 = panel_draw_y1 == noone? panel_draw_y1_to : lerp_float(panel_draw_y1, panel_draw_y1_to, 3);
panel_draw_depth = lerp_float(panel_draw_depth, panel_split == 4, 3);
if(panel_draw_x0_to != noone) {
draw_set_color(COLORS._main_accent);
if(panel_split == 4) {
var dist = ui(8) * panel_draw_depth;
draw_set_alpha(.2);
draw_roundrect_ext(panel_draw_x0 - dist, panel_draw_y0 - dist, panel_draw_x1 - dist, panel_draw_y1 - dist, 8, 8, false);
draw_set_alpha(1.);
draw_roundrect_ext(panel_draw_x0 - dist, panel_draw_y0 - dist, panel_draw_x1 - dist, panel_draw_y1 - dist, 8, 8, true);
draw_set_alpha(.2);
draw_roundrect_ext(panel_draw_x0 + dist, panel_draw_y0 + dist, panel_draw_x1 + dist, panel_draw_y1 + dist, 8, 8, false);
draw_set_alpha(1.);
draw_roundrect_ext(panel_draw_x0 + dist, panel_draw_y0 + dist, panel_draw_x1 + dist, panel_draw_y1 + dist, 8, 8, true);
} else {
draw_set_alpha(.4);
draw_roundrect_ext(panel_draw_x0, panel_draw_y0, panel_draw_x1, panel_draw_y1, 8, 8, false);
draw_set_alpha(1.);
draw_roundrect_ext(panel_draw_x0, panel_draw_y0, panel_draw_x1, panel_draw_y1, 8, 8, true);
}
}
if(panel_dragging) { if(panel_dragging) {
draw_surface_ext(panel_dragging.dragSurface, mouse_mx + 8, mouse_my + 8, 0.5, 0.5, 0, c_white, 0.5); draw_surface_ext(panel_dragging.dragSurface, mouse_mx + 8, mouse_my + 8, 0.5, 0.5, 0, c_white, 0.5);
if(mouse_release(mb_left)) { if((panel_mouse == 0 && mouse_release(mb_left)) || (panel_mouse == 1 && mouse_press(mb_left))) {
var p = []; var p = [];
if(panel_hovering == PANEL_MAIN) { //split main panel if(panel_split == 4) {
var panel = instanceof(panel_dragging) == "Panel"? panel_dragging.content : panel_dragging;
dialogPanelCall(panel);
} else if(panel_hovering == PANEL_MAIN) { //split main panel
var panel = new Panel(noone, ui(2), ui(2), WIN_SW - ui(4), WIN_SH - ui(4)); var panel = new Panel(noone, ui(2), ui(2), WIN_SW - ui(4), WIN_SH - ui(4));
var main = PANEL_MAIN; var main = PANEL_MAIN;
@ -193,6 +256,12 @@
panel_hovering = noone; panel_hovering = noone;
panel_dragging = noone; panel_dragging = noone;
panel_draw_x0 = noone; panel_draw_x0_to = noone;
panel_draw_y0 = noone; panel_draw_y0_to = noone;
panel_draw_x1 = noone; panel_draw_x1_to = noone;
panel_draw_y1 = noone; panel_draw_y1_to = noone;
panel_draw_depth = 0;
} }
} }
} }

View file

@ -1,4 +1,5 @@
function Panel_Graph() : PanelContent() constructor { function Panel_Graph() : PanelContent() constructor {
title = "Graph";
context_str = "Graph"; context_str = "Graph";
scale = [ 0.25, 0.33, 0.5, 0.65, 0.8, 1, 1.2, 1.35, 1.5]; scale = [ 0.25, 0.33, 0.5, 0.65, 0.8, 1, 1.2, 1.35, 1.5];
@ -211,12 +212,13 @@ function Panel_Graph() : PanelContent() constructor {
addHotkey("Graph", "Paste", "V", MOD_KEY.ctrl, function() { doPaste(); }); addHotkey("Graph", "Paste", "V", MOD_KEY.ctrl, function() { doPaste(); });
addHotkey("Graph", "Tunnels", "T", MOD_KEY.none, function() { addHotkey("Graph", "Tunnels", "T", MOD_KEY.none, function() {
var dia = dialogCall(o_dialog_tunnels, mouse_mx + ui(8), mouse_my + ui(8)); var tun = new Panel_Tunnels();
var dia = dialogPanelCall(tun, mouse_mx + ui(8), mouse_my + ui(8));
dia.anchor = ANCHOR.left | ANCHOR.top; dia.anchor = ANCHOR.left | ANCHOR.top;
dia.resetPosition(); dia.resetPosition();
dia.build_x = PANEL_GRAPH.mouse_grid_x tun.build_x = PANEL_GRAPH.mouse_grid_x;
dia.build_y = PANEL_GRAPH.mouse_grid_y tun.build_y = PANEL_GRAPH.mouse_grid_y;
}); });
function stepBegin() { function stepBegin() {
@ -636,10 +638,8 @@ function Panel_Graph() : PanelContent() constructor {
} }
_junction_hovering = value_focus; _junction_hovering = value_focus;
for(var i = 0; i < ds_list_size(nodes_list); i++) { for(var i = 0; i < ds_list_size(nodes_list); i++)
nodes_list[| i].drawBadge(gr_x, gr_y, graph_s); nodes_list[| i].drawBadge(gr_x, gr_y, graph_s);
nodes_list[| i].drawJunctionNames(gr_x, gr_y, mx, my, graph_s);
}
//print("Draw node: " + string(current_time - t)); t = current_time; //print("Draw node: " + string(current_time - t)); t = current_time;
#endregion #endregion
@ -1357,6 +1357,14 @@ function Panel_Graph() : PanelContent() constructor {
} }
} else if(!value_dragging && value_focus && mouse_press(mb_left, pFOCUS) && !key_mod_press(ALT)) } else if(!value_dragging && value_focus && mouse_press(mb_left, pFOCUS) && !key_mod_press(ALT))
value_dragging = value_focus; value_dragging = value_focus;
#region draw junction name
var gr_x = graph_x * graph_s;
var gr_y = graph_y * graph_s;
for(var i = 0; i < ds_list_size(nodes_list); i++) {
nodes_list[| i].drawJunctionNames(gr_x, gr_y, mx, my, graph_s);
}
#endregion
} }
function callAddDialog() { function callAddDialog() {

View file

@ -5,7 +5,7 @@
"isCompatibility": false, "isCompatibility": false,
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "data", "name": "graph",
"path": "folders/panels/data.yy", "path": "folders/panels/data/graph.yy",
}, },
} }

View file

@ -0,0 +1,172 @@
function Panel_History() : PanelContent() constructor {
title = "Action history";
w = ui(400);
h = ui(480);
title_height = 64;
padding = 24;
anchor = ANCHOR.left | ANCHOR.top;
hold = false;
w_min = 320;
h_min = 320;
hovering = -1;
redo_list = ds_list_create();
undo_list = ds_list_create();
click_hold = noone;
showHeader = false;
function refreshList() {
ds_list_clear(redo_list);
ds_list_clear(undo_list);
while(!ds_stack_empty(REDO_STACK))
ds_list_insert(redo_list, 0, ds_stack_pop(REDO_STACK));
for( var i = 0; i < ds_list_size(redo_list); i++ )
ds_stack_push(REDO_STACK, redo_list[| i]);
while(!ds_stack_empty(UNDO_STACK))
ds_list_add(undo_list, ds_stack_pop(UNDO_STACK));
for( var i = ds_list_size(undo_list) - 1; i >= 0; i-- )
ds_stack_push(UNDO_STACK, undo_list[| i]);
}
refreshList();
onResize = function() {
PANEL_PADDING
sc_history.resize(w - ui(padding + padding), h - ui(title_height + padding));
}
sc_history = new scrollPane(w - ui(padding + padding), h - ui(title_height + padding), function(_y, _m) {
draw_clear_alpha(COLORS._main_text, 0);
if((ds_list_size(redo_list) != ds_stack_size(REDO_STACK)) || (ds_list_size(undo_list) != ds_stack_size(UNDO_STACK)))
refreshList();
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
var lh = line_height() + ui(8);
var _h = 0, hh;
var yy = _y + ui(8);
var lw = sc_history.surface_w - ui(32 + 2);
var red = ds_list_size(redo_list);
var amo = ds_list_size(redo_list) + ds_list_size(undo_list) + 1;
var _hover = -1;
var connect_line_st = 0;
var connect_line_ed = 0;
var action = -1;
for( var i = 0; i < amo; i++ ) {
if(i == red) {
draw_sprite_stretched_ext(THEME.ui_scrollbar, 0, 0, yy, sc_history.surface_w, ui(4), COLORS._main_accent, 1);
connect_line_st = yy + ui(2);
_h += ui(4 + 8);
yy += ui(4 + 8);
continue;
}
var item;
if(i < red) item = redo_list[| i];
else item = undo_list[| i - red - 1];
var itamo = array_length(item);
var amoDisp = itamo;
if(itamo > 3) {
itamo = 3;
amoDisp = 4;
}
hh = amoDisp * lh;
BLEND_OVERRIDE;
if(pHOVER && sc_history.hover && point_in_rectangle(_m[0], _m[1], ui(32), yy - ui(4), lw, yy + hh + ui(4) - 1)) {
draw_sprite_stretched_ext(THEME.node_bg, 0, ui(32), yy - ui(2), lw, hh + ui(4), COLORS._main_icon_light, 1);
_hover = i;
if(array_length(item) > itamo) {
TOOLTIP = "";
for( var j = 0; j < array_length(item); j++ )
TOOLTIP += (j? "\n" : "") + item[j].toString();
}
if(mouse_click(mb_left) && click_hold != item) {
click_hold = item;
action = i;
}
} else
draw_sprite_stretched_ext(THEME.node_bg, 0, ui(32), yy - ui(2), lw, hh + ui(4), COLORS._main_icon, 1);
var cc = COLORS._main_icon_dark;
var _yc = yy;
if(i == hovering) cc = COLORS._main_accent;
if(i < red) _yc = yy + ui(6);
else _yc = yy + hh;
draw_sprite_ui(THEME.arrow, i < red? 3 : 1, ui(16), _yc, 1.5, 1.5, 0, cc, 1);
BLEND_NORMAL;
if(i == hovering)
connect_line_ed = _yc;
for( var j = 0; j < amoDisp; j++ ) {
var _ty = yy + lh * (j + 0.5);
if(j == 3) {
draw_set_color(COLORS._main_text_sub);
draw_text_add(ui(32 + 12), _ty, string(array_length(item) - 3) + " more actions...");
} else {
draw_set_color(COLORS._main_text);
draw_text_add(ui(32 + 12), _ty, item[j].toString());
}
}
_h += hh + ui(8);
yy += hh + ui(8);
}
if(hovering > -1) {
draw_set_color(COLORS._main_accent);
draw_line_width(ui(16), connect_line_st, ui(16), connect_line_ed, ui(3));
}
if(mouse_release(mb_left))
click_hold = noone;
hovering = _hover;
if(action > -1) {
if(action < red) {
repeat(red - action)
REDO();
} else {
repeat(action - red)
UNDO();
}
hovering = -1;
}
return _h;
})
function drawContent(panel) {
PANEL_PADDING
draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text_title);
draw_text_over(in_dialog? ui(56) : ui(24), title_height / 2, title);
var px = ui(padding);
var py = ui(title_height);
var pw = w - ui(padding + padding);
var ph = h - ui(title_height + padding);
draw_sprite_stretched(THEME.ui_panel_bg, !in_dialog, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
sc_history.setActiveFocus(pFOCUS, pHOVER);
sc_history.draw(px, py, mx - px, my - py);
}
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "panel_history",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "menu",
"path": "folders/panels/data/menu.yy",
},
}

View file

@ -4,6 +4,7 @@ function Inspector_Custom_Renderer(draw) : widget() constructor {
} }
function Panel_Inspector() : PanelContent() constructor { function Panel_Inspector() : PanelContent() constructor {
title = "Inspector";
context_str = "Inspector"; context_str = "Inspector";
inspecting = noone; inspecting = noone;

View file

@ -5,7 +5,7 @@
"isCompatibility": false, "isCompatibility": false,
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "data", "name": "inspectors",
"path": "folders/panels/data.yy", "path": "folders/panels/data/inspectors.yy",
}, },
} }

View file

@ -1,5 +1,5 @@
function Panel_Menu() : PanelContent() constructor { function Panel_Menu() : PanelContent() constructor {
draggable = true; title = "Menu";
noti_flash = 0; noti_flash = 0;
noti_flash_color = COLORS._main_accent; noti_flash_color = COLORS._main_accent;
@ -93,7 +93,7 @@ function Panel_Menu() : PanelContent() constructor {
[ get_text("panel_menu_edit", "Edit"), [ [ get_text("panel_menu_edit", "Edit"), [
menuItem(get_text("undo", "Undo"), function() { UNDO(); }, THEME.undo, ["", "Undo"]), menuItem(get_text("undo", "Undo"), function() { UNDO(); }, THEME.undo, ["", "Undo"]),
menuItem(get_text("redo", "Redo"), function() { REDO(); }, THEME.redo, ["", "Redo"]), menuItem(get_text("redo", "Redo"), function() { REDO(); }, THEME.redo, ["", "Redo"]),
menuItem(get_text("history_title", "Action history"), function() { dialogCall(o_dialog_history, mouse_mx, mouse_my); }), menuItem(get_text("history_title", "Action history"), function() { dialogPanelCall(new Panel_History()); }),
]], ]],
[ get_text("panel_menu_preview", "Preview"), [ [ get_text("panel_menu_preview", "Preview"), [
menuItem(get_text("panel_menu_center_preview", "Center preview"), function() { PANEL_PREVIEW.do_fullView = true; }, THEME.icon_center_canvas, ["Preview", "Focus content"]), menuItem(get_text("panel_menu_center_preview", "Center preview"), function() { PANEL_PREVIEW.do_fullView = true; }, THEME.icon_center_canvas, ["Preview", "Focus content"]),
@ -173,9 +173,14 @@ function Panel_Menu() : PanelContent() constructor {
PREF_MAP[? "panel_collection"] = !PREF_MAP[? "panel_collection"]; PREF_MAP[? "panel_collection"] = !PREF_MAP[? "panel_collection"];
resetPanel(); resetPanel();
PREF_SAVE(); PREF_SAVE();
}), },,, function() { return findPanel("Panel_Collection") != noone; } ),
menuItem(get_text("panel_menu_graph", "Graph"), function() { panelAdd("Panel_Graph") },,, function() { return findPanel("Panel_Graph") != noone; } ),
menuItem(get_text("panel_menu_preview", "Preview"), function() { panelAdd("Panel_Preview") },,, function() { return findPanel("Panel_Preview") != noone; } ),
menuItem(get_text("panel_menu_inspector", "Inspector"), function() { panelAdd("Panel_Inspector") },,, function() { return findPanel("Panel_Inspector") != noone; } ),
menuItem(get_text("panel_menu_workspace", "Workspace"), function() { panelAdd("Panel_Workspace") },,, function() { return findPanel("Panel_Workspace") != noone; } ),
menuItem(get_text("panel_menu_animation", "Animation"), function() { panelAdd("Panel_Animation") },,, function() { return findPanel("Panel_Animation") != noone; } ),
menuItem(get_text("tunnels", "Tunnels"), function() { menuItem(get_text("tunnels", "Tunnels"), function() {
dialogCall(o_dialog_tunnels); dialogPanelCall(new Panel_Tunnels());
},, ["Graph", "Tunnels"]), },, ["Graph", "Tunnels"]),
]], ]],
[ get_text("panel_menu_help", "Help"), menu_help ], [ get_text("panel_menu_help", "Help"), menu_help ],
@ -292,7 +297,25 @@ function Panel_Menu() : PanelContent() constructor {
yy = w < ui(200)? ui(72) : ui(40); yy = w < ui(200)? ui(72) : ui(40);
} }
var xc, x0, x1, yc, y0, y1; var sx = xx;
var xc, x0, x1, yc, y0, y1, _mx = xx;
var row = 1, maxRow = ceil(h / ui(40));
var _ww = 0;
for(var i = 0; i < array_length(menus) - 1; i++) {
draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text);
var ww = string_width(menus[i][0]) + ui(16 + 8);
_ww += ww;
if(_ww > w * 0.4 - sx) {
row++;
_ww = 0;
}
}
row = min(row, maxRow);
var _curRow = 0, currY;
var _rowH = (h - ui(12)) / row;
var _ww = 0;
for(var i = 0; i < array_length(menus); i++) { for(var i = 0; i < array_length(menus); i++) {
draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text); draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text);
@ -301,12 +324,14 @@ function Panel_Menu() : PanelContent() constructor {
if(hori) { if(hori) {
xc = xx + ww / 2; xc = xx + ww / 2;
yc = h / 2;
x0 = xx; x0 = xx;
x1 = xx + ww; x1 = xx + ww;
y0 = ui(6); y0 = ui(6) + _rowH * _curRow;
y1 = h - ui(6); y1 = y0 + _rowH;
yc = (y0 + y1) / 2;
currY = yc;
} else { } else {
xc = w / 2; xc = w / 2;
yc = yy + hh / 2; yc = yy + hh / 2;
@ -327,10 +352,18 @@ function Panel_Menu() : PanelContent() constructor {
} }
draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text); draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text);
draw_text_over(xc, yc, menus[i][0]); draw_text_add(xc, yc, menus[i][0]);
if(hori) xx += ww + 8; if(hori) {
else yy += hh + 8; xx += ww + 8;
_mx = max(_mx, xx);
_ww += ww + 8;
if(_ww > w * 0.4 - sx) {
_curRow++;
_ww = 0;
xx = sx;
}
} else yy += hh + 8;
} }
#region notification #region notification
@ -343,7 +376,7 @@ function Panel_Menu() : PanelContent() constructor {
error_amo += ERRORS[| i].amount; error_amo += ERRORS[| i].amount;
if(hori) { if(hori) {
var nx0 = xx + ui(24); var nx0 = _mx + ui(24);
var ny0 = h / 2; var ny0 = h / 2;
} else { } else {
var nx0 = ui(8); var nx0 = ui(8);
@ -370,7 +403,7 @@ function Panel_Menu() : PanelContent() constructor {
if(pHOVER && point_in_rectangle(mx, my, nx0, ny0 - nh / 2, nx0 + nw, ny0 + nh / 2)) { if(pHOVER && point_in_rectangle(mx, my, nx0, ny0 - nh / 2, nx0 + nw, ny0 + nh / 2)) {
draw_sprite_stretched_ext(THEME.menu_button, 0, nx0, ny0 - nh / 2, nw, nh, cc, 1); draw_sprite_stretched_ext(THEME.menu_button, 0, nx0, ny0 - nh / 2, nw, nh, cc, 1);
if(mouse_press(mb_left, pFOCUS)) { if(mouse_press(mb_left, pFOCUS)) {
var dia = dialogCall(o_dialog_notifications, nx0, ny0 + nh / 2 + ui(4)); var dia = dialogPanelCall(new Panel_Notification(), nx0, ny0 + nh / 2 + ui(4));
dia.anchor = ANCHOR.left | ANCHOR.top; dia.anchor = ANCHOR.left | ANCHOR.top;
} }
@ -501,16 +534,30 @@ function Panel_Menu() : PanelContent() constructor {
if(STEAM_ENABLED) txt += " Steam"; if(STEAM_ENABLED) txt += " Steam";
if(hori) { if(hori) {
draw_set_text(f_p0, fa_right, fa_center, COLORS._main_text_sub); draw_set_text(f_p0, fa_center, fa_center, COLORS._main_text_sub);
var ww = string_width(txt) + ui(12); var ww = string_width(txt) + ui(12);
if(pHOVER && point_in_rectangle(mx, my, x1 - ww, 0, x1, h)) {
draw_sprite_stretched(THEME.button_hide_fill, 1, x1 - ww, ui(6), ww, h - ui(12)); if(h > ui(76)) {
ww += ui(16);
var _x0 = w - ui(8) - ww;
var _y0 = h - ui(40);
var _x1 = w - ui(8);
var _y1 = h - ui(8);
} else {
var _x0 = x1 - ww;
var _y0 = ui(6);
var _x1 = x1;
var _y1 = h - ui(6);
}
if(pHOVER && point_in_rectangle(mx, my, _x0, _y0, _x1, _y1)) {
draw_sprite_stretched(THEME.button_hide_fill, 1, _x0, _y0, _x1 - _x0, _y1 - _y0);
if(mouse_press(mb_left, pFOCUS)) { if(mouse_press(mb_left, pFOCUS)) {
dialogCall(o_dialog_release_note); dialogCall(o_dialog_release_note);
} }
} }
draw_text(x1 - ui(6), h / 2, txt); draw_text((_x0 + _x1) / 2, (_y0 + _y1) / 2, txt);
} else { } else {
var x1 = ui(40); var x1 = ui(40);
var y1 = h - ui(20); var y1 = h - ui(20);
@ -543,10 +590,17 @@ function Panel_Menu() : PanelContent() constructor {
var tbx0, tby0; var tbx0, tby0;
if(hori) { if(hori) {
if(h > ui(76)) {
tx0 = nx0;
tx1 = w - ui(8);
ty0 = 0;
ty1 = h;
} else {
tx0 = nx0; tx0 = nx0;
tx1 = x1 - ww; tx1 = x1 - ww;
ty0 = 0; ty0 = 0;
ty1 = h; ty1 = h;
}
tcx = (tx0 + tx1) / 2; tcx = (tx0 + tx1) / 2;
} else { } else {

View file

@ -5,7 +5,7 @@
"isCompatibility": false, "isCompatibility": false,
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "data", "name": "menu",
"path": "folders/panels/data.yy", "path": "folders/panels/data/menu.yy",
}, },
} }

View file

@ -0,0 +1,180 @@
function Panel_Notification() : PanelContent() constructor {
title = get_text("noti_title", "Notification");
w = ui(720);
h = ui(480);
title_height = 64;
padding = 24;
current_page = 0;
filter = NOTI_TYPE.log | NOTI_TYPE.warning | NOTI_TYPE.error;
showHeader = false;
rightClickMenu = [
menuItem(get_text("noti_clear_log", "Clear log messages"), function() {
for( var i = ds_list_size(STATUSES) - 1; i >= 0; i-- ) {
if(STATUSES[| i].type == NOTI_TYPE.log)
ds_list_delete(STATUSES, i);
}
}),
menuItem(get_text("noti_clear_warn", "Clear warning messages"), function() {
for( var i = ds_list_size(STATUSES) - 1; i >= 0; i-- ) {
if(STATUSES[| i].type == NOTI_TYPE.warning)
ds_list_delete(STATUSES, i);
}
}),
-1,
menuItem(get_text("noti_clear_all", "Clear all notifications"), function() {
ds_list_clear(STATUSES);
}),
-1,
menuItem(get_text("noti_open_log", "Open log file"), function() {
shellOpenExplorer(DIRECTORY + "log.txt");
}),
];
function onResize() {
PANEL_PADDING
sp_noti.resize(w - ui(padding + padding), h - ui(title_height + padding));
}
sp_noti = new scrollPane(w - ui(padding + padding), h - ui(title_height + padding), function(_y, _m) {
draw_clear_alpha(COLORS.panel_bg_clear, 0);
var hh = 32;
var yy = _y;
var txw = sp_noti.surface_w - ui(48 + 48 + 20);
var amo = ds_list_size(STATUSES);
draw_set_font(f_p3);
var timeW = string_width("00:00:00");
for( var i = 0; i < ds_list_size(STATUSES); i++ ) {
var index = amo - 1 - i;
var noti = STATUSES[| index];
if(noti.type & filter == 0) continue;
draw_set_font(f_p2);
var _w = sp_noti.surface_w;
var _h = ui(8) + string_height_ext(noti.txt, -1, txw) + ui(8);
if(yy >= -_h && yy <= sp_noti.h) {
draw_sprite_stretched_ext(THEME.group_label, 0, 0, yy + ui(2), _w, _h - ui(4), COLORS.dialog_notification_bg, 1);
if(pHOVER && pHOVER && point_in_rectangle(_m[0], _m[1], 0, yy, _w, yy + _h - ui(4))) {
draw_sprite_stretched_ext(THEME.group_label, 0, 0, yy + ui(2), _w, _h - ui(4), COLORS.dialog_notification_bg_hover, 1);
if(noti.tooltip != "")
TOOLTIP = noti.tooltip;
if(noti.onClick != noone && mouse_press(mb_left, pFOCUS))
noti.onClick();
if(mouse_press(mb_right, pFOCUS)) {
var dia = menuCall(,, [
menuItem(get_text("noti_copy_message", "Copy notification message"), function() {
clipboard_set_text(o_dialog_menubox.noti.txt);
}),
menuItem(get_text("noti_delete_message", "Delete notification"), function() {
ds_list_remove(STATUSES, o_dialog_menubox.noti);
}),
]);
dia.noti = noti;
}
}
if(noti.life_max > 0) {
var _nwx = sp_noti.w - ui(12) - ui(40);
var _nw = _nwx * noti.life / noti.life_max;
draw_sprite_stretched_ext(THEME.group_label, 0, ui(40), yy + ui(2), _nw, _h - ui(4), COLORS.dialog_notification_icon_bg, 1);
}
draw_sprite_stretched_ext(THEME.group_label, 0, 0, yy + ui(2), ui(48), _h - ui(4), noti.color, 1);
if(noti.icon_end != noone)
draw_sprite_ui(noti.icon_end, 1, _w - ui(24), yy + _h / 2,,,, COLORS._main_icon);
var ic = noti.icon;
if(noti.icon == noone) {
switch(noti.type) {
case NOTI_TYPE.log : ic = THEME.noti_icon_log; break;
case NOTI_TYPE.warning : ic = THEME.noti_icon_warning; break;
case NOTI_TYPE.error : ic = THEME.noti_icon_error; break;
}
}
draw_sprite_ui(ic, 1, ui(24), yy + _h / 2);
var tx = ui(48) + timeW + ui(12);
draw_set_text(f_p3, fa_right, fa_center, COLORS._main_text_sub);
draw_text_ext(tx - ui(4), yy + _h / 2, noti.time, -1, txw);
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
draw_text_ext(tx + ui(4), yy + _h / 2, noti.txt, -1, txw);
if(noti.amount > 1) {
draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text);
var bw = max( ui(32), string_width(noti.amount) + ui(10) );
var bh = ui(28);
var bx = _w - ui(0) - bw;
var by = yy + ui(0) + ui(2);
draw_sprite_stretched_ext(THEME.group_label, 0, bx, by, bw, bh, COLORS._main_icon_dark, 0.75);
draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text_accent);
draw_text(bx + bw / 2, by + bh / 2, noti.amount);
}
}
yy += _h;
hh += _h;
}
return hh;
});
function drawContent(panel) {
PANEL_PADDING
draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text_title);
draw_text_over(in_dialog? ui(56) : ui(24), title_height / 2, title);
var ww = ui(28);
var hh = ui(28);
var bx = w - ui(in_dialog? padding - 8 : padding) - ww;
var by = title_height / 2 - ui(14);
var error = !!(filter & NOTI_TYPE.error);
var toolt = error? get_text("noti_hide_error", "Hide error") : get_text("noti_show_error", "Show error");
var b = buttonInstant(THEME.button_hide, bx, by, ww, hh, [mx, my], pFOCUS, pHOVER, toolt, THEME.noti_icon_error, error, c_white, 0.75 + error * 0.25);
if(b == 2) filter = filter ^ NOTI_TYPE.error;
if(b == 3) menuCall(,, rightClickMenu);
bx -= ui(36);
var warn = !!(filter & NOTI_TYPE.warning);
var toolt = warn? get_text("noti_hide_warning", "Hide warning") : get_text("noti_show_warning", "Show warning");
var b = buttonInstant(THEME.button_hide, bx, by, ww, hh, [mx, my], pFOCUS, pHOVER, toolt, THEME.noti_icon_warning, warn, c_white, 0.75 + warn * 0.25);
if(b == 2) filter = filter ^ NOTI_TYPE.warning;
if(b == 3) menuCall(,, rightClickMenu);
bx -= ui(36);
var log = !!(filter & NOTI_TYPE.log);
var toolt = log? get_text("noti_hide_log", "Hide log") : get_text("noti_show_log", "Show log");
var b = buttonInstant(THEME.button_hide, bx, by, ww, hh, [mx, my], pFOCUS, pHOVER, toolt, THEME.noti_icon_log, log, c_white, 0.75 + log * 0.25);
if(b == 2) filter = filter ^ NOTI_TYPE.log;
if(b == 3) menuCall(,, rightClickMenu);
var px = ui(padding);
var py = ui(title_height);
var pw = w - ui(padding + padding);
var ph = h - ui(title_height + padding);
draw_sprite_stretched(THEME.ui_panel_bg, !in_dialog, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
sp_noti.setActiveFocus(pHOVER, pHOVER);
sp_noti.draw(px, py, mx - px, my - py);
}
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "panel_notification",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "data",
"path": "folders/panels/data.yy",
},
}

View file

@ -1,4 +1,5 @@
function Panel_Preview() : PanelContent() constructor { function Panel_Preview() : PanelContent() constructor {
title = "Preview";
context_str = "Preview"; context_str = "Preview";
last_focus = noone; last_focus = noone;
@ -252,17 +253,17 @@ function Panel_Preview() : PanelContent() constructor {
if(!is_surface(prevS)) { if(!is_surface(prevS)) {
canvas_s = 1; canvas_s = 1;
canvas_x = w / 2; canvas_x = w / 2;
canvas_y = (h - toolbar_height) / 2; canvas_y = (h - toolbar_height * 2) / 2;
return; return;
} }
canvas_w = surface_get_width(prevS); canvas_w = surface_get_width(prevS);
canvas_h = surface_get_height(prevS); canvas_h = surface_get_height(prevS);
var ss = min((w - 32) / canvas_w, (h - 32 - toolbar_height) / canvas_h); var ss = min((w - 32) / canvas_w, (h - 32 - toolbar_height * 2) / canvas_h);
canvas_s = ss; canvas_s = ss;
canvas_x = w / 2 - canvas_w * canvas_s / 2; canvas_x = w / 2 - canvas_w * canvas_s / 2;
canvas_y = (h - toolbar_height) / 2 - canvas_h * canvas_s / 2; canvas_y = h / 2 - canvas_h * canvas_s / 2;
if(PANEL_GRAPH.node_focus) { if(PANEL_GRAPH.node_focus) {
canvas_x -= PANEL_GRAPH.node_focus.preview_x * canvas_s; canvas_x -= PANEL_GRAPH.node_focus.preview_x * canvas_s;

View file

@ -5,7 +5,7 @@
"isCompatibility": false, "isCompatibility": false,
"isDnD": false, "isDnD": false,
"parent": { "parent": {
"name": "data", "name": "preview",
"path": "folders/panels/data.yy", "path": "folders/panels/data/preview.yy",
}, },
} }

View file

@ -0,0 +1,147 @@
function Panel_Preview_Window() : PanelContent() constructor {
min_w = ui(64);
min_h = ui(64);
padding = 8;
title_height = 32;
w = ui(200);
h = ui(200);
node_target = noone;
preview_channel = 0;
title_show = 0;
scale = 0;
panx = 0;
pany = 0;
panning = false;
pan_mx = 0;
pan_my = 0;
pan_sx = 0;
pan_sy = 0;
function surfaceCheck() {
content_surface = surface_verify(content_surface, w, h);
}
function reset() {
scale = 0;
panx = 0;
pany = 0;
}
function changeChannel(index) {
var channel = index - array_length(menu);
for( var i = 0; i < ds_list_size(node_target.outputs); i++ ) {
var o = node_target.outputs[| i];
if(o.type != VALUE_TYPE.surface) continue;
if(channel-- == 0) {
preview_channel = i;
return;
}
}
}
content_surface = noone;
surfaceCheck();
menu = [
menuItem(get_text("reset_view", "Reset view"), function() { reset(); }),
-1,
menuItem(get_text("preview_win_inspect", "Inspect"), function() { PANEL_GRAPH.node_focus = node_target; }),
menuItem(get_text("panel_graph_send_to_preview", "Send to preview"), function() { PANEL_PREVIEW.setNodePreview(node_target); }),
-1,
]
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();
surface_set_target(content_surface);
draw_clear(COLORS.panel_bg_clear);
draw_sprite_tiled_ext(s_transparent, 0, 0, 0, 1, 1, c_white, 0.75);
var surf = node_target.outputs[| preview_channel].getValue();
if(is_array(surf))
surf = array_spread(surf);
else
surf = [ surf ];
var dx = 0;
var dy = 0;
var ind = 0;
var col = round(sqrt(array_length(surf)));
for( var i = 0; i < array_length(surf); i++ ) {
var s = surf[i];
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;
draw_surface_ext(s, sx, sy, scale, scale, 0, c_white, 1);
draw_set_color(COLORS._main_icon);
draw_rectangle(sx, sy, sx + sw * scale, sy + sh * scale, true);
if(++ind >= col) {
ind = 0;
dx = 0;
dy += (sh + 2) * scale;
} else
dx += (sw + 2) * scale;
}
surface_reset_target();
draw_surface(content_surface, px, py);
if(panning) {
panx = pan_sx + (mouse_mx - pan_mx);
pany = pan_sy + (mouse_my - pan_my);
if(mouse_release(mb_middle))
panning = false;
}
if(mouse_press(mb_middle, pFOCUS)) {
panning = true;
pan_mx = mouse_mx;
pan_my = mouse_my;
pan_sx = panx;
pan_sy = pany;
}
if(pHOVER) {
var inc = 0.5;
if(scale > 16) inc = 2;
else if(scale > 8) inc = 1;
var s = scale;
if(mouse_wheel_down()) scale = max(round(scale / inc) * inc - inc, 0.25);
if(mouse_wheel_up()) scale = min(round(scale / inc) * inc + inc, 32);
var ds = scale - s;
panx = panx / s * scale;
pany = pany / s * scale;
}
if(mouse_click(mb_right, pFOCUS)) {
var _menu = array_clone(menu);
for( var i = 0; i < ds_list_size(node_target.outputs); i++ ) {
var o = node_target.outputs[| i];
if(o.type != VALUE_TYPE.surface) continue;
array_push(_menu, menuItem(o.name, function(_x, _y, _d, _n, index) { changeChannel(index); }));
}
menuCall(,, _menu);
}
}
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "panel_preview_window",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "preview",
"path": "folders/panels/data/preview.yy",
},
}

View file

@ -0,0 +1,181 @@
function Panel_Tunnels() : PanelContent() constructor {
#region data
title = "Tunnels";
w = ui(320);
h = ui(480);
title_height = 64;
padding = 24;
build_x = 0;
build_y = 0;
tunnel_ins = [];
tunnel_select = noone;
tunnel_hover = noone;
showHeader = false;
function scanNodes() {
var amo = ds_map_size(NODE_MAP);
var k = ds_map_find_first(NODE_MAP);
tunnel_ins = [];
repeat(amo) {
var node = NODE_MAP[? k];
k = ds_map_find_next(NODE_MAP, k);
if(instanceof(node) == "Node_Tunnel_In")
array_push(tunnel_ins, node);
}
}
scanNodes();
search_string = "";
keyboard_lastchar = "";
KEYBOARD_STRING = "";
keyboard_lastkey = -1;
search_res = [];
tb_search = new textBox(TEXTBOX_INPUT.text, function(str) {
search_string = string(str);
searchNodes();
});
tb_search.align = fa_left;
tb_search.auto_update = true;
tb_search.boxColor = COLORS._main_icon_light;
WIDGET_CURRENT = tb_search;
function searchNodes() {
search_res = [];
for( var i = 0; i < array_length(tunnel_ins); i++ ) {
var node = tunnel_ins[i];
var key = node.inputs[| 0].getValue(0);
if(string_pos(search_string, key) == 0) continue;
array_push(search_res, node);
}
}
#endregion
function onResize() {
PANEL_PADDING
sc_tunnel.resize(w - ui(padding + padding), h - ui(title_height + padding));
}
#region content
sc_tunnel = new scrollPane(w - ui(padding + padding), h - ui(title_height + padding), function(_y, _m) {
draw_clear_alpha(COLORS.panel_bg_clear, 0);
var _h = 0;
var ww = sc_tunnel.surface_w;
var hg = ui(36);
var i = 0;
var arr = search_string == ""? tunnel_ins : search_res;
tunnel_hover = noone;
for( var i = 0; i < array_length(arr); i++ ) {
var node = arr[i];
if(point_in_rectangle(_m[0], _m[1], 0, _y, ww, _y + hg)) {
var cc = merge_color(COLORS._main_icon_light, COLORS._main_icon, 0.25);
draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, _y, ww, hg, cc, 1);
tunnel_hover = node;
if(mouse_press(mb_left, sc_tunnel.active) && _m[0] < ww - ui(32 + 32 * 2))
tunnel_select = tunnel_select == node? noone : node;
} else
draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, _y, ww, hg, COLORS._main_icon_light, 1);
var key = node.inputs[| 0].getValue(0);
var bw = ui(28);
var bh = ui(28);
var bx = ww - ui(4) - bw;
var by = _y + (hg - bh) / 2;
if(buttonInstant(THEME.button_hide, bx, by, bw, bh, _m, sc_tunnel.active, sc_tunnel.hover, "Go to node", THEME.node_goto) == 2)
graphFocusNode(node);
bx -= ui(32);
if(buttonInstant(THEME.button_hide, bx, by, bw, bh, _m, sc_tunnel.active, sc_tunnel.hover, "Create tunnel out", THEME.tunnel) == 2) {
var n = nodeBuild("Node_Tunnel_Out", build_x, build_y);
n.inputs[| 0].setValue(key);
if(in_dialog) instance_destroy();
}
bx -= ui(32);
draw_sprite_ui(THEME.tunnel, 1, ui(4 + 16), _y + hg / 2);
draw_set_text(f_p0, fa_left, fa_center, key == ""? COLORS._main_text_sub : COLORS._main_text);
draw_text(ui(4 + 32 + 4), _y + hg / 2, key == ""? "[no key]" : key);
_y += hg + ui(4);
_h += hg + ui(4);
if(tunnel_select == node) {
var amo = ds_map_size(TUNNELS_OUT);
var k = ds_map_find_first(TUNNELS_OUT);
repeat(amo) {
var _k = k;
k = ds_map_find_next(TUNNELS_OUT, k);
var out = TUNNELS_OUT[? _k];
if(out != key || !ds_map_exists(NODE_MAP, _k))
continue;
var _node = NODE_MAP[? _k];
draw_sprite_ui(THEME.tunnel, 0, ui(32), _y + ui(10), 0.75, 0.75, 0, COLORS._main_icon);
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text_sub);
draw_text(ui(32 + 16), _y + ui(10), _node.display_name == ""? _node.name : _node.display_name);
if(point_in_rectangle(_m[0], _m[1], 0, _y, ww, _y + ui(20)))
tunnel_hover = _node;
_y += ui(20);
_h += ui(20);
}
_y += ui(8);
_h += ui(8);
}
}
return _h;
})
#endregion
function drawContent(panel) {
PANEL_PADDING
draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text_title);
draw_text_over(in_dialog? ui(56) : ui(24), title_height / 2, title);
scanNodes();
var px = ui(padding);
var py = ui(title_height);
var pw = w - ui(padding + padding);
var ph = h - ui(title_height + padding);
draw_sprite_stretched(THEME.ui_panel_bg, !in_dialog, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
if(pFOCUS) WIDGET_CURRENT = tb_search;
tb_search.draw(px, py, pw, ui(32), search_string, [mx, my]);
if(search_string == "")
tb_search.sprite_index = 1;
sc_tunnel.setActiveFocus(pFOCUS, pHOVER);
sc_tunnel.draw(px, py + ui(40), mx - px, my - (py + ui(40)));
var bx = w - ui(32 + 16);
var by = title_height / 2 - ui(14);
if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, "Create tunnel", THEME.tunnel, 1, c_white) == 2) {
nodeBuild("Node_Tunnel_In", build_x, build_y);
instance_destroy();
}
}
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "panel_tunnels",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "graph",
"path": "folders/panels/data/graph.yy",
},
}

View file

@ -0,0 +1,51 @@
function Panel_Workspace() : PanelContent() constructor {
workspaces = [];
w = ui(480);
h = ui(96);
function refreshContent() {
workspaces = [];
var f = file_find_first(DIRECTORY + "layouts/*", 0);
while(f != "") {
array_push(workspaces, filename_name_only(f));
f = file_find_next();
}
}
refreshContent();
function drawContent(panel) {
draw_clear(COLORS.panel_bg_clear);
var hori = w > h;
var x0 = ui(6), x1;
var y0 = ui(6), y1;
draw_set_text(f_p1, hori? fa_left : fa_center, fa_top, COLORS._main_text_sub);
for( var i = 0; i < array_length(workspaces); i++ ) {
var tw = hori? string_width(workspaces[i]) + ui(16) : w - ui(16);
var th = string_height(workspaces[i]) + ui(8);
x1 = x0 + tw;
y1 = y0 + th;
if(pHOVER && point_in_rectangle(mx, my, x0, y0, x1, y1)) {
draw_sprite_stretched(THEME.button_hide_fill, 1, x0, y0, x1 - x0, y1 - y0);
if(mouse_press(mb_left, pFOCUS)) {
PREF_MAP[? "panel_layout_file"] = workspaces[i];
PREF_SAVE();
setPanel();
}
}
draw_set_color(PREF_MAP[? "panel_layout_file"] == workspaces[i]? COLORS._main_text : COLORS._main_text_sub)
draw_text_add(hori? x0 + ui(8) : (x0 + x1) / 2, y0 + ui(4), workspaces[i]);
if(hori) x0 += tw + ui(4);
else y0 += th + ui(4);
}
}
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "panel_workspace",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "menu",
"path": "folders/panels/data/menu.yy",
},
}

View file

@ -159,7 +159,7 @@ function SAVE_COLLECTIONS(_list, _path, save_surface = true, metadata = noone) {
file_text_close(file); file_text_close(file);
ds_map_destroy(_map); ds_map_destroy(_map);
var pane = findPanel("Panel_Collection", PANEL_MAIN, noone); var pane = findPanel("Panel_Collection");
if(pane) pane.refreshContext(); if(pane) pane.refreshContext();
log_message("COLLECTION", "save collection at " + _path, THEME.noti_icon_file_save); log_message("COLLECTION", "save collection at " + _path, THEME.noti_icon_file_save);
@ -190,7 +190,7 @@ function SAVE_COLLECTION(_node, _path, save_surface = true, metadata = noone) {
file_text_close(file); file_text_close(file);
ds_map_destroy(_map); ds_map_destroy(_map);
var pane = findPanel("Panel_Collection", PANEL_MAIN, noone); var pane = findPanel("Panel_Collection");
if(pane) pane.refreshContext(); if(pane) pane.refreshContext();
log_message("COLLECTION", "save collection at " + _path, THEME.noti_icon_file_save); log_message("COLLECTION", "save collection at " + _path, THEME.noti_icon_file_save);