- [Add node] Sections are now collapsible. - [Add node, inspector panel] Double click on section to collapses/expands all.

This commit is contained in:
Tanasart 2024-10-30 15:09:52 +07:00
parent 4277f0998b
commit 5589a07be6
47 changed files with 1449 additions and 482 deletions

View file

@ -127,6 +127,7 @@
{"name":"blur","order":60,"path":"folders/nodes/icons/filter/blur.yy",}, {"name":"blur","order":60,"path":"folders/nodes/icons/filter/blur.yy",},
{"name":"fluidSim","order":3,"path":"folders/nodes/icons/fluidSim.yy",}, {"name":"fluidSim","order":3,"path":"folders/nodes/icons/fluidSim.yy",},
{"name":"generator","order":4,"path":"folders/nodes/icons/generator.yy",}, {"name":"generator","order":4,"path":"folders/nodes/icons/generator.yy",},
{"name":"tiler","order":17,"path":"folders/nodes/icons/tiler.yy",},
{"name":"IO","order":5,"path":"folders/nodes/icons/IO.yy",}, {"name":"IO","order":5,"path":"folders/nodes/icons/IO.yy",},
{"name":"misc","order":6,"path":"folders/nodes/icons/misc.yy",}, {"name":"misc","order":6,"path":"folders/nodes/icons/misc.yy",},
{"name":"MK effects","order":7,"path":"folders/nodes/icons/MK effects.yy",}, {"name":"MK effects","order":7,"path":"folders/nodes/icons/MK effects.yy",},
@ -671,6 +672,7 @@
{"name":"function_register","order":2,"path":"scripts/function_register/function_register.yy",}, {"name":"function_register","order":2,"path":"scripts/function_register/function_register.yy",},
{"name":"fx_controller","order":1,"path":"scripts/fx_controller/fx_controller.yy",}, {"name":"fx_controller","order":1,"path":"scripts/fx_controller/fx_controller.yy",},
{"name":"gameframe","order":3,"path":"scripts/gameframe/gameframe.yy",}, {"name":"gameframe","order":3,"path":"scripts/gameframe/gameframe.yy",},
{"name":"gamemakerPathBox","order":1,"path":"scripts/gamemakerPathBox/gamemakerPathBox.yy",},
{"name":"getGradientData","order":1,"path":"scripts/getGradientData/getGradientData.yy",}, {"name":"getGradientData","order":1,"path":"scripts/getGradientData/getGradientData.yy",},
{"name":"gif_reader","order":4,"path":"scripts/gif_reader/gif_reader.yy",}, {"name":"gif_reader","order":4,"path":"scripts/gif_reader/gif_reader.yy",},
{"name":"globals","order":2,"path":"scripts/globals/globals.yy",}, {"name":"globals","order":2,"path":"scripts/globals/globals.yy",},
@ -1177,6 +1179,8 @@
{"name":"node_tile_random","order":16,"path":"scripts/node_tile_random/node_tile_random.yy",}, {"name":"node_tile_random","order":16,"path":"scripts/node_tile_random/node_tile_random.yy",},
{"name":"node_tile","order":5,"path":"scripts/node_tile/node_tile.yy",}, {"name":"node_tile","order":5,"path":"scripts/node_tile/node_tile.yy",},
{"name":"node_tiler_export","order":5,"path":"scripts/node_tiler_export/node_tiler_export.yy",}, {"name":"node_tiler_export","order":5,"path":"scripts/node_tiler_export/node_tiler_export.yy",},
{"name":"node_tiler_render","order":7,"path":"scripts/node_tiler_render/node_tiler_render.yy",},
{"name":"node_tiler_rule","order":6,"path":"scripts/node_tiler_rule/node_tiler_rule.yy",},
{"name":"node_tiler_tileset","order":3,"path":"scripts/node_tiler_tileset/node_tiler_tileset.yy",}, {"name":"node_tiler_tileset","order":3,"path":"scripts/node_tiler_tileset/node_tiler_tileset.yy",},
{"name":"node_time_remap","order":3,"path":"scripts/node_time_remap/node_time_remap.yy",}, {"name":"node_time_remap","order":3,"path":"scripts/node_time_remap/node_time_remap.yy",},
{"name":"node_timeline_preview","order":2,"path":"scripts/node_timeline_preview/node_timeline_preview.yy",}, {"name":"node_timeline_preview","order":2,"path":"scripts/node_timeline_preview/node_timeline_preview.yy",},
@ -1298,6 +1302,7 @@
{"name":"panel_file_explorer","order":12,"path":"scripts/panel_file_explorer/panel_file_explorer.yy",}, {"name":"panel_file_explorer","order":12,"path":"scripts/panel_file_explorer/panel_file_explorer.yy",},
{"name":"panel_function","order":1,"path":"scripts/panel_function/panel_function.yy",}, {"name":"panel_function","order":1,"path":"scripts/panel_function/panel_function.yy",},
{"name":"panel_globalvar","order":1,"path":"scripts/panel_globalvar/panel_globalvar.yy",}, {"name":"panel_globalvar","order":1,"path":"scripts/panel_globalvar/panel_globalvar.yy",},
{"name":"panel_gm_explorer","order":13,"path":"scripts/panel_gm_explorer/panel_gm_explorer.yy",},
{"name":"panel_gradient","order":2,"path":"scripts/panel_gradient/panel_gradient.yy",}, {"name":"panel_gradient","order":2,"path":"scripts/panel_gradient/panel_gradient.yy",},
{"name":"panel_graph_connection_settings","order":6,"path":"scripts/panel_graph_connection_settings/panel_graph_connection_settings.yy",}, {"name":"panel_graph_connection_settings","order":6,"path":"scripts/panel_graph_connection_settings/panel_graph_connection_settings.yy",},
{"name":"panel_graph_export_image_dialog","order":5,"path":"scripts/panel_graph_export_image_dialog/panel_graph_export_image_dialog.yy",}, {"name":"panel_graph_export_image_dialog","order":5,"path":"scripts/panel_graph_export_image_dialog/panel_graph_export_image_dialog.yy",},
@ -1971,6 +1976,7 @@
{"name":"s_folder_add","order":66,"path":"sprites/s_folder_add/s_folder_add.yy",}, {"name":"s_folder_add","order":66,"path":"sprites/s_folder_add/s_folder_add.yy",},
{"name":"s_folder_content","order":67,"path":"sprites/s_folder_content/s_folder_content.yy",}, {"name":"s_folder_content","order":67,"path":"sprites/s_folder_content/s_folder_content.yy",},
{"name":"s_frame_range","order":68,"path":"sprites/s_frame_range/s_frame_range.yy",}, {"name":"s_frame_range","order":68,"path":"sprites/s_frame_range/s_frame_range.yy",},
{"name":"s_gamemaker","order":2,"path":"sprites/s_gamemaker/s_gamemaker.yy",},
{"name":"s_gear_16","order":230,"path":"sprites/s_gear_16/s_gear_16.yy",}, {"name":"s_gear_16","order":230,"path":"sprites/s_gear_16/s_gear_16.yy",},
{"name":"s_gear_24","order":69,"path":"sprites/s_gear_24/s_gear_24.yy",}, {"name":"s_gear_24","order":69,"path":"sprites/s_gear_24/s_gear_24.yy",},
{"name":"s_gizmo","order":4,"path":"sprites/s_gizmo/s_gizmo.yy",}, {"name":"s_gizmo","order":4,"path":"sprites/s_gizmo/s_gizmo.yy",},
@ -2581,9 +2587,10 @@
{"name":"s_node_texture_map","order":53,"path":"sprites/s_node_texture_map/s_node_texture_map.yy",}, {"name":"s_node_texture_map","order":53,"path":"sprites/s_node_texture_map/s_node_texture_map.yy",},
{"name":"s_node_threshold","order":54,"path":"sprites/s_node_threshold/s_node_threshold.yy",}, {"name":"s_node_threshold","order":54,"path":"sprites/s_node_threshold/s_node_threshold.yy",},
{"name":"s_node_tile_random","order":22,"path":"sprites/s_node_tile_random/s_node_tile_random.yy",}, {"name":"s_node_tile_random","order":22,"path":"sprites/s_node_tile_random/s_node_tile_random.yy",},
{"name":"s_node_tileset_drawer","order":41,"path":"sprites/s_node_tileset_drawer/s_node_tileset_drawer.yy",}, {"name":"s_node_tileset_drawer","order":2,"path":"sprites/s_node_tileset_drawer/s_node_tileset_drawer.yy",},
{"name":"s_node_tileset_export","order":42,"path":"sprites/s_node_tileset_export/s_node_tileset_export.yy",}, {"name":"s_node_tileset_export","order":3,"path":"sprites/s_node_tileset_export/s_node_tileset_export.yy",},
{"name":"s_node_tileset","order":40,"path":"sprites/s_node_tileset/s_node_tileset.yy",}, {"name":"s_node_tileset_rule","order":4,"path":"sprites/s_node_tileset_rule/s_node_tileset_rule.yy",},
{"name":"s_node_tileset","order":1,"path":"sprites/s_node_tileset/s_node_tileset.yy",},
{"name":"s_node_time_map","order":55,"path":"sprites/s_node_time_map/s_node_time_map.yy",}, {"name":"s_node_time_map","order":55,"path":"sprites/s_node_time_map/s_node_time_map.yy",},
{"name":"s_node_timeline_preview","order":2,"path":"sprites/s_node_timeline_preview/s_node_timeline_preview.yy",}, {"name":"s_node_timeline_preview","order":2,"path":"sprites/s_node_timeline_preview/s_node_timeline_preview.yy",},
{"name":"s_node_to_number","order":11,"path":"sprites/s_node_to_number/s_node_to_number.yy",}, {"name":"s_node_to_number","order":11,"path":"sprites/s_node_to_number/s_node_to_number.yy",},

View file

