node manager

This commit is contained in:
Tanasart 2025-01-17 11:44:14 +07:00
parent 190dc19539
commit c0ddfda834
6 changed files with 126 additions and 11 deletions

View file

@ -2168,6 +2168,7 @@
{"name":"s_node_mirror_polar","order":25,"path":"sprites/s_node_mirror_polar/s_node_mirror_polar.yy",},
{"name":"s_node_mirror","order":3,"path":"sprites/s_node_mirror/s_node_mirror.yy",},
{"name":"s_node_mk_blinker","order":10,"path":"sprites/s_node_mk_blinker/s_node_mk_blinker.yy",},
{"name":"panel_node_manager","order":6,"path":"scripts/panel_node_manager/panel_node_manager.yy",},
{"name":"s_node_mk_brownian","order":8,"path":"sprites/s_node_mk_brownian/s_node_mk_brownian.yy",},
{"name":"s_node_mk_delay_machine","order":12,"path":"sprites/s_node_mk_delay_machine/s_node_mk_delay_machine.yy",},
{"name":"s_node_mk_fall","order":9,"path":"sprites/s_node_mk_fall/s_node_mk_fall.yy",},

View file

@ -1242,11 +1242,7 @@
{"$GMIncludedFile":"","%Name":"Update.ps1","CopyToMask":-1,"filePath":"datafiles/data/Nodes","name":"Update.ps1","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"tileset_gamemaker2_room.yy","CopyToMask":-1,"filePath":"datafiles/data/TemplateStrings","name":"tileset_gamemaker2_room.yy","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"Theme.zip","CopyToMask":-1,"filePath":"datafiles/data","name":"Theme.zip","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"dllcredits.txt","ConfigValues":{
"Itch":{
"CopyToMask":"0",
},
},"CopyToMask":0,"filePath":"datafiles","name":"dllcredits.txt","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"dllcredits.txt","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":0,"filePath":"datafiles","name":"dllcredits.txt","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"dlltest1.dll","CopyToMask":-1,"filePath":"datafiles","name":"dlltest1.dll","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"ffmpeg.exe","CopyToMask":-1,"filePath":"datafiles/ffmpeg/bin","name":"ffmpeg.exe","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"LICENSE","CopyToMask":-1,"filePath":"datafiles/ffmpeg","name":"LICENSE","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
@ -1265,11 +1261,7 @@
{"$GMIncludedFile":"","%Name":"mf.dll","CopyToMask":-1,"filePath":"datafiles","name":"mf.dll","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"mfcore.dll","CopyToMask":-1,"filePath":"datafiles","name":"mfcore.dll","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"mfplat.dll","CopyToMask":-1,"filePath":"datafiles","name":"mfplat.dll","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"PixelComposer_profile-2.provisionprofile","ConfigValues":{
"Itch":{
"CopyToMask":"2",
},
},"CopyToMask":-1,"filePath":"datafiles","name":"PixelComposer_profile-2.provisionprofile","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"PixelComposer_profile-2.provisionprofile","ConfigValues":{"Itch":{"CopyToMask":"2",},},"CopyToMask":-1,"filePath":"datafiles","name":"PixelComposer_profile-2.provisionprofile","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"data.win","CopyToMask":-1,"filePath":"datafiles/report","name":"data.win","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"execute_shell_simple_ext_x64.dll","CopyToMask":-1,"filePath":"datafiles/report","name":"execute_shell_simple_ext_x64.dll","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
{"$GMIncludedFile":"","%Name":"options.ini","CopyToMask":-1,"filePath":"datafiles/report","name":"options.ini","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
@ -2697,6 +2689,7 @@
{"id":{"name":"sh_blend_replace","path":"shaders/sh_blend_replace/sh_blend_replace.yy",},},
{"id":{"name":"sh_blend_sat","path":"shaders/sh_blend_sat/sh_blend_sat.yy",},},
{"id":{"name":"sh_blend_screen","path":"shaders/sh_blend_screen/sh_blend_screen.yy",},},
{"id":{"name":"panel_node_manager","path":"scripts/panel_node_manager/panel_node_manager.yy",},},
{"id":{"name":"sh_blend_soft_light","path":"shaders/sh_blend_soft_light/sh_blend_soft_light.yy",},},
{"id":{"name":"sh_blend_subtract","path":"shaders/sh_blend_subtract/sh_blend_subtract.yy",},},
{"id":{"name":"sh_blend_vivid_light","path":"shaders/sh_blend_vivid_light/sh_blend_vivid_light.yy",},},

Binary file not shown.

View file

@ -262,7 +262,8 @@ function Panel_Menu() : PanelContent() constructor {
-1,
menuItem(__txt("Collection Manager"), function() /*=>*/ { dialogPanelCall(new Panel_Collection_Manager());}),
menuItem(__txtx("panel_menu_test_load_nodes", "Load all nodes"), function() /*=>*/ { __test_load_all_nodes(); }),
menuItem(__txt("Nodes Manager"), function() /*=>*/ { dialogPanelCall(new Panel_Nodes_Manager()); }),
// menuItem(__txtx("panel_menu_test_load_nodes", "Load all nodes"), () => { __test_load_all_nodes(); }),
// menuItem(__txtx("panel_menu_test_gen_guide", "Generate node guide"), () => { dialogPanelCall(new Panel_Node_Data_Gen()); }),
// menuItem(__txtx("panel_menu_test_gen_theme", "Generate theme object"), () => { __test_generate_theme(); }),
-1,

View file

@ -0,0 +1,106 @@
function Panel_Nodes_Manager() : PanelContent() constructor {
w = ui(600);
h = ui(480);
title = "Nodes Manager";
auto_pin = true;
padding = ui(4);
content_w = w - ui(200);
stack = ds_stack_create();
internalDir = new DirectoryObject("D:/Project/MakhamDev/LTS-PixelComposer/PixelComposer/datafiles/data/Nodes/Internal")
.scan(["NodeObject"]);
sc_content = new scrollPane(content_w, h, function(_y, _m) {
draw_clear_alpha(COLORS.panel_bg_clear_inner, 1);
var _h = 0;
var hg = ui(20);
var yy = _y;
var ww = sc_content.surface_w;
var _hover = sc_content.hover;
var _focus = sc_content.active;
ds_stack_clear(stack);
var _list = internalDir.subDir;
for( var i = 0, n = ds_list_size(_list); i < n; i++ )
ds_stack_push(stack, [ _list[| i], 0]);
while(!ds_stack_empty(stack)) {
var _stack = ds_stack_pop(stack);
var st = _stack[0];
var ly = _stack[1];
var _list = st.subDir;
for( var i = 0, n = ds_list_size(_list); i < n; i++ )
ds_stack_push(stack, [ _list[| i], ly + 1]);
var cc = COLORS._main_text_sub;
if(_hover && point_in_rectangle(_m[0], _m[1], 0, yy, ww, yy + hg - 1)) {
cc = COLORS._main_text;
}
draw_set_text(f_p2, fa_left, fa_center, cc);
draw_text_add(ui(8 + ly * 16 + 8), yy + hg / 2, st.name);
_h += hg;
yy += hg;
if(!st.open) continue;
var _list = st.content;
for( var i = 0, n = ds_list_size(_list); i < n; i++ ) {
var _con = _list[| i];
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text);
draw_text_add(ui(8 + ly * 16), yy + hg / 2, _con.name);
_h += hg;
yy += hg;
}
}
return _h;
});
function drawContent(panel) {
draw_clear_alpha(COLORS.panel_bg_clear, 1);
content_w = w - ui(200);
// Lists
var _pd = padding;
var ndx = _pd;
var ndy = _pd;
var ndw = content_w + ui(16);
var ndh = h - _pd * 2;
draw_sprite_stretched(THEME.ui_panel_bg, 1, ndx, ndy, ndw, ndh);
sc_content.verify(content_w, ndh - ui(16));
sc_content.setFocusHover(pFOCUS, pHOVER);
sc_content.drawOffset(ndx + ui(8), ndy + ui(8), mx, my);
// Button
var lx = ndx + ndw + ui(8);
var bw = w - _pd - lx;
var bh = TEXTBOX_HEIGHT;
var bx = lx;
var by = _pd;
if(buttonInstant(THEME.button_def, bx, by, bw, bh, [ mx, my ], pHOVER, pFOCUS) == 2)
__test_load_all_nodes();
draw_set_text(f_p2, fa_center, fa_center, COLORS._main_text);
draw_text_add(bx + bw / 2, by + bh / 2, "Load All Nodes");
by += bh + ui(4);
}
}

View file

@ -0,0 +1,14 @@
{
"$GMScript":"v1",
"%Name":"panel_node_manager",
"isCompatibility":false,
"isDnD":false,
"name":"panel_node_manager",
"parent":{
"name":"debug",
"path":"folders/panels/_others/debug.yy",
},
"resourceType":"GMScript",
"resourceVersion":"2.0",
"tags":[],
}