Pixel-Composer/objects/o_dialog_add_multiple_images/Create_0.gml

37 lines
774 B
Text
Raw Normal View History

2022-01-13 05:24:03 +01:00
/// @description init
event_inherited();
#region data
destroy_on_click_out = true;
2024-05-16 15:28:45 +02:00
dialog_w = ui(370);
2024-05-16 09:42:34 +02:00
dialog_h = ui(180);
2022-01-13 05:24:03 +01:00
paths = "";
is_dir = false;
dir_recursive = false;
2024-05-16 09:42:34 +02:00
dir_filter = ".png";
2022-01-13 05:24:03 +01:00
function setPath(path) {
paths = path;
2022-12-16 09:18:09 +01:00
is_dir = directory_exists(path[0]);
2022-01-13 05:24:03 +01:00
2024-05-16 09:42:34 +02:00
if(is_dir) {
2022-11-03 11:44:49 +01:00
dialog_h += ui(96);
2024-05-16 09:42:34 +02:00
dialog_w += ui(80);
array_push(nodes, ALL_NODES[? "Node_Directory_Search"]);
}
2022-01-13 05:24:03 +01:00
}
cb_recursive = new checkBox(function(val) { dir_recursive = !dir_recursive; });
tb_filter = new textBox(TEXTBOX_INPUT.text, function(str) { dir_filter = str; })
#endregion
#region nodes
nodes = [
2022-12-16 09:18:09 +01:00
ALL_NODES[? "Node_Image"],
ALL_NODES[? "Node_Image_Sequence"],
ALL_NODES[? "Node_Image_Animated"],
2024-05-16 15:28:45 +02:00
ALL_NODES[? "Node_Canvas"],
2022-01-13 05:24:03 +01:00
];
#endregion