@ -114,8 +114,8 @@
{"$GMFolder":"","%Name":"vector","folderPath":"folders/functions/vector.yy","name":"vector","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"vector","folderPath":"folders/functions/vector.yy","name":"vector","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"window","folderPath":"folders/functions/window.yy","name":"window","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"window","folderPath":"folders/functions/window.yy","name":"window","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"main","folderPath":"folders/main.yy","name":"main","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"main","folderPath":"folders/main.yy","name":"main","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"components","folderPath":"folders/main/components.yy","name":"components","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"binder","folderPath":"folders/main/binder.yy","name":"binder","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"binder","folderPath":"folders/main/binder.yy","name":"binder","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"components","folderPath":"folders/main/components.yy","name":"components","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"misc","folderPath":"folders/misc.yy","name":"misc","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"misc","folderPath":"folders/misc.yy","name":"misc","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"fx","folderPath":"folders/misc/fx.yy","name":"fx","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"fx","folderPath":"folders/misc/fx.yy","name":"fx","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"nodes","folderPath":"folders/nodes.yy","name":"nodes","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"nodes","folderPath":"folders/nodes.yy","name":"nodes","resourceType":"GMFolder","resourceVersion":"2.0",},
@ -227,6 +227,7 @@
{"$GMFolder":"","%Name":"blur","folderPath":"folders/nodes/icons/filter/blur.yy","name":"blur","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"blur","folderPath":"folders/nodes/icons/filter/blur.yy","name":"blur","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"fluidSim","folderPath":"folders/nodes/icons/fluidSim.yy","name":"fluidSim","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"fluidSim","folderPath":"folders/nodes/icons/fluidSim.yy","name":"fluidSim","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"generator","folderPath":"folders/nodes/icons/generator.yy","name":"generator","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"generator","folderPath":"folders/nodes/icons/generator.yy","name":"generator","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"tiler","folderPath":"folders/nodes/icons/tiler.yy","name":"tiler","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"IO","folderPath":"folders/nodes/icons/IO.yy","name":"IO","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"IO","folderPath":"folders/nodes/icons/IO.yy","name":"IO","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"misc","folderPath":"folders/nodes/icons/misc.yy","name":"misc","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"misc","folderPath":"folders/nodes/icons/misc.yy","name":"misc","resourceType":"GMFolder","resourceVersion":"2.0",},
{"$GMFolder":"","%Name":"MK effects","folderPath":"folders/nodes/icons/MK effects.yy","name":"MK effects","resourceType":"GMFolder","resourceVersion":"2.0",}, {"$GMFolder":"","%Name":"MK effects","folderPath":"folders/nodes/icons/MK effects.yy","name":"MK effects","resourceType":"GMFolder","resourceVersion":"2.0",},
@ -1204,6 +1205,7 @@
{"id":{"name":"function_register","path":"scripts/function_register/function_register.yy",},}, {"id":{"name":"function_register","path":"scripts/function_register/function_register.yy",},},
{"id":{"name":"fx_controller","path":"scripts/fx_controller/fx_controller.yy",},}, {"id":{"name":"fx_controller","path":"scripts/fx_controller/fx_controller.yy",},},
{"id":{"name":"gameframe","path":"scripts/gameframe/gameframe.yy",},}, {"id":{"name":"gameframe","path":"scripts/gameframe/gameframe.yy",},},
{"id":{"name":"gamemakerPathBox","path":"scripts/gamemakerPathBox/gamemakerPathBox.yy",},},
{"id":{"name":"getGradientData","path":"scripts/getGradientData/getGradientData.yy",},}, {"id":{"name":"getGradientData","path":"scripts/getGradientData/getGradientData.yy",},},
{"id":{"name":"gif_reader","path":"scripts/gif_reader/gif_reader.yy",},}, {"id":{"name":"gif_reader","path":"scripts/gif_reader/gif_reader.yy",},},
{"id":{"name":"globals","path":"scripts/globals/globals.yy",},}, {"id":{"name":"globals","path":"scripts/globals/globals.yy",},},
@ -1783,6 +1785,8 @@
{"id":{"name":"node_tile_random","path":"scripts/node_tile_random/node_tile_random.yy",},}, {"id":{"name":"node_tile_random","path":"scripts/node_tile_random/node_tile_random.yy",},},
{"id":{"name":"node_tile","path":"scripts/node_tile/node_tile.yy",},}, {"id":{"name":"node_tile","path":"scripts/node_tile/node_tile.yy",},},
{"id":{"name":"node_tiler_export","path":"scripts/node_tiler_export/node_tiler_export.yy",},}, {"id":{"name":"node_tiler_export","path":"scripts/node_tiler_export/node_tiler_export.yy",},},
{"id":{"name":"node_tiler_render","path":"scripts/node_tiler_render/node_tiler_render.yy",},},
{"id":{"name":"node_tiler_rule","path":"scripts/node_tiler_rule/node_tiler_rule.yy",},},
{"id":{"name":"node_tiler_tileset","path":"scripts/node_tiler_tileset/node_tiler_tileset.yy",},}, {"id":{"name":"node_tiler_tileset","path":"scripts/node_tiler_tileset/node_tiler_tileset.yy",},},
{"id":{"name":"node_tiler","path":"scripts/node_tiler/node_tiler.yy",},}, {"id":{"name":"node_tiler","path":"scripts/node_tiler/node_tiler.yy",},},
{"id":{"name":"node_time_remap","path":"scripts/node_time_remap/node_time_remap.yy",},}, {"id":{"name":"node_time_remap","path":"scripts/node_time_remap/node_time_remap.yy",},},
@ -1922,6 +1926,7 @@
{"id":{"name":"panel_file_explorer","path":"scripts/panel_file_explorer/panel_file_explorer.yy",},}, {"id":{"name":"panel_file_explorer","path":"scripts/panel_file_explorer/panel_file_explorer.yy",},},
{"id":{"name":"panel_function","path":"scripts/panel_function/panel_function.yy",},}, {"id":{"name":"panel_function","path":"scripts/panel_function/panel_function.yy",},},
{"id":{"name":"panel_globalvar","path":"scripts/panel_globalvar/panel_globalvar.yy",},}, {"id":{"name":"panel_globalvar","path":"scripts/panel_globalvar/panel_globalvar.yy",},},
{"id":{"name":"panel_gm_explorer","path":"scripts/panel_gm_explorer/panel_gm_explorer.yy",},},
{"id":{"name":"panel_gradient","path":"scripts/panel_gradient/panel_gradient.yy",},}, {"id":{"name":"panel_gradient","path":"scripts/panel_gradient/panel_gradient.yy",},},
{"id":{"name":"panel_graph_connection_settings","path":"scripts/panel_graph_connection_settings/panel_graph_connection_settings.yy",},}, {"id":{"name":"panel_graph_connection_settings","path":"scripts/panel_graph_connection_settings/panel_graph_connection_settings.yy",},},
{"id":{"name":"panel_graph_export_image_dialog","path":"scripts/panel_graph_export_image_dialog/panel_graph_export_image_dialog.yy",},}, {"id":{"name":"panel_graph_export_image_dialog","path":"scripts/panel_graph_export_image_dialog/panel_graph_export_image_dialog.yy",},},
@ -2690,6 +2695,7 @@
{"id":{"name":"s_folder_content","path":"sprites/s_folder_content/s_folder_content.yy",},}, {"id":{"name":"s_folder_content","path":"sprites/s_folder_content/s_folder_content.yy",},},
{"id":{"name":"s_frame_range","path":"sprites/s_frame_range/s_frame_range.yy",},}, {"id":{"name":"s_frame_range","path":"sprites/s_frame_range/s_frame_range.yy",},},
{"id":{"name":"s_fx_pixel","path":"sprites/s_fx_pixel/s_fx_pixel.yy",},}, {"id":{"name":"s_fx_pixel","path":"sprites/s_fx_pixel/s_fx_pixel.yy",},},
{"id":{"name":"s_gamemaker","path":"sprites/s_gamemaker/s_gamemaker.yy",},},
{"id":{"name":"s_gear_16","path":"sprites/s_gear_16/s_gear_16.yy",},}, {"id":{"name":"s_gear_16","path":"sprites/s_gear_16/s_gear_16.yy",},},
{"id":{"name":"s_gear_24","path":"sprites/s_gear_24/s_gear_24.yy",},}, {"id":{"name":"s_gear_24","path":"sprites/s_gear_24/s_gear_24.yy",},},
{"id":{"name":"s_gizmo","path":"sprites/s_gizmo/s_gizmo.yy",},}, {"id":{"name":"s_gizmo","path":"sprites/s_gizmo/s_gizmo.yy",},},
@ -3336,6 +3342,8 @@
{"id":{"name":"s_node_tile_random","path":"sprites/s_node_tile_random/s_node_tile_random.yy",},}, {"id":{"name":"s_node_tile_random","path":"sprites/s_node_tile_random/s_node_tile_random.yy",},},
{"id":{"name":"s_node_tileset_drawer","path":"sprites/s_node_tileset_drawer/s_node_tileset_drawer.yy",},}, {"id":{"name":"s_node_tileset_drawer","path":"sprites/s_node_tileset_drawer/s_node_tileset_drawer.yy",},},
{"id":{"name":"s_node_tileset_export","path":"sprites/s_node_tileset_export/s_node_tileset_export.yy",},}, {"id":{"name":"s_node_tileset_export","path":"sprites/s_node_tileset_export/s_node_tileset_export.yy",},},
{"id":{"name":"s_node_tileset_render","path":"sprites/s_node_tileset_render/s_node_tileset_render.yy",},},
{"id":{"name":"s_node_tileset_rule","path":"sprites/s_node_tileset_rule/s_node_tileset_rule.yy",},},
{"id":{"name":"s_node_tileset","path":"sprites/s_node_tileset/s_node_tileset.yy",},}, {"id":{"name":"s_node_tileset","path":"sprites/s_node_tileset/s_node_tileset.yy",},},
{"id":{"name":"s_node_time_map","path":"sprites/s_node_time_map/s_node_time_map.yy",},}, {"id":{"name":"s_node_time_map","path":"sprites/s_node_time_map/s_node_time_map.yy",},},
{"id":{"name":"s_node_timeline_preview","path":"sprites/s_node_timeline_preview/s_node_timeline_preview.yy",},}, {"id":{"name":"s_node_timeline_preview","path":"sprites/s_node_timeline_preview/s_node_timeline_preview.yy",},},

View file

@ -40,7 +40,8 @@ event_inherited();
tooltip_surface = -1; tooltip_surface = -1;
content_hoverable = true; content_hoverable = true;
canvas = false; canvas = false;
collapsed = ds_map_create();
#region ---- category ---- #region ---- category ----
category = NODE_CATEGORY; category = NODE_CATEGORY;
@ -388,6 +389,7 @@ event_inherited();
content_pane = new scrollPane(dialog_w - category_width - ui(8), dialog_h - ui(66), function(_y, _m) { content_pane = new scrollPane(dialog_w - category_width - ui(8), dialog_h - ui(66), function(_y, _m) {
draw_clear_alpha(c_white, 0); draw_clear_alpha(c_white, 0);
var _hover = sHOVER && content_pane.hover; var _hover = sHOVER && content_pane.hover;
var _focus = sFOCUS && content_pane.active;
var _list = node_list; var _list = node_list;
var ww = content_pane.surface_w; var ww = content_pane.surface_w;
var hh = 0; var hh = 0;
@ -489,16 +491,26 @@ event_inherited();
if(is_string(_node)) { if(is_string(_node)) {
if(!PREFERENCES.dialog_add_node_grouping) if(!PREFERENCES.dialog_add_node_grouping)
continue; continue;
hh += curr_height; hh += curr_height;
yy += curr_height; yy += curr_height;
cProg = 0; cProg = 0;
curr_height = 0; curr_height = 0;
var _key = $"{ADD_NODE_PAGE}:{index}";
array_push(group_labels, { y: yy, text: __txt(_node) }); array_push(group_labels, { y: yy, text: __txt(_node), key: _key });
hh += ui(24 + 12); if(ds_map_exists(collapsed, _key)) {
yy += ui(24 + 12); hh += ui(24 + 4);
yy += ui(24 + 4);
while(index + 1 < node_count && !is_string(_list[| index + 1]))
index++;
} else {
hh += ui(24 + 12);
yy += ui(24 + 12);
}
continue; continue;
} }
@ -583,17 +595,42 @@ event_inherited();
content_hoverable &= !point_in_rectangle(_m[0], _m[1], 0, 0, ww, ui(36)); content_hoverable &= !point_in_rectangle(_m[0], _m[1], 0, 0, ww, ui(36));
} }
var _lbh = ui(24);
var _cAll = 0;
for( var i = 0; i < len; i++ ) { for( var i = 0; i < len; i++ ) {
var lb = group_labels[i]; var lb = group_labels[i];
var _yy = max(lb.y, i == len - 1? ui(8) : min(ui(8), group_labels[i + 1].y - ui(32))); var _name = lb.text;
var _key = lb.key;
var _coll = ds_map_exists(collapsed, _key);
var _yy = max(lb.y, i == len - 1? ui(8) : min(ui(8), group_labels[i + 1].y - ui(32)));
BLEND_OVERRIDE; BLEND_OVERRIDE;
draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, ui(16), _yy, ww - ui(32), ui(24), c_white, 0.3); if(_hover && point_in_rectangle(_m[0], _m[1], 0, _yy, ww, _yy + _lbh)) {
draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, ui(16), _yy, ww - ui(32), _lbh, COLORS.panel_inspector_group_hover, 1);
if(_focus) {
if(DOUBLE_CLICK) {
_cAll = _coll? -1 : 1;
} else if(mouse_press(mb_left)) {
if(_coll) ds_map_delete(collapsed, _key);
else ds_map_add(collapsed, _key, 1);
}
}
} else
draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, ui(16), _yy, ww - ui(32), _lbh, COLORS.panel_inspector_group_bg, 1);
BLEND_NORMAL; BLEND_NORMAL;
draw_sprite_ui(THEME.arrow, _coll? 0 : 3, ui(16 + 16), _yy + _lbh / 2, 1, 1, 0, CDEF.main_ltgrey, 1);
draw_set_text(f_p2, fa_left, fa_center, CDEF.main_ltgrey); draw_set_text(f_p2, fa_left, fa_center, CDEF.main_ltgrey);
draw_text_add(ui(16 + 16), _yy + ui(12), lb.text); draw_text_add(ui(16 + 28), _yy + _lbh / 2, _name);
} }
if(_cAll == 1) { for( var i = 0; i < len; i++ ) ds_map_delete(collapsed, group_labels[i].key); }
else if(_cAll == -1) { for( var i = 0; i < len; i++ ) ds_map_add(collapsed, group_labels[i].key, 1); }
} }
hh += curr_height; hh += curr_height;
@ -627,13 +664,20 @@ event_inherited();
hh += ui(8); hh += ui(8);
yy += ui(8); yy += ui(8);
array_push(group_labels, { var _key = $"{ADD_NODE_PAGE}:{i}";
y: yy,
text: __txt(_node)
});
hh += ui(32); array_push(group_labels, { y: yy, text: __txt(_node), key: _key });
yy += ui(32);
if(ds_map_exists(collapsed, _key)) {
hh += ui(24);
yy += ui(24);
while(i + 1 < node_count && !is_string(_list[| i + 1]))
i++;
} else {
hh += ui(32);
yy += ui(32);
}
continue; continue;
} }
@ -698,17 +742,41 @@ event_inherited();
content_hoverable &= !point_in_rectangle(_m[0], _m[1], 0, 0, ww, ui(36)); content_hoverable &= !point_in_rectangle(_m[0], _m[1], 0, 0, ww, ui(36));
} }
var _lbh = ui(24);
var _cAll = 0;
for( var i = 0; i < len; i++ ) { for( var i = 0; i < len; i++ ) {
var lb = group_labels[i]; var lb = group_labels[i];
var _name = lb.text;
var _key = lb.key;
var _coll = ds_map_exists(collapsed, _key);
var _yy = max(lb.y, i == len - 1? ui(8) : min(ui(8), group_labels[i + 1].y - ui(32))); var _yy = max(lb.y, i == len - 1? ui(8) : min(ui(8), group_labels[i + 1].y - ui(32)));
BLEND_OVERRIDE; BLEND_OVERRIDE;
draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, ui(16), _yy, ww - ui(32), ui(24), c_white, 0.3); if(_hover && point_in_rectangle(_m[0], _m[1], 0, _yy, ww, _yy + _lbh)) {
draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, ui(16), _yy, ww - ui(32), _lbh, COLORS.panel_inspector_group_hover, 1);
if(_focus) {
if(DOUBLE_CLICK) {
_cAll = _coll? -1 : 1;
} else if(mouse_press(mb_left)) {
if(_coll) ds_map_delete(collapsed, _key);
else ds_map_add(collapsed, _key, 1);
}
}
} else
draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, ui(16), _yy, ww - ui(32), _lbh, COLORS.panel_inspector_group_bg, 1);
BLEND_NORMAL; BLEND_NORMAL;
draw_sprite_ui(THEME.arrow, _coll? 0 : 3, ui(16 + 16), _yy + _lbh / 2, 1, 1, 0, CDEF.main_ltgrey, 1);
draw_set_text(f_p2, fa_left, fa_center, CDEF.main_ltgrey); draw_set_text(f_p2, fa_left, fa_center, CDEF.main_ltgrey);
draw_text_add(ui(16 + 16), _yy + ui(12), lb.text); draw_text_add(ui(16 + 28), _yy + _lbh / 2, _name);
} }
if(_cAll == 1) { for( var i = 0; i < len; i++ ) ds_map_delete(collapsed, group_labels[i].key); }
else if(_cAll == -1) { for( var i = 0; i < len; i++ ) ds_map_add(collapsed, group_labels[i].key, 1); }
} }
if(sHOVER && key_mod_press(CTRL)) { if(sHOVER && key_mod_press(CTRL)) {
@ -724,8 +792,6 @@ event_inherited();
return hh; return hh;
}); });
function setPage(pageIndex) { function setPage(pageIndex) {
ADD_NODE_PAGE = min(pageIndex, ds_list_size(category) - 1); ADD_NODE_PAGE = min(pageIndex, ds_list_size(category) - 1);
node_list = pageIndex < 0? noone : category[| ADD_NODE_PAGE].list; node_list = pageIndex < 0? noone : category[| ADD_NODE_PAGE].list;

View file

@ -1,4 +1,5 @@
/// @description /// @description
event_inherited(); event_inherited();
ds_map_destroy(collapsed);
WIDGET_CURRENT = noone; WIDGET_CURRENT = noone;

View file

@ -157,6 +157,24 @@ if(winMan_isMinimized()) exit;
} }
break; break;
case "GMSprite" :
var _spr = DRAGGING.data.thumbnail;
if(_spr) {
var ss = ui(48) / max(sprite_get_width(_spr), sprite_get_height(_spr))
draw_sprite_ext(_spr, 0, mx, my, ss, ss, 0, c_white, 1);
}
break;
case "GMTileSet" :
var _spm = struct_try_get(DRAGGING.data.gmBinder.resourcesMap, DRAGGING.data.sprite, noone);
var _spr = _spm == noone? noone : _spm.thumbnail;
if(_spr) {
var ss = ui(48) / max(sprite_get_width(_spr), sprite_get_height(_spr))
draw_sprite_ext(_spr, 0, mx, my, ss, ss, 0, c_white, 1);
}
break;
default: default:
draw_set_alpha(0.5); draw_set_alpha(0.5);
draw_set_text(f_h3, fa_center, fa_center, COLORS._main_text); draw_set_text(f_h3, fa_center, fa_center, COLORS._main_text);

View file

@ -98,3 +98,380 @@ function tiler_rule() constructor {
return self; return self;
} }
} }
function Tileset_Rule(_tileset) : Inspector_Custom_Renderer(noone, noone) constructor {
name = "Tile Riles";
tileset = _tileset;
ruleTiles = [];
rule_dragging = noone;
rule_selector_h = 0;
renaming = noone;
rename_text = "";
tb_rename = new textBox(TEXTBOX_INPUT.text, function(_name) {
if(renaming == noone) return;
renaming.name = _name;
renaming = noone;
});
tb_rename.font = f_p2;
tb_rename.hide = true;
temp_surface = [ 0, 0, 0 ];
function setTileset(_tileset) { tileset = _tileset; return self; }
function draw(_x, _y, _w, _m, _hover, _focus, _panel = noone) {
var _yy = _y;
var _h = 0;
var _tileSet = tileset.texture;
var _tileSiz = tileset.tileSize;
if(!is_surface(_tileSet)) return _h;
var _tdim = surface_get_dimension(_tileSet);
var _tileAmo = [ floor(_tdim[0] / _tileSiz[0]), floor(_tdim[1] / _tileSiz[1]) ];
var bx = _x;
var by = _yy;
var bs = ui(24);
if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover, "New rule", THEME.add_16, 0, COLORS._main_value_positive) == 2) {
var _new_rl = new tiler_rule();
_new_rl.name = $"rule {array_length(ruleTiles)}"
_new_rl.open = true;
array_push(ruleTiles, _new_rl);
tileset.triggerRender();
}
_h += bs + ui(4);
_yy += bs + ui(4);
var _pd = ui(4);
var _ah = _pd * 2;
var del = -1;
var rl_iHover = 0;
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _yy, _w, rule_selector_h, COLORS.node_composite_bg_blend, 1);
_yy += _pd;
for( var i = 0, n = array_length(ruleTiles); i < n; i++ ) {
var _hg = ui(32);
var _rl = ruleTiles[i];
var _pw = ui(24);
var _ph = ui(24);
var _px = _x + ui(8);
var _py = _yy + ui(4);
if(_m[1] > _yy) rl_iHover = i;
var _prin = array_safe_get(_rl.replacements, 0, undefined);
if(_prin == undefined)
draw_sprite_stretched_ext(THEME.ui_panel, 1, _px, _py, _pw, _ph, COLORS._main_icon);
else if(is(_prin, tiler_rule_replacement)) {
var _ind = array_safe_get(_prin.index, 0);
tileset.drawTile(_tileSet, _tileAmo, _tileSiz, _ind, _px, _py, _pw, _ph);
}
var _tx = _px + _pw + ui(8);
var _hov = _hover && point_in_rectangle(_m[0], _m[1], _x, _yy, _x + _w, _yy + _hg - 1);
if(renaming == _rl) {
tb_rename.setFocusHover(_focus, _hover);
tb_rename.draw(_tx, _yy, _w - _pw - ui(8), _hg, rename_text, _m);
} else {
var _cc = _hov? COLORS._main_text : COLORS._main_text_sub;
if(rule_dragging == _rl) _cc = COLORS._main_accent;
draw_set_text(f_p2, fa_left, fa_center, _cc);
draw_text_add(_tx, _yy + _hg / 2, _rl.name);
var bs = ui(24);
var bx = _w - bs - ui(4);
var by = _yy + _hg / 2 - bs / 2;
if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover, "", THEME.minus_16, 0, _hov? COLORS._main_value_negative : COLORS._main_icon) == 2)
del = i;
}
if(_hov && _m[0] < _x + _w - ui(32 + 160)) {
if(_m[0] > _tx) {
if(mouse_press(mb_left, _focus)) {
rule_dragging = _rl;
} else if(DOUBLE_CLICK && _focus) {
renaming = _rl;
rename_text = _rl.name;
tb_rename._current_text = _rl.name;
tb_rename.activate();
}
} else {
draw_sprite_stretched_ext(THEME.ui_panel, 1, _px, _py, _pw, _ph, COLORS._main_accent);
if(mouse_press(mb_left, _focus))
_rl.open = !_rl.open;
}
}
var _atWid = _rl.sl_prop;
var _scw = ui(120);
var _sch = ui(20);
var _scx = _x + _w - _scw - ui(32 + 8);
var _scy = _yy + _hg / 2 - _sch / 2;
_atWid.setFocusHover(_focus, _hover);
_atWid.rx = rx;
_atWid.ry = ry;
_atWid.draw(_scx, _scy, _scw, _sch, _rl.probability, _m);
if(_rl.probability != _rl._probability) {
_rl._probability = _rl.probability;
tileset.triggerRender();
}
var _acw = ui(20);
var _ach = ui(20);
var _acx = _scx - _acw - ui(8);
var _acy = _yy + _hg / 2 - _sch / 2;
var _ahv = _hover && point_in_rectangle(_m[0], _m[1], _acx, _acy, _acx + _acw, _acy + _ach);
if(_ahv) {
TOOLTIP = "Active";
if(mouse_press(mb_left, _focus)) {
_rl.active = !_rl.active;
tileset.triggerRender();
}
}
draw_sprite_stretched_ext(THEME.checkbox_def, _ahv, _acx, _acy, _acw, _ach, c_white);
if(_rl.active) draw_sprite_stretched_ext(THEME.checkbox_def, 2, _acx, _acy, _acw, _ach, COLORS._main_accent);
_yy += _hg;
_ah += _hg;
if(_rl.open) {
_yy += ui(4);
_ah += ui(4);
var _sls = ui(28);
var _radw = _rl.size[0] + _rl.range * 2;
var _radh = _rl.size[1] + _rl.range * 2;
var _slw = ui(16) + _radw * _sls;
var _slh = ui(16) + _radh * _sls;
var _hh0 = _slh;
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x + ui(8), _yy, _slw, _slh, COLORS.node_composite_bg_blend, 1);
for( var j = 0, m = array_length(_rl.selection_rules); j < m; j++ ) {
var _rl_sel = _rl.selection_rules[j];
var _rl_col = j % _radw;
var _rl_row = floor(j / _radw);
var _cen = _rl_col >= _rl.range && _rl_col < _rl.range + _rl.size[0] &&
_rl_row >= _rl.range && _rl_row < _rl.range + _rl.size[1];
var _rl_x = _x + ui(16) + _rl_col * _sls;
var _rl_y = _yy + ui( 8) + _rl_row * _sls;
var _rl_selected = tileset.object_selecting == _rl && tileset.object_select_id == j;
var _rl_hov = _hover && point_in_rectangle(_m[0], _m[1], _rl_x, _rl_y, _rl_x + _sls - 1, _rl_y + _sls - 1);
var _pad = ui(2);
var _cc = _rl_selected? COLORS._main_accent : COLORS._main_icon;
var _aa = _rl_selected? 1 : .5 + _rl_hov * .5;
if(is_array(_rl_sel)) {
var _autt = tileset.autoterrain[_rl_sel[1]];
tileset.drawTile(_tileSet, _tileAmo, _tileSiz, _autt.index[0], _rl_x + ui(2), _rl_y + ui(2), _sls - ui(4), _sls - ui(4));
draw_sprite_uniform(THEME.circle, 0, _rl_x + _sls - ui(8), _rl_y + _sls - ui(8), 1, COLORS._main_accent);
} else if (_rl_sel == -10000) {
draw_sprite_uniform(THEME.cross, 0, _rl_x + _sls / 2, _rl_y + _sls / 2, 1, _cc, _aa);
} else if(_rl_sel != -1) {
tileset.drawTile(_tileSet, _tileAmo, _tileSiz, _rl_sel, _rl_x + ui(2), _rl_y + ui(2), _sls - ui(4), _sls - ui(4));
} else if(!_cen) _pad = ui(10);
draw_sprite_stretched_ext(THEME.ui_panel, 1 + _cen, _rl_x + _pad, _rl_y + _pad, _sls - _pad * 2, _sls - _pad * 2, _cc, _aa);
if(_rl_hov) {
if(mouse_press(mb_left, _focus)) {
tileset.object_selecting = _rl_selected? noone : _rl;
tileset.object_select_id = j;
tileset.triggerRender();
}
if(mouse_press(mb_right, _focus)) {
_rl.selection_rules[j] = -1;
tileset.object_selecting = noone;
tileset.object_select_id = noone;
tileset.triggerRender();
}
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var _rep = _rl.replacements;
var _siz = _rl.size;
var _rpw = _sls * _siz[0];
var _rph = _sls * _siz[1];
var _dx = ui(8) + _slw + ui(16);
var _slw = _w - _dx - ui(8);
var _rx;
if((_rpw + ui(4)) * 2 > _slw - ui(16)) {
_yy += _slh + ui(8);
_ah += _slh + ui(8);
draw_sprite_uniform(THEME.arrow, 0, _x + _w / 2, _yy + ui(6), 1, COLORS._main_icon, 1);
_rx = _x + ui(8);
_slw = _w - ui(16);
_hh0 = 0;
} else {
draw_sprite_uniform(THEME.arrow, 0, _x + ui(8) + _slw + ui(8), _yy + _slh / 2, 1, COLORS._main_icon, 1);
_rx = _x + _dx;
_slw = _w - _dx - ui(8);
}
var _col = max(1, floor((_slw - ui(16)) / (_rpw + ui(4))));
var _row = ceil((array_length(_rep) + 1) / _col);
var _slh = ui(16) + _row * _rph;
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _rx, _yy, _slw, max(_hh0, _slh), COLORS.node_composite_bg_blend, 1);
var del_rep = -1;
for( var j = 0, m = array_length(_rep) + 1; j < m; j++ ) {
var _rcl = j % _col;
var _rrw = floor(j / _col);
var _rpx = _rx + ui(8) + _rcl * (_rpw + ui(4));
var _rpy = _yy + ui(8) + _rrw * _rph;
var _rl_hov = _hover && point_in_rectangle(_m[0], _m[1], _rpx, _rpy, _rpx + _rpw, _rpy + _rph);
if(j == 0) {
var _cc = _rl_hov? COLORS._main_value_positive : COLORS._main_icon;
draw_sprite_uniform(THEME.add_16, 0, _rpx + _rpw / 2, _rpy + _rph / 2, 1, _cc);
if(_rl_hov && mouse_press(mb_left, _focus)) {
var _new_rep = new tiler_rule_replacement([-1]);
array_push(_rl.replacements, _new_rep);
tileset.object_selecting = _new_rep;
tileset.object_select_id = _rl;
}
continue;
}
var _replace = _rep[j - 1];
var _repIndex = _replace.index;
if(!is_array(_repIndex)) continue;
for( var k = 0, q = array_length(_repIndex); k < q; k++ ) {
var _repBlockCol = k % _siz[0];
var _repBlockRow = floor(k / _siz[0]);
var _rpbx = _rpx + _repBlockCol * _sls;
var _rpby = _rpy + _repBlockRow * _sls;
if(_replace.index[k] != -1) tileset.drawTile(_tileSet, _tileAmo, _tileSiz, _replace.index[k], _rpbx, _rpby, _sls, _sls);
}
var _rl_selected = tileset.object_selecting == _replace;
var _cc = _rl_selected? COLORS._main_accent : COLORS._main_icon;
var _aa = _rl_selected? 1 : .5 + _rl_hov * .5;
draw_sprite_stretched_ext(THEME.ui_panel, 1, _rpx, _rpy, _rpw, _rph, _cc, _aa);
if(_rl_hov) {
if(mouse_press(mb_left, _focus)) {
tileset.object_selecting = tileset.object_selecting == _replace? noone : _replace;
tileset.object_select_id = _rl;
tileset.triggerRender();
}
if(mouse_press(mb_right, _focus)) {
del_rep = j;
tileset.triggerRender();
}
}
}
if(del_rep != -1) {
array_delete(_rep, del_rep, 1);
tileset.triggerRender();
}
_yy += max(_hh0, _slh) + ui(8);
_ah += max(_hh0, _slh) + ui(8);
}
}
if(rule_dragging != noone) {
array_remove(_rules, rule_dragging);
array_insert(_rules, rl_iHover, rule_dragging);
if(mouse_release(mb_left)) {
rule_dragging = noone;
tileset.triggerRender();
}
}
if(del != -1) {
array_delete(_rules, del, 1);
tileset.triggerRender();
}
rule_selector_h = max(ui(12), _ah);
return _h + _ah;
}
function apply(_tilemap, _seed) {
var _mapSize = surface_get_dimension(_tilemap);
temp_surface[0] = surface_verify(temp_surface[0], _mapSize[0], _mapSize[1], surface_rgba16float);
temp_surface[1] = surface_verify(temp_surface[1], _mapSize[0], _mapSize[1], surface_rgba16float);
temp_surface[2] = surface_verify(temp_surface[2], _mapSize[0], _mapSize[1], surface_r16float);
var bg = 0;
surface_set_shader(temp_surface[1], sh_sample, true, BLEND.over);
draw_surface(_tilemap, 0, 0);
surface_reset_shader();
for( var i = 0, n = array_length(ruleTiles); i < n; i++ ) {
var _rule = ruleTiles[i];
if(!_rule.active) continue;
if(array_empty(_rule.replacements)) continue;
surface_set_shader(temp_surface[2], sh_tile_rule_select, true, BLEND.over);
shader_set_2("dimension", _mapSize);
_rule.shader_select(tileset);
draw_surface(_tilemap, 0, 0);
surface_reset_shader();
surface_set_shader(temp_surface[bg], sh_tile_rule_apply, true, BLEND.over);
shader_set_2("dimension", _mapSize);
shader_set_f("seed", _seed);
shader_set_surface("group", temp_surface[2]);
_rule.shader_submit(tileset);
draw_surface(temp_surface[!bg], 0, 0);
surface_reset_shader();
bg = !bg;
}
return temp_surface[!bg];
}
}

View file

@ -1,3 +1,114 @@
function __Binder_Gamemaker(path) constructor { function Binder_Gamemaker(path) {
if(!file_exists_empty(path)) return noone;
if(filename_ext(path) != ".yyp") return noone;
return new __Binder_Gamemaker(path);
}
function GMSprite(_gm, _path, _info) constructor {
gmBinder = _gm;
path = $"{_gm.dir}/{_path}";
key = _path;
raw = _info;
type = _info.resourceType;
thumbnail = noone;
var _dirr = filename_dir(path);
var _frame = raw.frames;
var _layers = raw.layers;
thumbnailPath = "";
if(array_empty(_frame) || array_empty(_layers)) return;
thumbnailPath = $"{_dirr}/layers/{_frame[0].name}/{_layers[0].name}.png";
if(file_exists(thumbnailPath)) {
var _th = sprite_add(thumbnailPath, 0, 0, 0, 0, 0);
thumbnail = _th;
}
}
function GMTileset(_gm, _path, _info) constructor {
gmBinder = _gm;
path = $"{_gm.dir}/{_path}";
key = _path;
raw = _info;
type = _info.resourceType;
thumbnail = noone;
sprite = raw.spriteId.path;
}
function GMRoom(_gm, _path, _info) constructor {
gmBinder = _gm;
path = $"{_gm.dir}/{_path}";
key = _path;
raw = _info;
type = _info.resourceType;
thumbnail = noone;
} }
function __Binder_Gamemaker(path) constructor {
self.path = path;
name = filename_name_only(path);
dir = filename_dir(path);
projectName = "";
resourcesRaw = [];
resourcesMap = {};
resources = [
{ name: "sprites", data : [], closed : false, },
{ name: "tileset", data : [], closed : false, },
{ name: "rooms", data : [], closed : false, },
];
static readYY = function(path) {
var _res = file_read_all(path);
var _resMap = json_try_parse(_res, -1);
if(_resMap == -1) return noone;
return _resMap;
}
static refreshResources = function() {
if(!file_exists(path)) return;
var _res = file_read_all(path);
var _resMap = json_try_parse(_res, -1);
if(_resMap == -1) return;
projectName = _resMap.name;
resourcesRaw = _resMap.resources;
resourcesMap = {};
var sprites = [];
var tileset = [];
var rooms = [];
for( var i = 0, n = array_length(resourcesRaw); i < n; i++ ) {
var _res = resourcesRaw[i].id;
var _name = _res.name;
var _path = _res.path;
var _info = readYY($"{dir}/{_path}");
if(_info == noone) continue;
var _asset = noone;
switch(_info.resourceType) {
case "GMSprite": _asset = new GMSprite(self, _path, _info); array_push(sprites, _asset); break;
case "GMTileSet": _asset = new GMTileset(self, _path, _info); array_push(tileset, _asset); break;
case "GMRoom": _asset = new GMRoom(self, _path, _info); array_push(rooms, _asset); break;
}
resourcesMap[$ _path] = _asset;
}
resources[0].data = sprites;
resources[1].data = tileset;
resources[2].data = rooms;
}
refreshResources();
}

View file

@ -89,9 +89,7 @@ function canvas_tool_node(canvas, node) : canvas_tool() constructor {
return noone; return noone;
} }
panel = panelAdd("Panel_Inspector", true, false); New_Inspect_Node_Panel(nodeObject);
panel.content.setInspecting(nodeObject, true, false);
panel.destroy_on_click_out = false;
return self; return self;
} }

View file

@ -58,9 +58,11 @@ function draw_sprite_bbox(spr, ind, _bbox) {
function draw_sprite_bbox_uniform(spr, ind, _bbox, _col = c_white, _alp = 1) { function draw_sprite_bbox_uniform(spr, ind, _bbox, _col = c_white, _alp = 1) {
INLINE INLINE
if(_bbox == noone) return; if(_bbox == noone) return;
var _minS = min(_bbox.w, _bbox.h); var _sw = sprite_get_width(spr);
var _sh = sprite_get_height(spr);
var _minS = min(_bbox.w / _sw, _bbox.h / _sh);
__draw_sprite_stretched_ext(spr, ind, _bbox.xc - _minS / 2, _bbox.yc - _minS / 2, _minS, _minS, _col, _alp); __draw_sprite_ext(spr, ind, _bbox.xc - _sw * _minS / 2, _bbox.yc - _sh * _minS / 2, _minS, _minS, 0, _col, _alp);
} }
function draw_sprite_uniform(spr, ind, _x, _y, scale, color = c_white, alpha = 1) { function draw_sprite_uniform(spr, ind, _x, _y, scale, color = c_white, alpha = 1) {

View file

@ -0,0 +1,52 @@
function gamemakerPathBox(project) : widget() constructor {
self.project = project;
static trigger = function() { }
static drawParam = function(params) {
setParam(params);
return draw(params.x, params.y, params.w, params.h, params.data, params.m);
}
static draw = function(_x, _y, _w, _h, _gmPath, _m) {
x = _x;
y = _y;
w = _w;
h = _h;
if(project.bind_gamemaker == noone) {
if(buttonInstant(THEME.button_def, _x, _y, _w, _h, _m, active, hover) == 2) {
var path = get_open_filename("GameMaker project|*.yyp", ""); key_release();
if(path == "") return noone;
project.attributes.bind_gamemaker_path = path;
project.bind_gamemaker = Binder_Gamemaker(project.attributes.bind_gamemaker_path);
if(project.bind_gamemaker == noone) project.attributes.bind_gamemaker_path = "";
else dialogPanelCall(new Panel_GM_Explore(project.bind_gamemaker));
}
draw_sprite_uniform(s_gamemaker, 0, _x + ui(16), _y + _h / 2, 1, COLORS._main_icon, 1);
draw_set_text(f_p2, fa_center, fa_center, COLORS._main_text);
draw_text_add(_x + _w / 2, _y + _h / 2, "Link .yyp");
} else {
var _gm = project.bind_gamemaker;
draw_sprite_stretched(THEME.textbox, 3, _x, _y, _w, _h);
if(buttonInstant(THEME.button_def, _x, _y, ui(32), _h, _m, active, hover, "Explore project", s_gamemaker, 0, COLORS._main_icon) == 2)
dialogPanelCall(new Panel_GM_Explore(_gm));
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
draw_text_add(_x + ui(40), _y + _h / 2, _gm.projectName);
if(buttonInstant(THEME.button_def, _x + _w - ui(32), _y, ui(32), _h, _m, active, hover, "Disconnect", THEME.cross_12, 0, [ COLORS._main_icon, COLORS._main_value_negative ]) == 2) {
project.attributes.bind_gamemaker_path = "";
project.bind_gamemaker = noone;
}
}
return h;
}
}

View file

@ -0,0 +1,13 @@
{
"$GMScript":"v1",
"%Name":"gamemakerPathBox",
"isCompatibility":false,
"isDnD":false,
"name":"gamemakerPathBox",
"parent":{
"name":"binder",
"path":"folders/main/binder.yy",
},
"resourceType":"GMScript",
"resourceVersion":"2.0",
}

View file

@ -42,7 +42,7 @@
LATEST_VERSION = 1_18_00_0; LATEST_VERSION = 1_18_00_0;
VERSION = 1_18_01_0; VERSION = 1_18_01_0;
SAVE_VERSION = 1_18_02_0; SAVE_VERSION = 1_18_02_0;
VERSION_STRING = MAC? "1.18.003m" : "1.18.3.007"; VERSION_STRING = MAC? "1.18.003m" : "1.18.3.008";
BUILD_NUMBER = 1_18_03_0; BUILD_NUMBER = 1_18_03_0;
HOTKEYS = ds_map_create(); HOTKEYS = ds_map_create();

View file

@ -220,10 +220,7 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
_icc = COLORS._main_icon_light; _icc = COLORS._main_icon_light;
_ica = 1; _ica = 1;
if(DOUBLE_CLICK) { if(DOUBLE_CLICK) New_Inspect_Node_Panel(_junc_canvas, false);
var pan = panelAdd("Panel_Inspector", true);
pan.content.setInspecting(_junc_canvas, true);
}
} }
draw_sprite_ui_uniform(THEME.icon_canvas, 0, _icx, _icy, 1, _icc, _ica); draw_sprite_ui_uniform(THEME.icon_canvas, 0, _icx, _icy, 1, _icc, _ica);

View file

@ -1452,7 +1452,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
if(icon) { if(icon) {
tx += _s * 6; tx += _s * 6;
draw_sprite_ui_uniform(icon, 0, round(tx), round(yy + nh / 2), _s, c_white, aa); draw_sprite_ui_uniform(icon, 0, round(tx) + 1, round(yy + nh / 2) + 1, _s, c_black, 1);
draw_sprite_ui_uniform(icon, 0, round(tx), round(yy + nh / 2), _s, c_white, 1);
tx += _s * 12; tx += _s * 12;
tw -= _s * (12 + 6); tw -= _s * (12 + 6);
} }

View file

@ -524,12 +524,16 @@ function __initNodes() {
addNodeObject(input, "SVG", s_node_svg, "Node_SVG", [1, Node_SVG],, "Load a SVG file."); addNodeObject(input, "SVG", s_node_svg, "Node_SVG", [1, Node_SVG],, "Load a SVG file.");
if(!DEMO) addNodeObject(input, "Export", s_node_export, "Node_Export", [0, Node_create_Export],, "Export image, image array to file, image sequence, animation."); if(!DEMO) addNodeObject(input, "Export", s_node_export, "Node_Export", [0, Node_create_Export],, "Export image, image array to file, image sequence, animation.");
ds_list_add(input, "Draw"); ds_list_add(input, "Canvas");
addNodeObject(input, "Canvas", s_node_canvas, "Node_Canvas", [1, Node_Canvas], ["draw"], "Draw on surface using brush, eraser, etc."); addNodeObject(input, "Canvas", s_node_canvas, "Node_Canvas", [1, Node_Canvas], ["draw"], "Draw on surface using brush, eraser, etc.");
addNodeObject(input, "Canvas Group", s_node_canvas_group, "Node_Canvas_Group", [1, Node_Canvas_Group],, "Create a group that combines multiple canvas nodes a layers.").setVersion(11740); addNodeObject(input, "Canvas Group", s_node_canvas_group, "Node_Canvas_Group", [1, Node_Canvas_Group],, "Create a group that combines multiple canvas nodes a layers.").setVersion(11740);
addNodeObject(input, "Active Canvas", s_node_active_canvas, "Node_Active_Canvas", [1, Node_Active_Canvas], ["draw"], "Draw using parameterized brush.").setVersion(11570); addNodeObject(input, "Active Canvas", s_node_active_canvas, "Node_Active_Canvas", [1, Node_Active_Canvas], ["draw"], "Draw using parameterized brush.").setVersion(11570);
ds_list_add(input, "Tileset");
addNodeObject(input, "Tileset", s_node_tileset, "Node_Tile_Tileset", [1, Node_Tile_Tileset],, "Create tileset object.").setVersion(1_18_03_0); addNodeObject(input, "Tileset", s_node_tileset, "Node_Tile_Tileset", [1, Node_Tile_Tileset],, "Create tileset object.").setVersion(1_18_03_0);
addNodeObject(input, "Tile Drawer", s_node_tileset_drawer, "Node_Tile_Drawer", [1, Node_Tile_Drawer],, "Draw using tileset.").setVersion(1_18_03_0); addNodeObject(input, "Tile Drawer", s_node_tileset_drawer, "Node_Tile_Drawer", [1, Node_Tile_Drawer],, "Draw using tileset.").setVersion(1_18_03_0);
addNodeObject(input, "Tile Rule", s_node_tileset_rule, "Node_Tile_Rule", [1, Node_Tile_Rule],, "Apply tileset rules.").setVersion(1_18_03_0);
addNodeObject(input, "Render Tilemap", s_node_tileset_render, "Node_Tile_Render", [1, Node_Tile_Render],, "Render tilemap to image.").setVersion(1_18_03_0);
addNodeObject(input, "Export Tilemap", s_node_tileset_export, "Node_Tile_Tilemap_Export", [1, Node_Tile_Tilemap_Export],, "Export tilemap to file.").setVersion(1_18_03_0); addNodeObject(input, "Export Tilemap", s_node_tileset_export, "Node_Tile_Tilemap_Export", [1, Node_Tile_Tilemap_Export],, "Export tilemap to file.").setVersion(1_18_03_0);
ds_list_add(input, "Files"); ds_list_add(input, "Files");
@ -767,6 +771,7 @@ function __initNodes() {
addNodeObject(generator, "Draw Cross Section", s_node_cross_section, "Node_Cross_Section", [1, Node_Cross_Section],, "Map the brightness of pixels on a linear axis into a surface.").setVersion(11710); addNodeObject(generator, "Draw Cross Section", s_node_cross_section, "Node_Cross_Section", [1, Node_Cross_Section],, "Map the brightness of pixels on a linear axis into a surface.").setVersion(11710);
addNodeObject(generator, "Interpret Number", s_node_interpret_number, "Node_Interpret_Number", [1, Node_Interpret_Number],, "Convert array of number into surface.").setVersion(11530); addNodeObject(generator, "Interpret Number", s_node_interpret_number, "Node_Interpret_Number", [1, Node_Interpret_Number],, "Convert array of number into surface.").setVersion(11530);
addNodeObject(generator, "Pixel Builder", s_node_pixel_builder, "Node_Pixel_Builder", [1, Node_Pixel_Builder],, "Will break, do not create. please. Why is it here??").setVersion(11540); addNodeObject(generator, "Pixel Builder", s_node_pixel_builder, "Node_Pixel_Builder", [1, Node_Pixel_Builder],, "Will break, do not create. please. Why is it here??").setVersion(11540);
addNodeObject(generator, "Tile Drawer", s_node_tileset_drawer, "Node_Tile_Drawer", [1, Node_Tile_Drawer]).setVersion(1_18_03_0);
ds_list_add(generator, "Noises"); ds_list_add(generator, "Noises");
addNodeObject(generator, "Noise", s_node_noise, "Node_Noise", [1, Node_Noise],, "Generate white noise."); addNodeObject(generator, "Noise", s_node_noise, "Node_Noise", [1, Node_Noise],, "Generate white noise.");

View file

@ -20,14 +20,13 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
input_display_list_animated = ["Animated tiles",true, 2, noone]; input_display_list_animated = ["Animated tiles",true, 2, noone];
input_display_list_rule = ["Rules", true, noone, noone]; input_display_list_rule = ["Rules", true, noone, noone];
newOutput(0, nodeValue_Output("Tile output", self, VALUE_TYPE.surface, noone)); newOutput(0, nodeValue_Output("Rendered", self, VALUE_TYPE.surface, noone));
newOutput(1, nodeValue_Output("Tile map", self, VALUE_TYPE.surface, noone)); newOutput(1, nodeValue_Output("Tilemap", self, VALUE_TYPE.surface, noone));
// newOutput(2, nodeValue_Output("Index array", self, VALUE_TYPE.integer, [])) newOutput(2, nodeValue_Output("Tileset", self, VALUE_TYPE.tileset, noone));
// .setArrayDepth(1);
output_display_list = [ 0, 1 ]; output_display_list = [ 2, 1, 0 ];
#region ++++ data ++++ #region ++++ data ++++
canvas_surface = surface_create_empty(1, 1, surface_rgba16float); canvas_surface = surface_create_empty(1, 1, surface_rgba16float);
@ -255,24 +254,25 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
static processData = function(_outData, _data, _output_index, _array_index) { static processData = function(_outData, _data, _output_index, _array_index) {
tileset = _data[0]; tileset = _data[0];
_outData[2] = tileset;
if(tileset == noone) { if(tileset == noone) {
input_display_list = [ 3, 1, 0 ]; input_display_list = [ 3, 1, 0 ];
return _outData; return _outData;
} }
input_display_list_tileset[3] = tileset.tile_selector_toggler; input_display_list_tileset[3] = tileset.tile_selector.b_toggle;
input_display_list_autoterrains[3] = tileset.autoterrain_selector_toggler; input_display_list_autoterrains[3] = tileset.autoterrain_selector.b_toggle;
input_display_list_palette[3] = tileset.palette_viewer_toggler; input_display_list_palette[3] = tileset.palette_viewer.b_toggle;
input_display_list_animated[3] = tileset.animated_viewer_toggler; input_display_list_animated[3] = tileset.animated_viewer.b_toggle;
input_display_list_rule[3] = tileset.rules_viewer_toggler; input_display_list_rule[3] = tileset.rules.b_toggle;
input_display_list = [ 3, 1, 0, input_display_list = [ 3, 1, 0,
input_display_list_tileset, tileset.tile_selector, input_display_list_tileset, tileset.tile_selector,
input_display_list_autoterrains, tileset.autoterrain_selector, input_display_list_autoterrains, tileset.autoterrain_selector,
input_display_list_palette, tileset.palette_viewer, input_display_list_palette, tileset.palette_viewer,
input_display_list_animated, tileset.animated_viewer, input_display_list_animated, tileset.animated_viewer,
input_display_list_rule, tileset.rules_viewer, input_display_list_rule, tileset.rules,
] ]
var _tileSet = tileset.texture; var _tileSet = tileset.texture;
@ -302,51 +302,16 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
var _tileOut = surface_verify(_outData[0], _outDim[0], _outDim[1]); var _tileOut = surface_verify(_outData[0], _outDim[0], _outDim[1]);
var _tileMap = surface_verify(_outData[1], _mapSize[0], _mapSize[1], surface_rgba16float); var _tileMap = surface_verify(_outData[1], _mapSize[0], _mapSize[1], surface_rgba16float);
// var _arrIndx = array_verify( _outData[2], _mapSize[0] * _mapSize[1]);
canvas_buffer = buffer_verify(canvas_buffer, _mapSize[0] * _mapSize[1] * 8); canvas_buffer = buffer_verify(canvas_buffer, _mapSize[0] * _mapSize[1] * 8);
buffer_get_surface(canvas_buffer, canvas_surface, 0); buffer_get_surface(canvas_buffer, canvas_surface, 0);
#region rules var _applied = tileset.rules.apply(canvas_surface, _seed);
surface_set_shader(temp_surface[1], sh_sample, true, BLEND.over);
draw_surface(canvas_surface, 0, 0);
surface_reset_shader();
var bg = 0;
for( var i = 0, n = array_length(tileset.ruleTiles); i < n; i++ ) {
var _rule = tileset.ruleTiles[i];
if(!_rule.active) continue;
if(array_empty(_rule.replacements)) continue;
surface_set_shader(temp_surface[2], sh_tile_rule_select, true, BLEND.over);
shader_set_2("dimension", _mapSize);
_rule.shader_select(tileset);
draw_surface(canvas_surface, 0, 0);
surface_reset_shader();
surface_set_shader(temp_surface[bg], sh_tile_rule_apply, true, BLEND.over);
shader_set_2("dimension", _mapSize);
shader_set_f("seed", _seed);
shader_set_surface("group", temp_surface[2]);
_rule.shader_submit(tileset);
draw_surface(temp_surface[!bg], 0, 0);
surface_reset_shader();
bg = !bg;
}
#endregion
surface_set_shader(_tileMap, sh_sample, true, BLEND.over); surface_set_shader(_tileMap, sh_sample, true, BLEND.over);
draw_surface(temp_surface[!bg], 0, 0); draw_surface(_applied, 0, 0);
surface_reset_shader(); surface_reset_shader();
var _tileSetDim = surface_get_dimension(_tileSet);
surface_set_shader(_tileOut, sh_draw_tile_map, true, BLEND.over); surface_set_shader(_tileOut, sh_draw_tile_map, true, BLEND.over);
shader_set_2("dimension", _outDim); shader_set_2("dimension", _outDim);
@ -359,16 +324,9 @@ function Node_Tile_Drawer(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
draw_empty(); draw_empty();
surface_reset_shader(); surface_reset_shader();
return [ _tileOut, _tileMap ]; return [ _tileOut, _tileMap, tileset ];
} }
// static getPreviewValues = function() {
// return getSingleValue(0, preview_index, true);
// return preview_drawing_tile;
// }
// static getGraphPreviewSurface = function() { return getSingleValue(0, preview_index, true); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
static attributeSerialize = function() { static attributeSerialize = function() {

View file

@ -0,0 +1,51 @@
function Node_Tile_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Render Tilemap";
newInput( 0, nodeValue_Tileset("Tileset", self, noone))
.setVisible(true, true);
newInput( 1, nodeValue_Surface("Tilemap", self, noone));
newInput( 2, nodeValue_Bool("Animated", self, false));
newOutput(0, nodeValue_Output("Rendered", self, VALUE_TYPE.surface, noone));
input_display_list = [
["Tile data", false], 0, 1, 2,
];
output_display_list = [ 0 ];
static update = function(frame = CURRENT_FRAME) {
var tileset = inputs[0].getValue();
var tilemap = inputs[1].getValue();
if(tileset == noone) return;
if(!is_surface(tilemap)) return;
var _tileSiz = tileset.tileSize;
var _mapSize = surface_get_dimension(tilemap);
var _outDim = [ _tileSiz[0] * _mapSize[0], _tileSiz[1] * _mapSize[1] ];
var _tileOut = surface_verify(outputs[0].getValue(), _outDim[0], _outDim[1]);
var _tileMap = surface_verify(outputs[1].getValue(), _mapSize[0], _mapSize[1], surface_rgba16float);
surface_set_shader(_tileMap, sh_sample, true, BLEND.over);
draw_surface(_applied, 0, 0);
surface_reset_shader();
surface_set_shader(_tileOut, sh_draw_tile_map, true, BLEND.over);
shader_set_2("dimension", _outDim);
shader_set_surface("indexTexture", _tileMap);
shader_set_2("indexTextureDim", surface_get_dimension(_tileMap));
shader_set_f("frame", CURRENT_FRAME);
tileset.shader_submit();
draw_empty();
surface_reset_shader();
outputs[0].setValue(_tileOut);
}
}

View file

@ -0,0 +1,13 @@
{
"$GMScript":"v1",
"%Name":"node_tiler_render",
"isCompatibility":false,
"isDnD":false,
"name":"node_tiler_render",
"parent":{
"name":"tiler",
"path":"folders/nodes/data/tiler.yy",
},
"resourceType":"GMScript",
"resourceVersion":"2.0",
}

View file

@ -0,0 +1,82 @@
function Node_Tile_Rule(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Tileset Rule";
newInput( 0, nodeValue_Tileset("Tileset", self, noone))
.setVisible(true, true);
newInput( 1, nodeValue_Surface("Tilemap", self, noone));
newInput( 2, nodeValueSeed(self, VALUE_TYPE.float));
newInput( 3, nodeValue_Bool("Animated", self, false));
newOutput(0, nodeValue_Output("Rendered", self, VALUE_TYPE.surface, noone));
newOutput(1, nodeValue_Output("Tilemap", self, VALUE_TYPE.surface, noone));
newOutput(2, nodeValue_Output("Tileset", self, VALUE_TYPE.tileset, noone));
rules = new Tileset_Rule(noone);
input_display_list = [ 2,
["Tile data", false], 0, 1, 3,
["Rules", false, noone, rules.b_toggle ], rules,
];
output_display_list = [ 2, 1, 0 ];
static update = function(frame = CURRENT_FRAME) {
var tileset = inputs[0].getValue();
var tilemap = inputs[1].getValue();
var _seed = inputs[2].getValue();
outputs[2].setValue(tileset);
if(tileset == noone) return;
rules.setTileset(tileset);
if(!is_surface(tilemap)) return;
var _tileSiz = tileset.tileSize;
var _mapSize = surface_get_dimension(tilemap);
var _outDim = [ _tileSiz[0] * _mapSize[0], _tileSiz[1] * _mapSize[1] ];
var _tileOut = surface_verify(outputs[0].getValue(), _outDim[0], _outDim[1]);
var _tileMap = surface_verify(outputs[1].getValue(), _mapSize[0], _mapSize[1], surface_rgba16float);
var _applied = rules.apply(tilemap, _seed);
surface_set_shader(_tileMap, sh_sample, true, BLEND.over);
draw_surface(_applied, 0, 0);
surface_reset_shader();
surface_set_shader(_tileOut, sh_draw_tile_map, true, BLEND.over);
shader_set_2("dimension", _outDim);
shader_set_surface("indexTexture", _tileMap);
shader_set_2("indexTextureDim", surface_get_dimension(_tileMap));
shader_set_f("frame", CURRENT_FRAME);
tileset.shader_submit();
draw_empty();
surface_reset_shader();
outputs[0].setValue(_tileOut);
outputs[1].setValue(_tileMap);
}
static attributeSerialize = function() {
var _attr = {
ruleTiles: rules.ruleTiles,
};
return _attr;
}
static attributeDeserialize = function(attr) {
var _rule = struct_try_get(attr, "ruleTiles", []);
for( var i = 0, n = array_length(_rule); i < n; i++ )
rules.ruleTiles[i] = new tiler_rule().deserialize(_rule[i]);
}
}

View file

@ -0,0 +1,13 @@
{
"$GMScript":"v1",
"%Name":"node_tiler_rule",
"isCompatibility":false,
"isDnD":false,
"name":"node_tiler_rule",
"parent":{
"name":"tiler",
"path":"folders/nodes/data/tiler.yy",
},
"resourceType":"GMScript",
"resourceVersion":"2.0",
}

View file

@ -1,6 +1,5 @@
function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Tileset"; name = "Tileset";
min_h = 128;
bypass_grid = true; bypass_grid = true;
renaming = noone; renaming = noone;
@ -73,8 +72,8 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr
brush = new tiler_brush(self); brush = new tiler_brush(self);
tile_selector = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus, _panel = noone) { tile_selector = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus, _panel = noone) {
var _tileSet = getInputData(0); var _tileSet = texture;
var _tileSiz = getInputData(1); var _tileSiz = tileSize;
var _pd = ui(4); var _pd = ui(4);
var _yy = _y; var _yy = _y;
@ -448,6 +447,8 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr
return _h; return _h;
}); });
tile_selector.setName("Tileset");
#endregion #endregion
#region ++++ auto terrain ++++ #region ++++ auto terrain ++++
@ -458,8 +459,8 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr
var _yy = _y; var _yy = _y;
var _h = 0; var _h = 0;
var _tileSet = getInputData(0); var _tileSet = texture;
var _tileSiz = getInputData(1); var _tileSiz = tileSize;
if(!is_surface(_tileSet)) return _h; if(!is_surface(_tileSet)) return _h;
var _tdim = surface_get_dimension(_tileSet); var _tdim = surface_get_dimension(_tileSet);
@ -730,6 +731,8 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr
autoterrain_selector_h = max(ui(12), _ah); autoterrain_selector_h = max(ui(12), _ah);
return _h + _ah; return _h + _ah;
}); });
autoterrain_selector.setName("Autoterrain");
#endregion #endregion
#region ++++ brush palette ++++ #region ++++ brush palette ++++
@ -768,8 +771,8 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr
var _h = 0; var _h = 0;
var _pd = ui(4); var _pd = ui(4);
var _tileSet = getInputData(0); var _tileSet = texture;
var _tileSiz = getInputData(1); var _tileSiz = tileSize;
var bx = _x; var bx = _x;
var by = _yy; var by = _yy;
@ -1132,6 +1135,8 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr
return _h; return _h;
}); });
palette_viewer.setName("Tile Palette");
#endregion #endregion
#region ++++ animated tiles ++++ #region ++++ animated tiles ++++
@ -1160,8 +1165,8 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr
var _yy = _y; var _yy = _y;
var _h = 0; var _h = 0;
var _tileSet = getInputData(0); var _tileSet = texture;
var _tileSiz = getInputData(1); var _tileSiz = tileSize;
if(!is_surface(_tileSet)) return _h; if(!is_surface(_tileSet)) return _h;
var _tdim = surface_get_dimension(_tileSet); var _tdim = surface_get_dimension(_tileSet);
@ -1390,330 +1395,21 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr
animated_selector_h = max(ui(12), _ah); animated_selector_h = max(ui(12), _ah);
return _h + _ah; return _h + _ah;
}); });
animated_viewer.setName("Animated Tile");
#endregion #endregion
#region ++++ rules ++++ gmTile = noone;
ruleTiles = [];
rule_selector_h = 0;
rule_dragging = noone;
rules_viewer = new Inspector_Custom_Renderer(function(_x, _y, _w, _m, _hover, _focus, _panel = noone) {
var _yy = _y;
var _h = 0;
var _tileSet = getInputData(0);
var _tileSiz = getInputData(1);
if(!is_surface(_tileSet)) return _h;
var _tdim = surface_get_dimension(_tileSet);
var _tileAmo = [ floor(_tdim[0] / _tileSiz[0]), floor(_tdim[1] / _tileSiz[1]) ];
var bx = _x;
var by = _yy;
var bs = ui(24);
if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover, "New rule", THEME.add_16, 0, COLORS._main_value_positive) == 2) {
var _new_rl = new tiler_rule();
_new_rl.name = $"rule {array_length(ruleTiles)}"
_new_rl.open = true;
array_push(ruleTiles, _new_rl);
triggerRender();
}
_h += bs + ui(4);
_yy += bs + ui(4);
var _pd = ui(4);
var _ah = _pd * 2;
var del = -1;
var rl_iHover = 0;
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _yy, _w, rule_selector_h, COLORS.node_composite_bg_blend, 1);
_yy += _pd;
for( var i = 0, n = array_length(ruleTiles); i < n; i++ ) {
var _hg = ui(32);
var _rl = ruleTiles[i];
var _pw = ui(24);
var _ph = ui(24);
var _px = _x + ui(8);
var _py = _yy + ui(4);
if(_m[1] > _yy) rl_iHover = i;
var _prin = array_safe_get(_rl.replacements, 0, undefined);
if(_prin == undefined)
draw_sprite_stretched_ext(THEME.ui_panel, 1, _px, _py, _pw, _ph, COLORS._main_icon);
else if(is(_prin, tiler_rule_replacement)) {
var _ind = array_safe_get(_prin.index, 0);
drawTile(_tileSet, _tileAmo, _tileSiz, _ind, _px, _py, _pw, _ph);
}
var _tx = _px + _pw + ui(8);
var _hov = _hover && point_in_rectangle(_m[0], _m[1], _x, _yy, _x + _w, _yy + _hg - 1);
if(renaming == _rl) {
tb_rename.setFocusHover(_focus, _hover);
tb_rename.draw(_tx, _yy, _w - _pw - ui(8), _hg, rename_text, _m);
} else {
var _cc = _hov? COLORS._main_text : COLORS._main_text_sub;
if(rule_dragging == _rl) _cc = COLORS._main_accent;
draw_set_text(f_p2, fa_left, fa_center, _cc);
draw_text_add(_tx, _yy + _hg / 2, _rl.name);
var bs = ui(24);
var bx = _w - bs - ui(4);
var by = _yy + _hg / 2 - bs / 2;
if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _focus, _hover, "", THEME.minus_16, 0, _hov? COLORS._main_value_negative : COLORS._main_icon) == 2)
del = i;
}
if(_hov && _m[0] < _x + _w - ui(32 + 160)) {
if(_m[0] > _tx) {
if(mouse_press(mb_left, _focus)) {
rule_dragging = _rl;
} else if(DOUBLE_CLICK && _focus) {
renaming = _rl;
rename_text = _rl.name;
tb_rename._current_text = _rl.name;
tb_rename.activate();
}
} else {
draw_sprite_stretched_ext(THEME.ui_panel, 1, _px, _py, _pw, _ph, COLORS._main_accent);
if(mouse_press(mb_left, _focus))
_rl.open = !_rl.open;
}
}
var _atWid = _rl.sl_prop;
var _scw = ui(120);
var _sch = ui(20);
var _scx = _x + _w - _scw - ui(32 + 8);
var _scy = _yy + _hg / 2 - _sch / 2;
_atWid.setFocusHover(_focus, _hover);
_atWid.rx = rules_viewer.rx; _atWid.ry = rules_viewer.ry;
_atWid.draw(_scx, _scy, _scw, _sch, _rl.probability, _m);
if(_rl.probability != _rl._probability) {
_rl._probability = _rl.probability;
triggerRender();
}
var _acw = ui(20);
var _ach = ui(20);
var _acx = _scx - _acw - ui(8);
var _acy = _yy + _hg / 2 - _sch / 2;
var _ahv = _hover && point_in_rectangle(_m[0], _m[1], _acx, _acy, _acx + _acw, _acy + _ach);
if(_ahv) {
TOOLTIP = "Active";
if(mouse_press(mb_left, _focus)) {
_rl.active = !_rl.active;
triggerRender();
}
}
draw_sprite_stretched_ext(THEME.checkbox_def, _ahv, _acx, _acy, _acw, _ach, c_white);
if(_rl.active) draw_sprite_stretched_ext(THEME.checkbox_def, 2, _acx, _acy, _acw, _ach, COLORS._main_accent);
_yy += _hg;
_ah += _hg;
if(_rl.open) {
_yy += ui(4);
_ah += ui(4);
var _sls = ui(28);
var _radw = _rl.size[0] + _rl.range * 2;
var _radh = _rl.size[1] + _rl.range * 2;
var _slw = ui(16) + _radw * _sls;
var _slh = ui(16) + _radh * _sls;
var _hh0 = _slh;
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x + ui(8), _yy, _slw, _slh, COLORS.node_composite_bg_blend, 1);
for( var j = 0, m = array_length(_rl.selection_rules); j < m; j++ ) {
var _rl_sel = _rl.selection_rules[j];
var _rl_col = j % _radw;
var _rl_row = floor(j / _radw);
var _cen = _rl_col >= _rl.range && _rl_col < _rl.range + _rl.size[0] &&
_rl_row >= _rl.range && _rl_row < _rl.range + _rl.size[1];
var _rl_x = _x + ui(16) + _rl_col * _sls;
var _rl_y = _yy + ui( 8) + _rl_row * _sls;
var _rl_selected = object_selecting == _rl && object_select_id == j;
var _rl_hov = _hover && point_in_rectangle(_m[0], _m[1], _rl_x, _rl_y, _rl_x + _sls - 1, _rl_y + _sls - 1);
var _pad = ui(2);
var _cc = _rl_selected? COLORS._main_accent : COLORS._main_icon;
var _aa = _rl_selected? 1 : .5 + _rl_hov * .5;
if(is_array(_rl_sel)) {
var _autt = autoterrain[_rl_sel[1]];
drawTile(_tileSet, _tileAmo, _tileSiz, _autt.index[0], _rl_x + ui(2), _rl_y + ui(2), _sls - ui(4), _sls - ui(4));
draw_sprite_uniform(THEME.circle, 0, _rl_x + _sls - ui(8), _rl_y + _sls - ui(8), 1, COLORS._main_accent);
} else if (_rl_sel == -10000) {
draw_sprite_uniform(THEME.cross, 0, _rl_x + _sls / 2, _rl_y + _sls / 2, 1, _cc, _aa);
} else if(_rl_sel != -1) {
drawTile(_tileSet, _tileAmo, _tileSiz, _rl_sel, _rl_x + ui(2), _rl_y + ui(2), _sls - ui(4), _sls - ui(4));
} else if(!_cen) _pad = ui(10);
draw_sprite_stretched_ext(THEME.ui_panel, 1 + _cen, _rl_x + _pad, _rl_y + _pad, _sls - _pad * 2, _sls - _pad * 2, _cc, _aa);
if(_rl_hov) {
if(mouse_press(mb_left, _focus)) {
object_selecting = _rl_selected? noone : _rl;
object_select_id = j;
triggerRender();
}
if(mouse_press(mb_right, _focus)) {
_rl.selection_rules[j] = -1;
object_selecting = noone;
object_select_id = noone;
triggerRender();
}
}
}
draw_sprite_uniform(THEME.arrow, 0, _x + ui(8) + _slw + ui(8), _yy + _slh / 2, 1, COLORS._main_icon, 1);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var _rep = _rl.replacements;
var _siz = _rl.size;
var _rpw = _sls * _siz[0];
var _rph = _sls * _siz[1];
var _dx = ui(8) + _slw + ui(16);
var _rx = _x + _dx;
var _slw = _w - _dx - ui(8);
var _col = max(1, floor((_slw - ui(16)) / _rpw));
var _row = ceil((array_length(_rep) + 1) / _col);
var _slh = ui(16) + _row * _rph;
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _rx, _yy, _slw, max(_hh0, _slh), COLORS.node_composite_bg_blend, 1);
var del_rep = -1;
for( var j = 0, m = array_length(_rep) + 1; j < m; j++ ) {
var _rcl = j % _col;
var _rrw = floor(j / _col);
var _rpx = _rx + ui(8) + _rcl * _rpw;
var _rpy = _yy + ui(8) + _rrw * _rph;
var _rl_hov = _hover && point_in_rectangle(_m[0], _m[1], _rpx, _rpy, _rpx + _rpw, _rpy + _rph);
if(j == 0) {
var _cc = _rl_hov? COLORS._main_value_positive : COLORS._main_icon;
draw_sprite_uniform(THEME.add_16, 0, _rpx + _rpw / 2, _rpy + _rph / 2, 1, _cc);
if(_rl_hov && mouse_press(mb_left, _focus)) {
var _new_rep = new tiler_rule_replacement([-1]);
array_push(_rl.replacements, _new_rep);
object_selecting = _new_rep;
object_select_id = _rl;
}
continue;
}
var _replace = _rep[j - 1];
var _repIndex = _replace.index;
if(!is_array(_repIndex)) continue;
for( var k = 0, q = array_length(_repIndex); k < q; k++ ) {
var _repBlockCol = k % _siz[0];
var _repBlockRow = floor(k / _siz[0]);
var _rpbx = _rpx + _repBlockCol * _sls;
var _rpby = _rpy + _repBlockRow * _sls;
if(_replace.index[k] != -1) drawTile(_tileSet, _tileAmo, _tileSiz, _replace.index[k], _rpbx + ui(2), _rpby + ui(2), _sls - ui(4), _sls - ui(4));
}
var _rl_selected = object_selecting == _replace;
var _cc = _rl_selected? COLORS._main_accent : COLORS._main_icon;
var _aa = _rl_selected? 1 : .5 + _rl_hov * .5;
draw_sprite_stretched_ext(THEME.ui_panel, 1, _rpx + ui(2), _rpy + ui(2), _rpw - ui(4), _rph - ui(4), _cc, _aa);
if(_rl_hov) {
if(mouse_press(mb_left, _focus)) {
object_selecting = object_selecting == _replace? noone : _replace;
object_select_id = _rl;
triggerRender();
}
if(mouse_press(mb_right, _focus)) {
del_rep = j;
triggerRender();
}
}
}
if(del_rep != -1) {
array_delete(_rep, del_rep, 1);
triggerRender();
}
_yy += max(_hh0, _slh) + ui(8);
_ah += max(_hh0, _slh) + ui(8);
}
}
if(rule_dragging != noone) {
array_remove(ruleTiles, rule_dragging);
array_insert(ruleTiles, rl_iHover, rule_dragging);
if(mouse_release(mb_left)) {
rule_dragging = noone;
triggerRender();
}
}
if(del != -1) {
array_delete(ruleTiles, del, 1);
triggerRender();
}
rule_selector_h = max(ui(12), _ah);
return _h + _ah;
});
#endregion
texture = noone; texture = noone;
tileSize = [ 1, 1 ]; tileSize = [ 1, 1 ];
rules = new Tileset_Rule(self);
tile_selector_toggler = button(function() /*=>*/ { tile_selector.togglePopup("Tileset"); }).setIcon(THEME.node_goto, 0, COLORS._main_icon, .75);
autoterrain_selector_toggler = button(function() /*=>*/ { autoterrain_selector.togglePopup("Autoterrain"); }).setIcon(THEME.node_goto, 0, COLORS._main_icon, .75);
palette_viewer_toggler = button(function() /*=>*/ { palette_viewer.togglePopup("Tile Palette"); }).setIcon(THEME.node_goto, 0, COLORS._main_icon, .75);
animated_viewer_toggler = button(function() /*=>*/ { animated_viewer.togglePopup("Animated Tile"); }).setIcon(THEME.node_goto, 0, COLORS._main_icon, .75);
rules_viewer_toggler = button(function() /*=>*/ { rules_viewer.togglePopup("Tile Riles"); }).setIcon(THEME.node_goto, 0, COLORS._main_icon, .75);
input_display_list = [ 1, 0, input_display_list = [ 1, 0,
["Tileset", false, noone, tile_selector_toggler ], tile_selector, ["Tileset", false, noone, tile_selector.b_toggle ], tile_selector,
["Autoterrains", true, noone, autoterrain_selector_toggler ], autoterrain_selector, ["Autoterrains", true, noone, autoterrain_selector.b_toggle ], autoterrain_selector,
["Palette", true, noone, palette_viewer_toggler ], palette_viewer, ["Palette", true, noone, palette_viewer.b_toggle ], palette_viewer,
["Animated tiles",true, 2, animated_viewer_toggler ], animated_viewer, ["Animated tiles",true, noone, animated_viewer.b_toggle ], animated_viewer,
["Rules", true, noone, rules_viewer_toggler ], rules_viewer, ["Rules", true, noone, rules.b_toggle ], rules,
]; ];
static shader_submit = function() { static shader_submit = function() {
@ -1727,17 +1423,29 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr
shader_set_f("animatedTilesLength", aTilesLength); shader_set_f("animatedTilesLength", aTilesLength);
} }
static step = function() {
tile_selector_toggler.icon_blend = tile_selector.popupPanel == noone? COLORS._main_icon : COLORS._main_accent;
autoterrain_selector_toggler.icon_blend = autoterrain_selector.popupPanel == noone? COLORS._main_icon : COLORS._main_accent;
palette_viewer_toggler.icon_blend = palette_viewer.popupPanel == noone? COLORS._main_icon : COLORS._main_accent;
animated_viewer_toggler.icon_blend = animated_viewer.popupPanel == noone? COLORS._main_icon : COLORS._main_accent;
rules_viewer_toggler.icon_blend = rules_viewer.popupPanel == noone? COLORS._main_icon : COLORS._main_accent;
}
static update = function(frame = CURRENT_FRAME) { static update = function(frame = CURRENT_FRAME) {
texture = inputs[0].getValue(); texture = inputs[0].getValue();
tileSize = inputs[1].getValue(); tileSize = inputs[1].getValue();
if(gmTile != noone) {
var _spm = struct_try_get(gmTile.gmBinder.resourcesMap, gmTile.sprite, noone);
var _spr = _spm == noone? noone : _spm.thumbnail;
if(_spr) {
var _sw = sprite_get_width(_spr);
var _sh = sprite_get_height(_spr);
texture = surface_verify(texture, _sw, _sh);
surface_set_target(texture);
DRAW_CLEAR
BLEND_OVERRIDE
draw_sprite(_spr, 0, 0, 0);
BLEND_NORMAL
surface_reset_target();
}
tileSize = [ gmTile.raw.tileWidth, gmTile.raw.tileHeight ];
}
outputs[0].setValue(self); outputs[0].setValue(self);
} }
@ -1749,8 +1457,9 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr
var _attr = { var _attr = {
autoterrain, autoterrain,
animatedTiles, animatedTiles,
ruleTiles, ruleTiles: rules.ruleTiles,
palette: surface_encode(brush_palette), palette: surface_encode(brush_palette),
gm_key: gmTile == noone? noone : gmTile.key,
}; };
return _attr; return _attr;
@ -1773,7 +1482,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr
} }
for( var i = 0, n = array_length(_rule); i < n; i++ ) for( var i = 0, n = array_length(_rule); i < n; i++ )
ruleTiles[i] = new tiler_rule().deserialize(_rule[i]); rules.ruleTiles[i] = new tiler_rule().deserialize(_rule[i]);
if(_palt != noone) { if(_palt != noone) {
surface_free_safe(brush_palette); surface_free_safe(brush_palette);
@ -1784,6 +1493,13 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr
brush_palette_buffer = buffer_from_surface(brush_palette, false, buffer_grow); brush_palette_buffer = buffer_from_surface(brush_palette, false, buffer_grow);
} }
if(struct_has(attr, "gm_key")) {
var _key = attr.gm_key;
var _gm = project.bind_gamemaker;
if(_gm != noone) gmTile = struct_try_get(_gm.resourcesMap, _ey, noone);
}
refreshAnimatedData(); refreshAnimatedData();
} }

View file

@ -1368,7 +1368,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
static isTimelineVisible = function() { INLINE return is_anim && value_from == noone; } static isTimelineVisible = function() { INLINE return is_anim && value_from == noone; }
show_val = []; show_val = [];
static showValue = function() { ////showValue static __showValue = function() {
INLINE INLINE
var val = 0; var val = 0;
@ -1387,6 +1387,10 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
return val; return val;
} }
static showValue = function() { ////showValue
return __showValue();
}
static unitConvert = function(mode) { static unitConvert = function(mode) {
var _v = animator.values; var _v = animator.values;

View file

@ -53,7 +53,8 @@ function __NodeValue_Dimension(_node, value) : NodeValue("Dimension", _node, CON
} }
static __getAnimValue = function(_time = CURRENT_FRAME) { static __getAnimValue = function(_time = CURRENT_FRAME) {
if(node.attributes.use_project_dimension) return PROJECT.attributes.surface_dimension; if(node.attributes.use_project_dimension)
return PROJECT.attributes.surface_dimension;
if(!is_anim) { if(!is_anim) {
if(sep_axis) return array_create_ext(2, function(i) /*=>*/ {return animators[i].processType(animators[i].values[0].value)}); if(sep_axis) return array_create_ext(2, function(i) /*=>*/ {return animators[i].processType(animators[i].values[0].value)});
@ -67,4 +68,12 @@ function __NodeValue_Dimension(_node, value) : NodeValue("Dimension", _node, CON
return animator.getValue(_time); return animator.getValue(_time);
} }
static showValue = function() { ////showValue
if(node.attributes.use_project_dimension)
return PROJECT.attributes.surface_dimension;
return __showValue();
}
} }

View file

@ -7,10 +7,10 @@ function Panel_Addon() : PanelContent() constructor {
w = ui(400); w = ui(400);
h = ui(480); h = ui(480);
search_string = ""; search_string = "";
keyboard_lastchar = ""; keyboard_lastchar = "";
KEYBOARD_STRING = ""; KEYBOARD_STRING = "";
keyboard_lastkey = -1; keyboard_lastkey = -1;
search_res = []; search_res = [];
tb_search = new textBox(TEXTBOX_INPUT.text, function(str) { tb_search = new textBox(TEXTBOX_INPUT.text, function(str) {

View file

@ -0,0 +1,141 @@
function Panel_GM_Explore(gmBinder) : PanelContent() constructor {
self.gmBinder = gmBinder;
title = gmBinder.projectName;
auto_pin = true;
padding = 8;
w = ui(400);
h = ui(480);
grid_size = ui(64);
grid_size_to = grid_size;
search_string = "";
keyboard_lastchar = "";
KEYBOARD_STRING = "";
keyboard_lastkey = -1;
search_res = [];
tb_search = new textBox(TEXTBOX_INPUT.text, function(str) {
search_string = string(str);
searchResource();
});
tb_search.align = fa_left;
tb_search.auto_update = true;
tb_search.boxColor = COLORS._main_icon_light;
WIDGET_CURRENT = tb_search;
function searchResource() {
search_res = [];
}
function onResize() {
sc_content.resize(w - ui(padding + padding), h - ui(padding + padding + 40));
}
sc_content = new scrollPane(w - ui(padding + padding), h - ui(padding + padding + 40), function(_y, _m) {
draw_clear_alpha(COLORS.panel_bg_clear_inner, 1);
var _res = gmBinder.resources;
var _ww = sc_content.surface_w;
var _yy = _y;
var _hh = 0;
var lbh = ui(26);
var _hover = sc_content.hover;
var _focus = sc_content.active;
var _ths = grid_size;
var _pad = ui(8);
var _lnh = line_get_height(f_p3, 8);
var _col = floor((_ww - _pad) / (_ths + _pad));
for( var i = 0, n = array_length(_res); i < n; i++ ) {
var _name = _res[i].name;
if(_hover && point_in_rectangle(_m[0], _m[1], 0, _yy, _ww, _yy + lbh)) {
draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, 0, _yy, _ww, lbh, COLORS.panel_inspector_group_hover, 1);
if(mouse_press(mb_left, _focus)) _res[i].closed = !_res[i].closed;
} else
draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, 0, _yy, _ww, lbh, COLORS.panel_inspector_group_bg, 1);
draw_sprite_ui(THEME.arrow, _res[i].closed? 0 : 3, ui(16), _yy + lbh / 2, 1, 1, 0, COLORS.panel_inspector_group_bg, 1);
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text_inner);
draw_text_add(ui(32), _yy + lbh / 2, _name);
_yy += lbh + ui(6);
_hh += lbh + ui(6);
if(_res[i].closed) continue;
var _data = _res[i].data;
var _xx = _pad;
for( var j = 0, m = array_length(_data); j < m; j++ ) {
var _cc = j % _col;
var _rr = floor(j / _col);
var _asx = _xx + _cc * (_ths + _pad);
var _asy = _yy + _rr * (_ths + _pad + _lnh);
var _ass = _data[j];
var _raw = _ass.raw;
var _thm = noone;
if(_ass.type == "GMSprite") _thm = _ass.thumbnail;
else if(_ass.type == "GMTileSet") {
var _spm = struct_try_get(gmBinder.resourcesMap, _ass.sprite, noone);
_thm = _spm == noone? noone : _spm.thumbnail;
}
if(sprite_exists(_thm)) draw_sprite_bbox_uniform(_thm, 0, BBOX().fromWH(_asx + ui(2), _asy + ui(2), _ths - ui(4), _ths - ui(4)));
draw_set_text(f_p3, fa_center, fa_top, COLORS._main_text);
draw_text_add(_asx + _ths / 2, _asy + _ths + ui(4), _raw.name);
if(_hover && point_in_rectangle(_m[0], _m[1], _asx, _asy, _asx + _ths, _asy + _ths)) {
draw_sprite_stretched_ext(THEME.ui_panel, 1, _asx, _asy, _ths, _ths, COLORS._main_icon);
if(mouse_press(mb_left, _focus)) {
DRAGGING = { type : _ass.type, data : _ass };
}
}
}
var _rrow = ceil(array_length(_data) / _col);
_yy += (_ths + _pad + _lnh) * _rrow + ui(6);
_hh += (_ths + _pad + _lnh) * _rrow + ui(6);
}
if(pHOVER && key_mod_press(CTRL) && point_in_rectangle(_m[0], _m[1], 0, 0, sc_content.surface_w, sc_content.surface_h)) {
if(mouse_wheel_down()) grid_size_to = clamp(grid_size_to - ui(4), ui(32), ui(160));
if(mouse_wheel_up()) grid_size_to = clamp(grid_size_to + ui(4), ui(32), ui(160));
}
grid_size = lerp_float(grid_size, grid_size_to, 5);
return _hh;
});
function drawContent(panel) {
draw_clear_alpha(COLORS.panel_bg_clear, 0);
var px = ui(padding);
var py = ui(padding);
var pw = w - ui(padding + padding);
var ph = h - ui(padding + padding);
draw_sprite_stretched(THEME.ui_panel_bg, 1, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
tb_search.draw(px, py, pw, ui(32), search_string, [mx, my]);
if(search_string == "") tb_search.sprite_index = 1;
sc_content.setFocusHover(pFOCUS, pHOVER);
sc_content.draw(px, py + ui(40), mx - px, my - (py + ui(40)));
}
}

View file

@ -0,0 +1,13 @@
{
"$GMScript":"v1",
"%Name":"panel_gm_explorer",
"isCompatibility":false,
"isDnD":false,
"name":"panel_gm_explorer",
"parent":{
"name":"_others",
"path":"folders/panels/_others.yy",
},
"resourceType":"GMScript",
"resourceVersion":"2.0",
}

View file

@ -3260,6 +3260,15 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
node = DRAGGING.data.build(mouse_grid_x, mouse_grid_y, getCurrentContext()); node = DRAGGING.data.build(mouse_grid_x, mouse_grid_y, getCurrentContext());
nodes_selecting = [ node ]; nodes_selecting = [ node ];
break; break;
case "GMSprite" :
node = Node_create_Image_path(mouse_grid_x, mouse_grid_y, DRAGGING.data.thumbnailPath);
break;
case "GMTileSet" :
node = nodeBuild("Node_Tile_Tileset", mouse_grid_x, mouse_grid_y).skipDefault();
node.gmTile = DRAGGING.data;
break;
} }
if(!key_mod_press(SHIFT) && node && struct_has(DRAGGING, "from") && DRAGGING.from.value_from == noone) { if(!key_mod_press(SHIFT) && node && struct_has(DRAGGING, "from") && DRAGGING.from.value_from == noone) {

View file

@ -70,6 +70,7 @@ function Inspector_Custom_Renderer(drawFn, registerFn = noone) : widget() constr
self.draw = drawFn; self.draw = drawFn;
node = noone; node = noone;
panel = noone; panel = noone;
name = "";
popupPanel = noone; popupPanel = noone;
popupDialog = noone; popupDialog = noone;
@ -85,8 +86,15 @@ function Inspector_Custom_Renderer(drawFn, registerFn = noone) : widget() constr
} }
} }
b_toggle = button(function() /*=>*/ { togglePopup(name); }).setIcon(THEME.node_goto, 0, COLORS._main_icon, .75);
static setName = function(name) { self.name = name; return self; }
static setNode = function(node) { self.node = node; return self; } static setNode = function(node) { self.node = node; return self; }
static toString = function() { return $"Custon renderer"; } static toString = function() { return $"Custon renderer: {name}"; }
static step = function() {
b_toggle.icon_blend = popupPanel == noone? COLORS._main_icon : COLORS._main_accent;
}
static togglePopup = function(_title) { static togglePopup = function(_title) {
if(popupPanel == noone) { if(popupPanel == noone) {
@ -346,6 +354,7 @@ function Panel_Inspector() : PanelContent() constructor {
var rx = x + ui(16); var rx = x + ui(16);
var ry = y + top_bar_h; var ry = y + top_bar_h;
var lbh = viewMode? ui(32) : ui(26); var lbh = viewMode? ui(32) : ui(26);
var _cAll = 0;
attribute_hovering = noone; attribute_hovering = noone;
@ -382,7 +391,11 @@ function Panel_Inspector() : PanelContent() constructor {
_x1 -= ui(4); _x1 -= ui(4);
if(_hover && point_in_rectangle(_m[0], _m[1], 0, yy, _x1, yy + lbh)) { if(_hover && point_in_rectangle(_m[0], _m[1], 0, yy, _x1, yy + lbh)) {
draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, 0, yy, _x1, lbh, COLORS.panel_inspector_group_hover, 1); draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, 0, yy, _x1, lbh, COLORS.panel_inspector_group_hover, 1);
if(mouse_press(mb_left, pFOCUS)) _meta[1] = !_meta[1];
if(pFOCUS) {
if(DOUBLE_CLICK) _cAll = _meta[1]? -1 : 1;
else if(mouse_press(mb_left)) _meta[1] = !_meta[1];
}
} else } else
draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, 0, yy, _x1, lbh, COLORS.panel_inspector_group_bg, 1); draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, 0, yy, _x1, lbh, COLORS.panel_inspector_group_bg, 1);
@ -394,7 +407,11 @@ function Panel_Inspector() : PanelContent() constructor {
if(_hover && point_in_rectangle(_m[0], _m[1], 0, yy, _x1, yy + lbh)) { if(_hover && point_in_rectangle(_m[0], _m[1], 0, yy, _x1, yy + lbh)) {
draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, 0, yy, con_w, lbh, COLORS.panel_inspector_group_hover, 1); draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, 0, yy, con_w, lbh, COLORS.panel_inspector_group_hover, 1);
if(mouse_press(mb_left, pFOCUS)) _meta[1] = !_meta[1];
if(pFOCUS) {
if(DOUBLE_CLICK) _cAll = _meta[1]? -1 : 1;
else if(mouse_press(mb_left)) _meta[1] = !_meta[1];
}
} else } else
draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, 0, yy, con_w, lbh, COLORS.panel_inspector_group_bg, 1); draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, 0, yy, con_w, lbh, COLORS.panel_inspector_group_bg, 1);
@ -418,16 +435,16 @@ function Panel_Inspector() : PanelContent() constructor {
var _lh, wh; var _lh, wh;
for( var j = 0; j < array_length(_edt); j++ ) { for( var j = 0; j < array_length(_edt); j++ ) {
var title = _edt[j][0]; var title = array_safe_get(_edt[j], 0, noone);
var param = _edt[j][1]; var param = array_safe_get(_edt[j], 1, noone);
var editW = _edt[j][2]; var editW = array_safe_get(_edt[j], 2, noone);
var drpFn = _edt[j][3]; var drpFn = array_safe_get(_edt[j], 3, noone);
var widx = ui(8); var widx = ui(8);
var widy = yy; var widy = yy;
draw_set_text(_font, fa_left, fa_top, COLORS._main_text_inner); draw_set_text(_font, fa_left, fa_top, COLORS._main_text_inner);
draw_text_over(ui(16), viewMode == INSP_VIEW_MODE.spacious? yy : yy + ui(3), __txt(title)); draw_text_add(ui(16), viewMode == INSP_VIEW_MODE.spacious? yy : yy + ui(3), __txt(title));
if(viewMode == INSP_VIEW_MODE.spacious) { if(viewMode == INSP_VIEW_MODE.spacious) {
_lh = line_get_height(); _lh = line_get_height();
@ -458,7 +475,7 @@ function Panel_Inspector() : PanelContent() constructor {
var widw = con_w - ui(16); var widw = con_w - ui(16);
var widh = viewMode == INSP_VIEW_MODE.spacious? _lh + ui(6) + wh + ui(4) : max(wh, _lh); var widh = viewMode == INSP_VIEW_MODE.spacious? _lh + ui(6) + wh + ui(4) : max(wh, _lh);
if(jun != noone && _hover && point_in_rectangle(_m[0], _m[1], widx, widy, widx + widw, widy + widh)) { if(jun != noone && drpFn != noone && _hover && point_in_rectangle(_m[0], _m[1], widx, widy, widx + widw, widy + widh)) {
draw_sprite_stretched_ext(THEME.ui_panel, 1, widx, widy, widw, widh, COLORS._main_value_positive, 1); draw_sprite_stretched_ext(THEME.ui_panel, 1, widx, widy, widw, widh, COLORS._main_value_positive, 1);
attribute_hovering = drpFn; attribute_hovering = drpFn;
} }
@ -486,7 +503,7 @@ function Panel_Inspector() : PanelContent() constructor {
var _wdgt = meta_tb[j]; var _wdgt = meta_tb[j];
draw_set_text(_font, fa_left, fa_top, COLORS._main_text_inner); draw_set_text(_font, fa_left, fa_top, COLORS._main_text_inner);
draw_text_over(ui(16), viewMode == INSP_VIEW_MODE.spacious? yy : yy + ui(3), __txt(display[0])); draw_text_add(ui(16), viewMode == INSP_VIEW_MODE.spacious? yy : yy + ui(3), __txt(display[0]));
if(viewMode == INSP_VIEW_MODE.spacious) { if(viewMode == INSP_VIEW_MODE.spacious) {
_lh = line_get_height(); _lh = line_get_height();
@ -580,6 +597,9 @@ function Panel_Inspector() : PanelContent() constructor {
hh += ui(viewMode? 4 : 2); hh += ui(viewMode? 4 : 2);
} }
if(_cAll == 1) { for( var i = 0, n = array_length(meta_display); i < n; i++ ) meta_display[i][1] = false; }
else if(_cAll == -1) { for( var i = 0, n = array_length(meta_display); i < n; i++ ) meta_display[i][1] = true; }
return hh; return hh;
} }
@ -714,6 +734,7 @@ function Panel_Inspector() : PanelContent() constructor {
var color_picker_index = 0; var color_picker_index = 0;
var pickers = []; var pickers = [];
var _colsp = false; var _colsp = false;
var _cAll = 0;
for(var i = 0; i < amo; i++) { for(var i = 0; i < amo; i++) {
var yy = hh + _y; var yy = hh + _y;
@ -792,6 +813,7 @@ function Panel_Inspector() : PanelContent() constructor {
continue; continue;
} }
jun.step();
jun.fixHeight = -1; jun.fixHeight = -1;
jun.panel = self; jun.panel = self;
jun.rx = ui(16) + x; jun.rx = ui(16) + x;
@ -836,11 +858,11 @@ function Panel_Inspector() : PanelContent() constructor {
contentPane.hover_content = true; contentPane.hover_content = true;
draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, lbx, yy, con_w - lbx, lbh, COLORS.panel_inspector_group_hover, 1); draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, lbx, yy, con_w - lbx, lbh, COLORS.panel_inspector_group_hover, 1);
if(mouse_press(mb_left, pFOCUS)) if(pFOCUS) {
jun[@ 1] = !coll; if(DOUBLE_CLICK) _cAll = jun[@ 1]? -1 : 1;
else if(mouse_press(mb_left)) jun[@ 1] = !coll;
if(mouse_press(mb_right, pFOCUS)) else if(mouse_press(mb_right, pFOCUS)) menuCall("inspector_group_menu", group_menu, 0, 0, fa_left);
menuCall("inspector_group_menu", group_menu, 0, 0, fa_left); }
} else } else
draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, lbx, yy, con_w - lbx, lbh, COLORS.panel_inspector_group_bg, 1); draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, lbx, yy, con_w - lbx, lbh, COLORS.panel_inspector_group_bg, 1);
@ -1026,6 +1048,10 @@ function Panel_Inspector() : PanelContent() constructor {
} }
} }
if(_cAll == 1) { section_expand_all(); }
else if(_cAll == -1) { section_collapse_all(); }
if(MESSAGE != noone && MESSAGE.type == "Color") { if(MESSAGE != noone && MESSAGE.type == "Color") {
var inp = array_safe_get_fast(pickers, picker_index, 0); var inp = array_safe_get_fast(pickers, picker_index, 0);
if(is_struct(inp)) { if(is_struct(inp)) {
@ -1333,3 +1359,11 @@ function Panel_Inspector() : PanelContent() constructor {
} }
} }
function New_Inspect_Node_Panel(node, pin = true) {
panel = panelAdd("Panel_Inspector", true, false);
panel.content.setInspecting(node, true, false);
panel.destroy_on_click_out = !pin;
return panel;
}

View file

@ -46,14 +46,14 @@ function pathnodeBox(_junction) : widget() constructor {
var bi = 0; var bi = 0;
if(ihover && point_in_rectangle(_m[0], _m[1], x, y, x + iw, y + h)) { if(ihover && point_in_rectangle(_m[0], _m[1], x, y, x + iw, y + h)) {
TOOLTIP = __txt("Go to node"); TOOLTIP = __txt("View node");
bi = 1; bi = 1;
if(mouse_click(mb_left, iactive)) if(mouse_click(mb_left, iactive))
bi = 2; bi = 2;
if(mouse_press(mb_left, iactive) && is(_path, Node)) if(mouse_press(mb_left, iactive) && is(_path, Node))
PANEL_GRAPH.setFocusingNode(_path); New_Inspect_Node_Panel(_path);
} }
draw_sprite_stretched_ext(THEME.button_def, bi, x, y, iw, h); draw_sprite_stretched_ext(THEME.button_def, bi, x, y, iw, h);

View file

@ -89,15 +89,16 @@
tunnels_out = ds_map_create(); tunnels_out = ds_map_create();
#region ===================== BINDERS ==================== #region ===================== BINDERS ====================
bind_gamemaker_path = "";
bind_godot_path = "";
bind_gamemaker = noone; bind_gamemaker = noone;
bind_godot = noone; bind_godot = noone;
gamemaker_editWidget = new gamemakerPathBox(self);
#endregion #endregion
#region =================== ATTRIBUTES =================== #region =================== ATTRIBUTES ===================
attributes = variable_clone(PROJECT_ATTRIBUTES); attributes = variable_clone(PROJECT_ATTRIBUTES);
attributes.bind_gamemaker_path = "";
attributes.bind_godot_path = "";
attributeEditor = [ attributeEditor = [
[ "Default Surface", "surface_dimension", new vectorBox(2, [ "Default Surface", "surface_dimension", new vectorBox(2,
@ -148,7 +149,7 @@
} }
], ],
//[ "Strict", "strict", new checkBox(function() { attributes.strict = !attributes.strict; RENDER_ALL return true; }), function() {} ], // [ "Gamemaker Link", "bind_gamemaker_path", gamemaker_editWidget, noone ],
]; ];
static setPalette = function(pal = noone) { static setPalette = function(pal = noone) {
@ -266,9 +267,6 @@
} }
_map.addon = _addon; _map.addon = _addon;
_map.bind_gamemaker_path = bind_gamemaker_path;
_map.bind_godot_path = bind_godot_path;
return _map; return _map;
} }
@ -324,8 +322,8 @@
if(_node) PANEL_INSPECTOR.setInspecting(_node); if(_node) PANEL_INSPECTOR.setInspecting(_node);
} }
if(struct_has(_map, "bind_gamemaker_path")) bind_gamemaker_path = _map.bind_gamemaker_path; bind_gamemaker = Binder_Gamemaker(attributes.bind_gamemaker_path);
if(struct_has(_map, "bind_godot_path")) bind_godot_path = _map.bind_godot_path; if(bind_gamemaker == noone) attributes.bind_gamemaker_path = "";
} }
static postDeserialize = function() { static postDeserialize = function() {

View file

@ -41,14 +41,14 @@ function tilesetBox(_junction) : widget() constructor {
var bi = 0; var bi = 0;
if(ihover && point_in_rectangle(_m[0], _m[1], x, y, x + iw, y + h)) { if(ihover && point_in_rectangle(_m[0], _m[1], x, y, x + iw, y + h)) {
TOOLTIP = __txt("Go to node"); TOOLTIP = __txt("View node");
bi = 1; bi = 1;
if(mouse_click(mb_left, iactive)) if(mouse_click(mb_left, iactive))
bi = 2; bi = 2;
if(mouse_press(mb_left, iactive)) if(mouse_press(mb_left, iactive) && is(_tileset, Node))
PANEL_GRAPH.setFocusingNode(_tileset); New_Inspect_Node_Panel(_tileset);
} }
draw_sprite_stretched_ext(THEME.button_def, bi, x, y, iw, h); draw_sprite_stretched_ext(THEME.button_def, bi, x, y, iw, h);

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

View file

@ -0,0 +1,90 @@
{
"$GMSprite":"",
"%Name":"s_gamemaker",
"bboxMode":0,
"bbox_bottom":23,
"bbox_left":8,
"bbox_right":23,
"bbox_top":8,
"collisionKind":1,
"collisionTolerance":0,
"DynamicTexturePage":false,
"edgeFiltering":false,
"For3D":false,
"frames":[
{"$GMSpriteFrame":"","%Name":"a88c0c6e-7b5b-4d21-9e05-efa98490498f","name":"a88c0c6e-7b5b-4d21-9e05-efa98490498f","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
],
"gridX":0,
"gridY":0,
"height":32,
"HTile":false,
"layers":[
{"$GMImageLayer":"","%Name":"cc462eeb-166f-485a-8e0a-f62059f49d24","blendMode":0,"displayName":"default","isLocked":false,"name":"cc462eeb-166f-485a-8e0a-f62059f49d24","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
],
"name":"s_gamemaker",
"nineSlice":null,
"origin":4,
"parent":{
"name":"misc",
"path":"folders/sprites/misc.yy",
},
"preMultiplyAlpha":false,
"resourceType":"GMSprite",
"resourceVersion":"2.0",
"sequence":{
"$GMSequence":"",
"%Name":"s_gamemaker",
"autoRecord":true,
"backdropHeight":768,
"backdropImageOpacity":0.5,
"backdropImagePath":"",
"backdropWidth":1366,
"backdropXOffset":0.0,
"backdropYOffset":0.0,
"events":{
"$KeyframeStore<MessageEventKeyframe>":"",
"Keyframes":[],
"resourceType":"KeyframeStore<MessageEventKeyframe>",
"resourceVersion":"2.0",
},
"eventStubScript":null,
"eventToFunction":{},
"length":1.0,
"lockOrigin":false,
"moments":{
"$KeyframeStore<MomentsEventKeyframe>":"",
"Keyframes":[],
"resourceType":"KeyframeStore<MomentsEventKeyframe>",
"resourceVersion":"2.0",
},
"name":"s_gamemaker",
"playback":1,
"playbackSpeed":30.0,
"playbackSpeedType":0,
"resourceType":"GMSequence",
"resourceVersion":"2.0",
"showBackdrop":true,
"showBackdropImage":false,
"timeUnits":1,
"tracks":[
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"a88c0c6e-7b5b-4d21-9e05-efa98490498f","path":"sprites/s_gamemaker/s_gamemaker.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
},"Disabled":false,"id":"60afba20-c698-4677-8592-ff7d6474b013","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
],
"visibleRange":null,
"volume":1.0,
"xorigin":16,
"yorigin":16,
},
"swatchColours":null,
"swfPrecision":0.5,
"textureGroupId":{
"name":"Default",
"path":"texturegroups/Default",
},
"type":0,
"VTile":false,
"width":32,
}

View file

@ -25,8 +25,8 @@
"nineSlice":null, "nineSlice":null,
"origin":4, "origin":4,
"parent":{ "parent":{
"name":"IO", "name":"tiler",
"path":"folders/nodes/icons/IO.yy", "path":"folders/nodes/icons/tiler.yy",
}, },
"preMultiplyAlpha":false, "preMultiplyAlpha":false,
"resourceType":"GMSprite", "resourceType":"GMSprite",

View file

@ -25,8 +25,8 @@
"nineSlice":null, "nineSlice":null,
"origin":4, "origin":4,
"parent":{ "parent":{
"name":"IO", "name":"tiler",
"path":"folders/nodes/icons/IO.yy", "path":"folders/nodes/icons/tiler.yy",
}, },
"preMultiplyAlpha":false, "preMultiplyAlpha":false,
"resourceType":"GMSprite", "resourceType":"GMSprite",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -3,8 +3,8 @@
"%Name":"s_node_tileset_export", "%Name":"s_node_tileset_export",
"bboxMode":0, "bboxMode":0,
"bbox_bottom":61, "bbox_bottom":61,
"bbox_left":4, "bbox_left":9,
"bbox_right":59, "bbox_right":54,
"bbox_top":2, "bbox_top":2,
"collisionKind":1, "collisionKind":1,
"collisionTolerance":0, "collisionTolerance":0,
@ -12,21 +12,21 @@
"edgeFiltering":false, "edgeFiltering":false,
"For3D":false, "For3D":false,
"frames":[ "frames":[
{"$GMSpriteFrame":"","%Name":"41ad1ef4-812c-4234-873f-50652a2e18cb","name":"41ad1ef4-812c-4234-873f-50652a2e18cb","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, {"$GMSpriteFrame":"","%Name":"fab849f5-5a5b-45e3-b20b-6e6adf4ef06a","name":"fab849f5-5a5b-45e3-b20b-6e6adf4ef06a","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
], ],
"gridX":0, "gridX":0,
"gridY":0, "gridY":0,
"height":64, "height":64,
"HTile":false, "HTile":false,
"layers":[ "layers":[
{"$GMImageLayer":"","%Name":"fc03369a-caa3-4b07-9134-abc0293d62e6","blendMode":0,"displayName":"default","isLocked":false,"name":"fc03369a-caa3-4b07-9134-abc0293d62e6","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, {"$GMImageLayer":"","%Name":"b15d1c5b-5a69-4cde-a6bd-4a2d5d4b6872","blendMode":0,"displayName":"default","isLocked":false,"name":"b15d1c5b-5a69-4cde-a6bd-4a2d5d4b6872","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
], ],
"name":"s_node_tileset_export", "name":"s_node_tileset_export",
"nineSlice":null, "nineSlice":null,
"origin":4, "origin":4,
"parent":{ "parent":{
"name":"IO", "name":"tiler",
"path":"folders/nodes/icons/IO.yy", "path":"folders/nodes/icons/tiler.yy",
}, },
"preMultiplyAlpha":false, "preMultiplyAlpha":false,
"resourceType":"GMSprite", "resourceType":"GMSprite",
@ -69,8 +69,8 @@
"tracks":[ "tracks":[
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[ {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{ {"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"41ad1ef4-812c-4234-873f-50652a2e18cb","path":"sprites/s_node_tileset_export/s_node_tileset_export.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, "0":{"$SpriteFrameKeyframe":"","Id":{"name":"fab849f5-5a5b-45e3-b20b-6e6adf4ef06a","path":"sprites/s_node_tileset_export/s_node_tileset_export.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
},"Disabled":false,"id":"7a774c57-8fb5-4744-bf39-c20e7e9a1ac7","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,}, },"Disabled":false,"id":"11bb715f-b866-4e7a-8816-a70fe189bfbb","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
], ],
"visibleRange":null, "visibleRange":null,

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,90 @@
{
"$GMSprite":"",
"%Name":"s_node_tileset_render",
"bboxMode":0,
"bbox_bottom":61,
"bbox_left":2,
"bbox_right":61,
"bbox_top":2,
"collisionKind":1,
"collisionTolerance":0,
"DynamicTexturePage":false,
"edgeFiltering":false,
"For3D":false,
"frames":[
{"$GMSpriteFrame":"","%Name":"e3ed7e8b-cdba-4e78-ad91-517384a46d66","name":"e3ed7e8b-cdba-4e78-ad91-517384a46d66","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
],
"gridX":0,
"gridY":0,
"height":64,
"HTile":false,
"layers":[
{"$GMImageLayer":"","%Name":"1edcfe67-256c-45b7-a151-3e2c838774e2","blendMode":0,"displayName":"default","isLocked":false,"name":"1edcfe67-256c-45b7-a151-3e2c838774e2","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
],
"name":"s_node_tileset_render",
"nineSlice":null,
"origin":4,
"parent":{
"name":"tiler",
"path":"folders/nodes/icons/tiler.yy",
},
"preMultiplyAlpha":false,
"resourceType":"GMSprite",
"resourceVersion":"2.0",
"sequence":{
"$GMSequence":"",
"%Name":"s_node_tileset_render",
"autoRecord":true,
"backdropHeight":768,
"backdropImageOpacity":0.5,
"backdropImagePath":"",
"backdropWidth":1366,
"backdropXOffset":0.0,
"backdropYOffset":0.0,
"events":{
"$KeyframeStore<MessageEventKeyframe>":"",
"Keyframes":[],
"resourceType":"KeyframeStore<MessageEventKeyframe>",
"resourceVersion":"2.0",
},
"eventStubScript":null,
"eventToFunction":{},
"length":1.0,
"lockOrigin":false,
"moments":{
"$KeyframeStore<MomentsEventKeyframe>":"",
"Keyframes":[],
"resourceType":"KeyframeStore<MomentsEventKeyframe>",
"resourceVersion":"2.0",
},
"name":"s_node_tileset_render",
"playback":1,
"playbackSpeed":30.0,
"playbackSpeedType":0,
"resourceType":"GMSequence",
"resourceVersion":"2.0",
"showBackdrop":true,
"showBackdropImage":false,
"timeUnits":1,
"tracks":[
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"e3ed7e8b-cdba-4e78-ad91-517384a46d66","path":"sprites/s_node_tileset_render/s_node_tileset_render.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
},"Disabled":false,"id":"9b9f013c-e20f-49dd-b336-ac74a8ca984d","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
],
"visibleRange":null,
"volume":1.0,
"xorigin":32,
"yorigin":32,
},
"swatchColours":null,
"swfPrecision":0.5,
"textureGroupId":{
"name":"Default",
"path":"texturegroups/Default",
},
"type":0,
"VTile":false,
"width":64,
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,90 @@
{
"$GMSprite":"",
"%Name":"s_node_tileset_rule",
"bboxMode":0,
"bbox_bottom":63,
"bbox_left":15,
"bbox_right":48,
"bbox_top":0,
"collisionKind":1,
"collisionTolerance":0,
"DynamicTexturePage":false,
"edgeFiltering":false,
"For3D":false,
"frames":[
{"$GMSpriteFrame":"","%Name":"a6dd42e2-e4cd-4977-bf7f-1b896802b5cd","name":"a6dd42e2-e4cd-4977-bf7f-1b896802b5cd","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
],
"gridX":0,
"gridY":0,
"height":64,
"HTile":false,
"layers":[
{"$GMImageLayer":"","%Name":"02fd5ff2-e948-44f5-b5b4-c922da3a0973","blendMode":0,"displayName":"default","isLocked":false,"name":"02fd5ff2-e948-44f5-b5b4-c922da3a0973","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
],
"name":"s_node_tileset_rule",
"nineSlice":null,
"origin":4,
"parent":{
"name":"tiler",
"path":"folders/nodes/icons/tiler.yy",
},
"preMultiplyAlpha":false,
"resourceType":"GMSprite",
"resourceVersion":"2.0",
"sequence":{
"$GMSequence":"",
"%Name":"s_node_tileset_rule",
"autoRecord":true,
"backdropHeight":768,
"backdropImageOpacity":0.5,
"backdropImagePath":"",
"backdropWidth":1366,
"backdropXOffset":0.0,
"backdropYOffset":0.0,
"events":{
"$KeyframeStore<MessageEventKeyframe>":"",
"Keyframes":[],
"resourceType":"KeyframeStore<MessageEventKeyframe>",
"resourceVersion":"2.0",
},
"eventStubScript":null,
"eventToFunction":{},
"length":1.0,
"lockOrigin":false,
"moments":{
"$KeyframeStore<MomentsEventKeyframe>":"",
"Keyframes":[],
"resourceType":"KeyframeStore<MomentsEventKeyframe>",
"resourceVersion":"2.0",
},
"name":"s_node_tileset_rule",
"playback":1,
"playbackSpeed":30.0,
"playbackSpeedType":0,
"resourceType":"GMSequence",
"resourceVersion":"2.0",
"showBackdrop":true,
"showBackdropImage":false,
"timeUnits":1,
"tracks":[
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"a6dd42e2-e4cd-4977-bf7f-1b896802b5cd","path":"sprites/s_node_tileset_rule/s_node_tileset_rule.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
},"Disabled":false,"id":"d70a0d91-9da3-4b3e-8106-f97f2fba0f6d","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
],
"visibleRange":null,
"volume":1.0,
"xorigin":32,
"yorigin":32,
},
"swatchColours":null,
"swfPrecision":0.5,
"textureGroupId":{
"name":"Default",
"path":"texturegroups/Default",
},
"type":0,
"VTile":false,
"width":64,
}