Add node in between connection, collection size
|
@ -186,6 +186,7 @@
|
||||||
{"id":{"name":"node_registry","path":"scripts/node_registry/node_registry.yy",},"order":1,},
|
{"id":{"name":"node_registry","path":"scripts/node_registry/node_registry.yy",},"order":1,},
|
||||||
{"id":{"name":"sh_checkerboard","path":"shaders/sh_checkerboard/sh_checkerboard.yy",},"order":12,},
|
{"id":{"name":"sh_checkerboard","path":"shaders/sh_checkerboard/sh_checkerboard.yy",},"order":12,},
|
||||||
{"id":{"name":"node_character","path":"scripts/node_character/node_character.yy",},"order":9,},
|
{"id":{"name":"node_character","path":"scripts/node_character/node_character.yy",},"order":9,},
|
||||||
|
{"id":{"name":"s_folder_content_24","path":"sprites/s_folder_content_24/s_folder_content_24.yy",},"order":38,},
|
||||||
{"id":{"name":"draw_set_text","path":"scripts/draw_set_text/draw_set_text.yy",},"order":1,},
|
{"id":{"name":"draw_set_text","path":"scripts/draw_set_text/draw_set_text.yy",},"order":1,},
|
||||||
{"id":{"name":"s_button_right","path":"sprites/s_button_right/s_button_right.yy",},"order":6,},
|
{"id":{"name":"s_button_right","path":"sprites/s_button_right/s_button_right.yy",},"order":6,},
|
||||||
{"id":{"name":"node_color_data","path":"scripts/node_color_data/node_color_data.yy",},"order":4,},
|
{"id":{"name":"node_color_data","path":"scripts/node_color_data/node_color_data.yy",},"order":4,},
|
||||||
|
@ -201,6 +202,7 @@
|
||||||
{"id":{"name":"buttonPalette","path":"scripts/buttonPalette/buttonPalette.yy",},"order":6,},
|
{"id":{"name":"buttonPalette","path":"scripts/buttonPalette/buttonPalette.yy",},"order":6,},
|
||||||
{"id":{"name":"s_node_zigzag","path":"sprites/s_node_zigzag/s_node_zigzag.yy",},"order":0,},
|
{"id":{"name":"s_node_zigzag","path":"sprites/s_node_zigzag/s_node_zigzag.yy",},"order":0,},
|
||||||
{"id":{"name":"s_node_timeline_preview","path":"sprites/s_node_timeline_preview/s_node_timeline_preview.yy",},"order":99,},
|
{"id":{"name":"s_node_timeline_preview","path":"sprites/s_node_timeline_preview/s_node_timeline_preview.yy",},"order":99,},
|
||||||
|
{"id":{"name":"type_conversion","path":"scripts/type_conversion/type_conversion.yy",},"order":8,},
|
||||||
{"id":{"name":"node_keyframe","path":"scripts/node_keyframe/node_keyframe.yy",},"order":7,},
|
{"id":{"name":"node_keyframe","path":"scripts/node_keyframe/node_keyframe.yy",},"order":7,},
|
||||||
{"id":{"name":"s_node_pixel_cloud","path":"sprites/s_node_pixel_cloud/s_node_pixel_cloud.yy",},"order":81,},
|
{"id":{"name":"s_node_pixel_cloud","path":"sprites/s_node_pixel_cloud/s_node_pixel_cloud.yy",},"order":81,},
|
||||||
{"id":{"name":"o_dialog_drag_folder","path":"objects/o_dialog_drag_folder/o_dialog_drag_folder.yy",},"order":20,},
|
{"id":{"name":"o_dialog_drag_folder","path":"objects/o_dialog_drag_folder/o_dialog_drag_folder.yy",},"order":20,},
|
||||||
|
@ -445,6 +447,7 @@
|
||||||
{"id":{"name":"node_3d_transform","path":"scripts/node_3d_transform/node_3d_transform.yy",},"order":2,},
|
{"id":{"name":"node_3d_transform","path":"scripts/node_3d_transform/node_3d_transform.yy",},"order":2,},
|
||||||
{"id":{"name":"s_node_dilate","path":"sprites/s_node_dilate/s_node_dilate.yy",},"order":40,},
|
{"id":{"name":"s_node_dilate","path":"sprites/s_node_dilate/s_node_dilate.yy",},"order":40,},
|
||||||
{"id":{"name":"s_node_3d_transform","path":"sprites/s_node_3d_transform/s_node_3d_transform.yy",},"order":5,},
|
{"id":{"name":"s_node_3d_transform","path":"sprites/s_node_3d_transform/s_node_3d_transform.yy",},"order":5,},
|
||||||
|
{"id":{"name":"node_display_text","path":"scripts/node_display_text/node_display_text.yy",},"order":3,},
|
||||||
{"id":{"name":"s_prop_gradient","path":"sprites/s_prop_gradient/s_prop_gradient.yy",},"order":11,},
|
{"id":{"name":"s_prop_gradient","path":"sprites/s_prop_gradient/s_prop_gradient.yy",},"order":11,},
|
||||||
{"id":{"name":"s_kenney","path":"sprites/s_kenney/s_kenney.yy",},"order":0,},
|
{"id":{"name":"s_kenney","path":"sprites/s_kenney/s_kenney.yy",},"order":0,},
|
||||||
{"id":{"name":"sh_grid_noise","path":"shaders/sh_grid_noise/sh_grid_noise.yy",},"order":8,},
|
{"id":{"name":"sh_grid_noise","path":"shaders/sh_grid_noise/sh_grid_noise.yy",},"order":8,},
|
||||||
|
|
|
@ -7,6 +7,7 @@ event_inherited();
|
||||||
node_target_x = 0;
|
node_target_x = 0;
|
||||||
node_target_y = 0;
|
node_target_y = 0;
|
||||||
node_called = noone;
|
node_called = noone;
|
||||||
|
junction_hovering = noone;
|
||||||
|
|
||||||
dialog_w = ADD_NODE_W;
|
dialog_w = ADD_NODE_W;
|
||||||
dialog_h = ADD_NODE_H;
|
dialog_h = ADD_NODE_H;
|
||||||
|
@ -21,24 +22,45 @@ event_inherited();
|
||||||
page_key = ADD_NODE_PAGE == ""? NODE_CATAGORY[| 2] : ADD_NODE_PAGE;
|
page_key = ADD_NODE_PAGE == ""? NODE_CATAGORY[| 2] : ADD_NODE_PAGE;
|
||||||
page = ALL_NODES[? page_key];
|
page = ALL_NODES[? page_key];
|
||||||
|
|
||||||
function buildNode(_node) {
|
function buildNode(_node, _param = "") {
|
||||||
instance_destroy();
|
instance_destroy();
|
||||||
|
|
||||||
if(!_node) return;
|
if(!_node) return;
|
||||||
|
|
||||||
var _new_node = _node.build(node_target_x, node_target_y);
|
var _new_node = _node.build(node_target_x, node_target_y, _param);
|
||||||
|
|
||||||
if(_new_node && node_called) {
|
if(_new_node) {
|
||||||
var _node_list = node_called.connect_type == JUNCTION_CONNECT.input? _new_node.outputs : _new_node.inputs;
|
if(node_called != noone) {
|
||||||
for(var i = 0; i < ds_list_size(_node_list); i++) {
|
var _node_list = node_called.connect_type == JUNCTION_CONNECT.input? _new_node.outputs : _new_node.inputs;
|
||||||
var _target = _node_list[| i];
|
for(var i = 0; i < ds_list_size(_node_list); i++) {
|
||||||
if(_target.isVisible() && (value_bit(_target.type) & value_bit(node_called.type))) {
|
var _target = _node_list[| i];
|
||||||
if(node_called.connect_type == JUNCTION_CONNECT.input) {
|
if(_target.isVisible() && (value_bit(_target.type) & value_bit(node_called.type))) {
|
||||||
node_called.setFrom(_node_list[| i]);
|
if(node_called.connect_type == JUNCTION_CONNECT.input) {
|
||||||
_new_node.x -= _new_node.w;
|
node_called.setFrom(_node_list[| i]);
|
||||||
} else
|
_new_node.x -= _new_node.w;
|
||||||
_node_list[| i].setFrom(node_called);
|
} else
|
||||||
break;
|
_node_list[| i].setFrom(node_called);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if(junction_hovering != noone) {
|
||||||
|
var to = junction_hovering;
|
||||||
|
var from = junction_hovering.value_from;
|
||||||
|
|
||||||
|
for( var i = 0; i < ds_list_size(_new_node.inputs); i++ ) {
|
||||||
|
var _in = _new_node.inputs[| i];
|
||||||
|
if(value_bit(_in.type) & value_bit(from.type)) {
|
||||||
|
_in.setFrom(from);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for( var i = 0; i < ds_list_size(_new_node.outputs); i++ ) {
|
||||||
|
var _ot = _new_node.outputs[| i];
|
||||||
|
if(value_bit(_ot.type) & value_bit(to.type)) {
|
||||||
|
to.setFrom(_ot);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -206,9 +228,12 @@ event_inherited();
|
||||||
|
|
||||||
if(!_node) continue;
|
if(!_node) continue;
|
||||||
var match = string_pos(search_lower, string_lower(_node.name)) > 0;
|
var match = string_pos(search_lower, string_lower(_node.name)) > 0;
|
||||||
|
var param = "";
|
||||||
for( var k = 0; k < array_length(_node.tags); k++ ) {
|
for( var k = 0; k < array_length(_node.tags); k++ ) {
|
||||||
if(string_pos(search_lower, _node.tags[k]) > 0)
|
if(string_pos(search_lower, _node.tags[k]) > 0) {
|
||||||
match = true;
|
match = true;
|
||||||
|
param = _node.tags[k];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(match) {
|
if(match) {
|
||||||
|
@ -227,13 +252,13 @@ event_inherited();
|
||||||
if(point_in_rectangle(_m[0], _m[1], _nx, yy, _nx + grid_width, yy + grid_size)) {
|
if(point_in_rectangle(_m[0], _m[1], _nx, yy, _nx + grid_width, yy + grid_size)) {
|
||||||
node_selecting = amo;
|
node_selecting = amo;
|
||||||
if(mouse_check_button_pressed(mb_left))
|
if(mouse_check_button_pressed(mb_left))
|
||||||
buildNode(_node);
|
buildNode(_node, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(node_selecting == amo) {
|
if(node_selecting == amo) {
|
||||||
draw_sprite_stretched(s_node_active, 0, _boxx, yy, grid_size, grid_size);
|
draw_sprite_stretched(s_node_active, 0, _boxx, yy, grid_size, grid_size);
|
||||||
if(keyboard_check_pressed(vk_enter))
|
if(keyboard_check_pressed(vk_enter))
|
||||||
buildNode(_node);
|
buildNode(_node, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(node_focusing == amo) {
|
if(node_focusing == amo) {
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
#region log
|
#region log
|
||||||
var path = "log_temp.txt";
|
var path = "log_temp.txt";
|
||||||
var f = file_text_open_append(path);
|
var f = file_text_open_append(path);
|
||||||
var t = string(current_year) + "/" + string(current_month) + "/" + string(current_day)
|
var t = _log_template();
|
||||||
+ " " + string(current_hour) + ":" + string(current_minute) + ":" + string(current_second)
|
|
||||||
+ " > ";
|
|
||||||
file_text_write_string(f, "[MESSAGE] " + t + "session begin" + "\n");
|
file_text_write_string(f, "[MESSAGE] " + t + "session begin" + "\n");
|
||||||
|
|
||||||
if (!code_is_compiled()) {
|
if (!code_is_compiled()) {
|
||||||
|
@ -26,10 +24,12 @@ display_reset(0, 1);
|
||||||
|
|
||||||
draw_set_circle_precision(64);
|
draw_set_circle_precision(64);
|
||||||
globalvar CURSOR, UPDATE, TOOLTIP, DIALOG_DEPTH_HOVER;
|
globalvar CURSOR, UPDATE, TOOLTIP, DIALOG_DEPTH_HOVER;
|
||||||
|
globalvar RENDER_STACK;
|
||||||
DIALOG_DEPTH_HOVER = 0;
|
DIALOG_DEPTH_HOVER = 0;
|
||||||
UPDATE = false;
|
UPDATE = RENDER_TYPE.none;
|
||||||
CURSOR = cr_default;
|
CURSOR = cr_default;
|
||||||
TOOLTIP = "";
|
TOOLTIP = "";
|
||||||
|
RENDER_STACK = ds_stack_create();
|
||||||
|
|
||||||
_cursor = CURSOR;
|
_cursor = CURSOR;
|
||||||
dc_check = 0;
|
dc_check = 0;
|
||||||
|
@ -45,9 +45,7 @@ display_reset(0, 1);
|
||||||
addHotkey("", "Redo", "Z", MOD_KEY.ctrl | MOD_KEY.shift, function() { REDO(); });
|
addHotkey("", "Redo", "Z", MOD_KEY.ctrl | MOD_KEY.shift, function() { REDO(); });
|
||||||
|
|
||||||
addHotkey("", "Render all", vk_f5, MOD_KEY.none, function() {
|
addHotkey("", "Render all", vk_f5, MOD_KEY.none, function() {
|
||||||
for(var i = 0; i < ds_list_size(NODES); i++)
|
UPDATE |= RENDER_TYPE.full;
|
||||||
NODES[| i].setRenderStatus(false);
|
|
||||||
UPDATE = true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
globalvar HOTKEY_MOD;
|
globalvar HOTKEY_MOD;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#region directory
|
#region directory
|
||||||
globalvar DIRECTORY;
|
globalvar DIRECTORY;
|
||||||
DIRECTORY = "C:\\Users\\" + environment_get_variable("USERNAME") + "\\AppData\\Local\\Pixels_Composer\\";
|
DIRECTORY = "C:\\Users\\" + environment_get_variable("USERNAME") + "\\AppData\\Local\\Pixels_Composer\\";
|
||||||
|
log_clear();
|
||||||
log_newline();
|
log_newline();
|
||||||
log_message("SESSION", "Begin");
|
log_message("SESSION", "Begin");
|
||||||
log_message("DIRECTORY", DIRECTORY);
|
log_message("DIRECTORY", DIRECTORY);
|
||||||
|
|
|
@ -48,10 +48,13 @@
|
||||||
NODES[| i].stepBegin();
|
NODES[| i].stepBegin();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(UPDATE) {
|
if(UPDATE & RENDER_TYPE.full) {
|
||||||
//renderUpdated();
|
|
||||||
renderAll();
|
renderAll();
|
||||||
UPDATE = false;
|
UPDATE = RENDER_TYPE.none;
|
||||||
|
} else if(UPDATE & RENDER_TYPE.partial) {
|
||||||
|
show_debug_message("Update partial stack size = " + string(ds_stack_size(RENDER_STACK)));
|
||||||
|
renderUpdated();
|
||||||
|
UPDATE = RENDER_TYPE.none;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,7 @@ function APPEND(_path) {
|
||||||
|
|
||||||
log_message("FILE", "append file " + _path);
|
log_message("FILE", "append file " + _path);
|
||||||
PANEL_MENU.showNoti("Collection loaded", s_noti_icon_file_load);
|
PANEL_MENU.showNoti("Collection loaded", s_noti_icon_file_load);
|
||||||
|
|
||||||
return node_create;
|
return node_create;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
function FileContext(_name, _path) constructor {
|
function FileContext(_name, _path, _subfolder = false) constructor {
|
||||||
name = _name;
|
name = _name;
|
||||||
path = _path;
|
path = _path;
|
||||||
spr = -1;
|
spr = -1;
|
||||||
|
|
||||||
|
subfolder = _subfolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
function __init_collection() {
|
function __init_collection() {
|
||||||
log_message("COLLECTION", "init");
|
log_message("COLLECTION", "init");
|
||||||
|
|
||||||
globalvar COLLECTIONS;
|
globalvar COLLECTIONS;
|
||||||
COLLECTIONS = ds_list_create();
|
COLLECTIONS = -1;
|
||||||
|
|
||||||
var _ = DIRECTORY + "Collections";
|
var _ = DIRECTORY + "Collections";
|
||||||
var _l = _ + "\\coll" + string(VERSION);
|
var _l = _ + "\\coll" + string(VERSION);
|
||||||
|
@ -26,21 +28,12 @@ function __init_collection() {
|
||||||
|
|
||||||
function searchCollections() {
|
function searchCollections() {
|
||||||
log_message("COLLECTION", "refreshing collection base folder.");
|
log_message("COLLECTION", "refreshing collection base folder.");
|
||||||
ds_list_clear(COLLECTIONS);
|
|
||||||
var f = new FileContext("Base node", "");
|
|
||||||
ds_list_add(COLLECTIONS, f);
|
|
||||||
|
|
||||||
if(!directory_exists(DIRECTORY + "Collections")) {
|
if(!directory_exists(DIRECTORY + "Collections")) {
|
||||||
directory_create(DIRECTORY + "Collections");
|
directory_create(DIRECTORY + "Collections");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var _l = DIRECTORY + "Collections";
|
COLLECTIONS = new DirectoryObject("Collections", DIRECTORY + "Collections");
|
||||||
var folder = file_find_first(_l + "/*", fa_directory);
|
COLLECTIONS.open = true;
|
||||||
while(folder != "") {
|
|
||||||
if(directory_exists(_l + "\\" + folder))
|
|
||||||
ds_list_add(COLLECTIONS, new FileContext(folder, _l + "\\" + folder));
|
|
||||||
folder = file_find_next();
|
|
||||||
}
|
|
||||||
file_find_close();
|
|
||||||
}
|
}
|
|
@ -1,9 +1,13 @@
|
||||||
function __log(title, str) {
|
function _log_template() {
|
||||||
var path = DIRECTORY + "log.txt";
|
return string(current_year) + "/" + string(current_month) + "/" + string(current_day)
|
||||||
var f = file_text_open_append(path);
|
|
||||||
var t = string(current_year) + "/" + string(current_month) + "/" + string(current_day)
|
|
||||||
+ " " + string(current_hour) + ":" + string(current_minute) + ":" + string(current_second)
|
+ " " + string(current_hour) + ":" + string(current_minute) + ":" + string(current_second)
|
||||||
+ " > ";
|
+ " > ";
|
||||||
|
}
|
||||||
|
|
||||||
|
function __log(title, str, fname = "log.txt") {
|
||||||
|
var path = DIRECTORY + fname;
|
||||||
|
var f = file_text_open_append(path);
|
||||||
|
var t = _log_template();
|
||||||
file_text_write_string(f, string(title) + t + string(str) + "\n");
|
file_text_write_string(f, string(title) + t + string(str) + "\n");
|
||||||
file_text_close(f);
|
file_text_close(f);
|
||||||
|
|
||||||
|
@ -29,6 +33,12 @@ function log_newline() {
|
||||||
file_text_close(f);
|
file_text_close(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function log_clear() {
|
||||||
|
var path = DIRECTORY + "log.txt";
|
||||||
|
if(file_exists(path))
|
||||||
|
file_delete(path);
|
||||||
|
}
|
||||||
|
|
||||||
exception_unhandled_handler(function(ex) {
|
exception_unhandled_handler(function(ex) {
|
||||||
var tt = "\n-------------------------- OH NO --------------------------\n\n";
|
var tt = "\n-------------------------- OH NO --------------------------\n\n";
|
||||||
tt += ex.longMessage;
|
tt += ex.longMessage;
|
||||||
|
|
|
@ -54,3 +54,27 @@ function draw_line_curve_color(x0, y0, x1, y1, thick = 1, col1, col2) {
|
||||||
oc = nc;
|
oc = nc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function distance_to_curve(mx, my, x0, y0, x1, y1) {
|
||||||
|
var xc = (x0 + x1) / 2;
|
||||||
|
var sample = max(8, ceil((abs(x0 - x1) + abs(y0 - y1)) / 4));
|
||||||
|
|
||||||
|
var dist = 999999;
|
||||||
|
var ox, oy, nx, ny, t, it;
|
||||||
|
|
||||||
|
for( var i = 0; i <= sample; i++ ) {
|
||||||
|
t = i / sample;
|
||||||
|
it = 1 - t;
|
||||||
|
|
||||||
|
nx = x0 * t * t * t + 3 * xc * it * t * t + 3 * xc * it * it * t + x1 * it * it * it;
|
||||||
|
ny = y0 * t * t * t + 3 * y0 * it * t * t + 3 * y1 * it * it * t + y1 * it * it * it;
|
||||||
|
|
||||||
|
if(i)
|
||||||
|
dist = min(dist, distance_to_line(mx, my, ox, oy, nx, ny));
|
||||||
|
|
||||||
|
ox = nx;
|
||||||
|
oy = ny;
|
||||||
|
}
|
||||||
|
|
||||||
|
return dist;
|
||||||
|
}
|
|
@ -15,14 +15,37 @@ function Node_Array_Get(_x, _y) : Node(_x, _y) constructor {
|
||||||
inputs[| 0] = nodeValue(0, "Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)
|
inputs[| 0] = nodeValue(0, "Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0)
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
|
|
||||||
inputs[| 1] = nodeValue(1, "Index", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0);
|
inputs[| 1] = nodeValue(1, "Index", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setVisible(true, true);
|
||||||
|
|
||||||
|
inputs[| 2] = nodeValue(2, "Overflow", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Clamp", "Loop", "Ping Pong"]);
|
||||||
|
|
||||||
outputs[| 0] = nodeValue(0, "Size", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, 0);
|
outputs[| 0] = nodeValue(0, "Size", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, 0);
|
||||||
|
|
||||||
static update = function() {
|
static update = function() {
|
||||||
var _arr = inputs[| 0].getValue();
|
var _arr = inputs[| 0].getValue();
|
||||||
if(!is_array(_arr)) return;
|
if(!is_array(_arr)) return;
|
||||||
var index = clamp(inputs[| 1].getValue(), 0, array_length(_arr) - 1);
|
|
||||||
|
var index = inputs[| 1].getValue();
|
||||||
|
var _len = array_length(_arr);
|
||||||
|
var _of = inputs[| 2].getValue();
|
||||||
|
switch(_of) {
|
||||||
|
case 0 :
|
||||||
|
index = clamp(index, 0, _len - 1);
|
||||||
|
break;
|
||||||
|
case 1 :
|
||||||
|
index = safe_mod(index, _len);
|
||||||
|
if(index < 0) index = _len + index;
|
||||||
|
break;
|
||||||
|
case 2 :
|
||||||
|
var _pplen = (_len - 1) * 2;
|
||||||
|
index = safe_mod(abs(index), _pplen);
|
||||||
|
if(index >= _len)
|
||||||
|
index = _pplen - index;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
outputs[| 0].setValue(_arr[index]);
|
outputs[| 0].setValue(_arr[index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,23 @@ function Node_Collection(_x, _y) : Node(_x, _y) constructor {
|
||||||
for(var i = 0; i < ds_list_size(nodes); i++) {
|
for(var i = 0; i < ds_list_size(nodes); i++) {
|
||||||
nodes[| i].stepBegin();
|
nodes[| i].stepBegin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var out_surf = false;
|
||||||
|
|
||||||
|
for( var i = 0; i < ds_list_size(outputs); i++ ) {
|
||||||
|
if(outputs[| i].type == VALUE_TYPE.surface)
|
||||||
|
out_surf = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(out_surf) {
|
||||||
|
w = 128;
|
||||||
|
min_h = 128;
|
||||||
|
} else {
|
||||||
|
w = 96;
|
||||||
|
min_h = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
setHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
static step = function() {
|
static step = function() {
|
||||||
|
@ -82,6 +99,7 @@ function Node_Collection(_x, _y) : Node(_x, _y) constructor {
|
||||||
for( var i = custom_input_index; i < siz; i++ ) {
|
for( var i = custom_input_index; i < siz; i++ ) {
|
||||||
var _jin = ds_priority_delete_min(ar);
|
var _jin = ds_priority_delete_min(ar);
|
||||||
_jin.index = i;
|
_jin.index = i;
|
||||||
|
_jin.from.inputs[| 5].setValue(i);
|
||||||
ds_list_add(inputs, _jin);
|
ds_list_add(inputs, _jin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,6 +122,7 @@ function Node_Collection(_x, _y) : Node(_x, _y) constructor {
|
||||||
for( var i = custom_output_index; i < siz; i++ ) {
|
for( var i = custom_output_index; i < siz; i++ ) {
|
||||||
var _jout = ds_priority_delete_min(ar);
|
var _jout = ds_priority_delete_min(ar);
|
||||||
_jout.index = i;
|
_jout.index = i;
|
||||||
|
_jout.from.inputs[| 1].setValue(i);
|
||||||
ds_list_add(outputs, _jout);
|
ds_list_add(outputs, _jout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,4 +134,12 @@ function Node_Collection(_x, _y) : Node(_x, _y) constructor {
|
||||||
nodes[| i].destroy();
|
nodes[| i].destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static resetRenderStatus = function() {
|
||||||
|
for( var i = 0; i < ds_list_size(nodes); i++ ) {
|
||||||
|
nodes[| i].setRenderStatus(false);
|
||||||
|
if(variable_struct_exists(nodes[| i], "nodes"))
|
||||||
|
nodes[| i].resetRenderStatus();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -79,6 +79,7 @@ function Node(_x, _y) constructor {
|
||||||
if(array_length(cached_output) != ANIMATOR.frames_total + 1)
|
if(array_length(cached_output) != ANIMATOR.frames_total + 1)
|
||||||
array_resize(cached_output, ANIMATOR.frames_total + 1);
|
array_resize(cached_output, ANIMATOR.frames_total + 1);
|
||||||
}
|
}
|
||||||
|
var stack_push = false;
|
||||||
|
|
||||||
if(always_output) {
|
if(always_output) {
|
||||||
for(var i = 0; i < ds_list_size(outputs); i++) {
|
for(var i = 0; i < ds_list_size(outputs); i++) {
|
||||||
|
@ -89,14 +90,12 @@ function Node(_x, _y) constructor {
|
||||||
for(var j = 0; j < array_length(val); j++) {
|
for(var j = 0; j < array_length(val); j++) {
|
||||||
var _surf = val[j];
|
var _surf = val[j];
|
||||||
if(!is_surface(_surf) || _surf == DEF_SURFACE) {
|
if(!is_surface(_surf) || _surf == DEF_SURFACE) {
|
||||||
setRenderStatus(false);
|
stack_push = true;
|
||||||
UPDATE = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(!is_surface(val) || val == DEF_SURFACE) {
|
if(!is_surface(val) || val == DEF_SURFACE) {
|
||||||
setRenderStatus(false);
|
stack_push = true;
|
||||||
UPDATE = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,12 +107,17 @@ function Node(_x, _y) constructor {
|
||||||
doUpdate();
|
doUpdate();
|
||||||
for(var i = 0; i < ds_list_size(inputs); i++) {
|
for(var i = 0; i < ds_list_size(inputs); i++) {
|
||||||
if(inputs[| i].isAnim()) {
|
if(inputs[| i].isAnim()) {
|
||||||
setRenderStatus(false);
|
stack_push = true;
|
||||||
UPDATE = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(stack_push) {
|
||||||
|
setRenderStatus(false);
|
||||||
|
UPDATE |= RENDER_TYPE.full;
|
||||||
|
//ds_stack_push(RENDER_STACK, self);
|
||||||
|
}
|
||||||
|
|
||||||
if(auto_height)
|
if(auto_height)
|
||||||
setHeight();
|
setHeight();
|
||||||
}
|
}
|
||||||
|
@ -149,8 +153,8 @@ function Node(_x, _y) constructor {
|
||||||
|
|
||||||
static updateForward = function() {
|
static updateForward = function() {
|
||||||
rendered = false;
|
rendered = false;
|
||||||
UPDATE = true;
|
UPDATE |= RENDER_TYPE.full;
|
||||||
//if(auto_update) doUpdate();
|
//ds_stack_push(RENDER_STACK, self);
|
||||||
|
|
||||||
for(var i = 0; i < ds_list_size(outputs); i++) {
|
for(var i = 0; i < ds_list_size(outputs); i++) {
|
||||||
var jun = outputs[| i];
|
var jun = outputs[| i];
|
||||||
|
@ -299,6 +303,7 @@ function Node(_x, _y) constructor {
|
||||||
|
|
||||||
static drawConnections = function(_x, _y, mx, my, _s) {
|
static drawConnections = function(_x, _y, mx, my, _s) {
|
||||||
var xx = x * _s + _x;
|
var xx = x * _s + _x;
|
||||||
|
var hovering = noone;
|
||||||
for(var i = 0; i < ds_list_size(inputs); i++) {
|
for(var i = 0; i < ds_list_size(inputs); i++) {
|
||||||
var jun = inputs[| i];
|
var jun = inputs[| i];
|
||||||
var jx = xx;
|
var jx = xx;
|
||||||
|
@ -310,13 +315,29 @@ function Node(_x, _y) constructor {
|
||||||
|
|
||||||
var c0 = value_color(jun.value_from.type);
|
var c0 = value_color(jun.value_from.type);
|
||||||
var c1 = value_color(jun.type);
|
var c1 = value_color(jun.type);
|
||||||
|
var hover = false;
|
||||||
|
var th = max(1, 2 * _s);
|
||||||
|
|
||||||
if(PREF_MAP[? "curve_connection_line"])
|
if(PREF_MAP[? "curve_connection_line"]) {
|
||||||
draw_line_curve_color(jx, jy, frx, fry, max(1, 2 * _s), c0, c1);
|
hover = distance_to_curve(mx, my, jx, jy, frx, fry) < 6;
|
||||||
else
|
} else {
|
||||||
draw_line_width_color(jx, jy, frx, fry, max(1, 2 * _s), c0, c1);
|
hover = distance_to_line(mx, my, jx, jy, frx, fry) < 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(hover)
|
||||||
|
hovering = jun;
|
||||||
|
if(PANEL_GRAPH.junction_hovering == jun)
|
||||||
|
th *= 2;
|
||||||
|
|
||||||
|
if(PREF_MAP[? "curve_connection_line"]) {
|
||||||
|
draw_line_curve_color(jx, jy, frx, fry, th, c0, c1);
|
||||||
|
} else {
|
||||||
|
draw_line_width_color(jx, jy, frx, fry, th, c0, c1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return hovering;
|
||||||
}
|
}
|
||||||
|
|
||||||
static drawPreview = function(_node, xx, yy, _s) {
|
static drawPreview = function(_node, xx, yy, _s) {
|
||||||
|
|
12
scripts/node_display_text/node_checkerboard.yy
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"isDnD": false,
|
||||||
|
"isCompatibility": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "generator",
|
||||||
|
"path": "folders/nodes/data/generator.yy",
|
||||||
|
},
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_checkerboard",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
}
|
73
scripts/node_display_text/node_display_text.gml
Normal file
|
@ -0,0 +1,73 @@
|
||||||
|
function Node_create_Display_Text(_x, _y) {
|
||||||
|
var node = new Node_Display_Text(_x, _y);
|
||||||
|
ds_list_add(PANEL_GRAPH.nodes_list, node);
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
function Node_Display_Text(_x, _y) : Node(_x, _y) constructor {
|
||||||
|
name = "Display text";
|
||||||
|
w = 240;
|
||||||
|
h = 160;
|
||||||
|
min_h = 0;
|
||||||
|
bg_spr = s_node_frame_bg;
|
||||||
|
bg_sel_spr = s_node_frame_bg_active;
|
||||||
|
|
||||||
|
size_dragging = false;
|
||||||
|
size_dragging_w = w;
|
||||||
|
size_dragging_h = h;
|
||||||
|
size_dragging_mx = w;
|
||||||
|
size_dragging_my = h;
|
||||||
|
|
||||||
|
auto_height = false;
|
||||||
|
name_hover = false;
|
||||||
|
draw_scale = 1;
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue(0, "Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white );
|
||||||
|
|
||||||
|
inputs[| 1] = nodeValue(1, "Text", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "Text");
|
||||||
|
|
||||||
|
inputs[| 2] = nodeValue(2, "Style", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Header", "Sub header", "Normal"])
|
||||||
|
|
||||||
|
inputs[| 3] = nodeValue(3, "Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.75)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01])
|
||||||
|
|
||||||
|
input_display_list = [1,
|
||||||
|
["Styling", false], 2, 0, 3];
|
||||||
|
|
||||||
|
static drawNodeBase = function(xx, yy, _s) {
|
||||||
|
var color = inputs[| 0].getValue();
|
||||||
|
var txt = inputs[| 1].getValue();
|
||||||
|
if(txt == "") txt = "..."
|
||||||
|
var sty = inputs[| 2].getValue();
|
||||||
|
var alp = inputs[| 3].getValue();
|
||||||
|
var font = f_p1;
|
||||||
|
switch(sty) {
|
||||||
|
case 0 : font = f_h3; break;
|
||||||
|
case 1 : font = f_h5; break;
|
||||||
|
case 2 : font = f_p1; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
draw_set_alpha(alp);
|
||||||
|
draw_set_text(font, fa_left, fa_top, color);
|
||||||
|
draw_text_transformed(xx + 4, yy + 4, txt, _s, _s, 0);
|
||||||
|
draw_set_alpha(1);
|
||||||
|
|
||||||
|
draw_scale = _s;
|
||||||
|
w = string_width(txt) + 8;
|
||||||
|
h = string_height(txt) + 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
static drawNode = function(_x, _y, _mx, _my, _s) {
|
||||||
|
var xx = x * _s + _x;
|
||||||
|
var yy = y * _s + _y;
|
||||||
|
|
||||||
|
if(active_draw_index > -1) {
|
||||||
|
draw_sprite_stretched(bg_sel_spr, active_draw_index, xx, yy, w * _s, h * _s);
|
||||||
|
active_draw_index = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
drawNodeBase(xx, yy, _s);
|
||||||
|
return noone;
|
||||||
|
}
|
||||||
|
}
|
12
scripts/node_display_text/node_display_text.yy
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"isDnD": false,
|
||||||
|
"isCompatibility": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "node",
|
||||||
|
"path": "folders/nodes/data/node.yy",
|
||||||
|
},
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_display_text",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
}
|
12
scripts/node_display_text/node_stripe.yy
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"isDnD": false,
|
||||||
|
"isCompatibility": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "generator",
|
||||||
|
"path": "folders/nodes/data/generator.yy",
|
||||||
|
},
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_stripe",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
}
|
|
@ -21,10 +21,9 @@ function Node_Frame(_x, _y) : Node(_x, _y) constructor {
|
||||||
name_hover = false;
|
name_hover = false;
|
||||||
|
|
||||||
inputs[| 0] = nodeValue(0, "Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 240, 160 ] )
|
inputs[| 0] = nodeValue(0, "Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 240, 160 ] )
|
||||||
.setDisplay(VALUE_DISPLAY.vector)
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 1] = nodeValue(1, "Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white );
|
||||||
inputs[| 1] = nodeValue(1, "Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white )
|
|
||||||
|
|
||||||
|
|
||||||
static step = function() {
|
static step = function() {
|
||||||
|
|
|
@ -135,9 +135,14 @@ function Node_Group_Input(_x, _y, _group) : Node(_x, _y) constructor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static createInput = function() {
|
static createInput = function(override_order = true) {
|
||||||
if(group && is_struct(group)) {
|
if(group && is_struct(group)) {
|
||||||
input_index = inputs[| 5].getValue();
|
if(override_order) {
|
||||||
|
input_index = ds_list_size(group.inputs);
|
||||||
|
inputs[| 5].setValue(input_index);
|
||||||
|
} else {
|
||||||
|
input_index = inputs[| 5].getValue();
|
||||||
|
}
|
||||||
|
|
||||||
inParent = nodeValue(ds_list_size(group.inputs), "Value", group, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1)
|
inParent = nodeValue(ds_list_size(group.inputs), "Value", group, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1)
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
|
@ -191,7 +196,7 @@ function Node_Group_Input(_x, _y, _group) : Node(_x, _y) constructor {
|
||||||
}
|
}
|
||||||
|
|
||||||
static postDeserialize = function() {
|
static postDeserialize = function() {
|
||||||
createInput();
|
createInput(false);
|
||||||
onValueUpdate(0);
|
onValueUpdate(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ function Node_create_Iterate(_x, _y) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function Node_Iterate(_x, _y) : Node_Collection(_x, _y) constructor {
|
function Node_Iterate(_x, _y) : Node_Collection(_x, _y) constructor {
|
||||||
name = "Iterate";
|
name = "Loop";
|
||||||
color = c_ui_lime;
|
color = c_ui_lime;
|
||||||
icon = s_group_16;
|
icon = s_group_16;
|
||||||
|
|
||||||
|
@ -27,17 +27,13 @@ function Node_Iterate(_x, _y) : Node_Collection(_x, _y) constructor {
|
||||||
iter &= _out.rendered;
|
iter &= _out.rendered;
|
||||||
}
|
}
|
||||||
|
|
||||||
//show_debug_message("get output from iteration " + string(iterated));
|
|
||||||
|
|
||||||
if(iter) {
|
if(iter) {
|
||||||
if(++iterated == inputs[| 0].getValue())
|
if(++iterated == inputs[| 0].getValue())
|
||||||
return 2;
|
return 2;
|
||||||
else if(iterated > inputs[| 0].getValue())
|
else if(iterated > inputs[| 0].getValue())
|
||||||
return 3;
|
return 3;
|
||||||
|
|
||||||
for( var i = 0; i < ds_list_size(nodes); i++ ) {
|
resetRenderStatus();
|
||||||
nodes[| i].setRenderStatus(false);
|
|
||||||
}
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,10 @@ function Node_Iterator_Index(_x, _y) : Node(_x, _y) constructor {
|
||||||
w = 96;
|
w = 96;
|
||||||
min_h = 32 + 24 * 1;
|
min_h = 32 + 24 * 1;
|
||||||
|
|
||||||
outputs[| 0] = nodeValue(0, "Index", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, 0);
|
outputs[| 0] = nodeValue(0, "Loop index", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, 0);
|
||||||
|
|
||||||
static update = function() {
|
static update = function() {
|
||||||
outputs[| 0].setValue(group.iterated);
|
if(variable_struct_exists(group, "iterated"))
|
||||||
|
outputs[| 0].setValue(group.iterated);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -49,6 +49,8 @@ function Node_Iterator_Input(_x, _y, _group) : Node(_x, _y) constructor {
|
||||||
outputs[| 0].getValueDefault = method(outputs[| 0], outputs[| 0].getValueRecursive);
|
outputs[| 0].getValueDefault = method(outputs[| 0], outputs[| 0].getValueRecursive);
|
||||||
outputs[| 0].getValueRecursive = function() {
|
outputs[| 0].getValueRecursive = function() {
|
||||||
//show_debug_message("iteration " + string(group.iterated));
|
//show_debug_message("iteration " + string(group.iterated));
|
||||||
|
if(!variable_struct_exists(group, "iterated"))
|
||||||
|
return outputs[| 0].getValueDefault();
|
||||||
|
|
||||||
var _local_output = noone;
|
var _local_output = noone;
|
||||||
for( var i = 0; i < ds_list_size(outputs[| 1].value_to); i++ ) {
|
for( var i = 0; i < ds_list_size(outputs[| 1].value_to); i++ ) {
|
||||||
|
@ -157,9 +159,14 @@ function Node_Iterator_Input(_x, _y, _group) : Node(_x, _y) constructor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static createInput = function() {
|
static createInput = function(override_order = true) {
|
||||||
if(group && is_struct(group)) {
|
if(group && is_struct(group)) {
|
||||||
input_index = inputs[| 5].getValue();
|
if(override_order = true) {
|
||||||
|
input_index = ds_list_size(group.inputs);
|
||||||
|
inputs[| 5].setValue(input_index);
|
||||||
|
} else {
|
||||||
|
input_index = inputs[| 5].getValue();
|
||||||
|
}
|
||||||
|
|
||||||
inParent = nodeValue(ds_list_size(group.inputs), "Value", group, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1)
|
inParent = nodeValue(ds_list_size(group.inputs), "Value", group, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1)
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
|
@ -213,7 +220,7 @@ function Node_Iterator_Input(_x, _y, _group) : Node(_x, _y) constructor {
|
||||||
}
|
}
|
||||||
|
|
||||||
static postDeserialize = function() {
|
static postDeserialize = function() {
|
||||||
createInput();
|
createInput(false);
|
||||||
onValueUpdate(0);
|
onValueUpdate(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,44 @@
|
||||||
function Node_create_Math(_x, _y) {
|
enum MATH_OPERATOR {
|
||||||
|
add,
|
||||||
|
subtract,
|
||||||
|
multiply,
|
||||||
|
divide,
|
||||||
|
power,
|
||||||
|
root,
|
||||||
|
|
||||||
|
sin,
|
||||||
|
cos,
|
||||||
|
tan,
|
||||||
|
|
||||||
|
modulo,
|
||||||
|
|
||||||
|
floor,
|
||||||
|
ceiling,
|
||||||
|
round,
|
||||||
|
}
|
||||||
|
|
||||||
|
function Node_create_Math(_x, _y, _param = "") {
|
||||||
var node = new Node_Math(_x, _y);
|
var node = new Node_Math(_x, _y);
|
||||||
|
|
||||||
|
switch(_param) {
|
||||||
|
case "add" : node.inputs[| 0].setValue(MATH_OPERATOR.add); break;
|
||||||
|
case "subtract" : node.inputs[| 0].setValue(MATH_OPERATOR.subtract); break;
|
||||||
|
case "multiply" : node.inputs[| 0].setValue(MATH_OPERATOR.multiply); break;
|
||||||
|
case "divide" : node.inputs[| 0].setValue(MATH_OPERATOR.divide); break;
|
||||||
|
case "power" : node.inputs[| 0].setValue(MATH_OPERATOR.power); break;
|
||||||
|
case "root" : node.inputs[| 0].setValue(MATH_OPERATOR.root); break;
|
||||||
|
|
||||||
|
case "sin" : node.inputs[| 0].setValue(MATH_OPERATOR.sin); break;
|
||||||
|
case "cos" : node.inputs[| 0].setValue(MATH_OPERATOR.cos); break;
|
||||||
|
case "tan" : node.inputs[| 0].setValue(MATH_OPERATOR.tan); break;
|
||||||
|
|
||||||
|
case "modulo" : node.inputs[| 0].setValue(MATH_OPERATOR.modulo); break;
|
||||||
|
|
||||||
|
case "floor" : node.inputs[| 0].setValue(MATH_OPERATOR.floor); break;
|
||||||
|
case "ceiling" : node.inputs[| 0].setValue(MATH_OPERATOR.ceiling); break;
|
||||||
|
case "round" : node.inputs[| 0].setValue(MATH_OPERATOR.round); break;
|
||||||
|
}
|
||||||
|
|
||||||
ds_list_add(PANEL_GRAPH.nodes_list, node);
|
ds_list_add(PANEL_GRAPH.nodes_list, node);
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +52,9 @@ function Node_Math(_x, _y) : Node_Value_Processor(_x, _y) constructor {
|
||||||
min_h = 0;
|
min_h = 0;
|
||||||
|
|
||||||
inputs[| 0] = nodeValue(0, "Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
inputs[| 0] = nodeValue(0, "Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Add", "Subtract", "Multiply", "Divide", "Power", "Root", "Sin", "Cos", "Tan" ]);
|
.setDisplay(VALUE_DISPLAY.enum_scroll, [
|
||||||
|
/* 0 - 9*/ "Add", "Subtract", "Multiply", "Divide", "Power", "Root", "Sin", "Cos", "Tan", "Modulo",
|
||||||
|
/*10 - 12*/ "Floor", "Ceil", "Round" ]);
|
||||||
|
|
||||||
inputs[| 1] = nodeValue(1, "a", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
inputs[| 1] = nodeValue(1, "a", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
|
@ -24,32 +65,41 @@ function Node_Math(_x, _y) : Node_Value_Processor(_x, _y) constructor {
|
||||||
|
|
||||||
function process_value_data(_data, index = 0) {
|
function process_value_data(_data, index = 0) {
|
||||||
switch(_data[0]) {
|
switch(_data[0]) {
|
||||||
case 0 :
|
case MATH_OPERATOR.add :
|
||||||
case 1 :
|
case MATH_OPERATOR.subtract :
|
||||||
case 2 :
|
case MATH_OPERATOR.multiply :
|
||||||
case 3 :
|
case MATH_OPERATOR.divide :
|
||||||
case 4 :
|
case MATH_OPERATOR.power :
|
||||||
case 5 :
|
case MATH_OPERATOR.root :
|
||||||
|
case MATH_OPERATOR.modulo :
|
||||||
inputs[| 2].setVisible(true);
|
inputs[| 2].setVisible(true);
|
||||||
break;
|
break;
|
||||||
case 6 :
|
case MATH_OPERATOR.sin :
|
||||||
case 7 :
|
case MATH_OPERATOR.cos :
|
||||||
case 8 :
|
case MATH_OPERATOR.tan :
|
||||||
|
case MATH_OPERATOR.floor :
|
||||||
|
case MATH_OPERATOR.ceiling :
|
||||||
|
case MATH_OPERATOR.round :
|
||||||
inputs[| 2].setVisible(false);
|
inputs[| 2].setVisible(false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(_data[0]) {
|
switch(_data[0]) {
|
||||||
case 0 : return _data[1] + _data[2]; break;
|
case MATH_OPERATOR.add : return _data[1] + _data[2]; break;
|
||||||
case 1 : return _data[1] - _data[2]; break;
|
case MATH_OPERATOR.subtract : return _data[1] - _data[2]; break;
|
||||||
case 2 : return _data[1] * _data[2]; break;
|
case MATH_OPERATOR.multiply : return _data[1] * _data[2]; break;
|
||||||
case 3 : return _data[1] / _data[2]; break;
|
case MATH_OPERATOR.divide : return _data[1] / _data[2]; break;
|
||||||
case 4 : return power(_data[1], _data[2]); break;
|
case MATH_OPERATOR.power : return power(_data[1], _data[2]); break;
|
||||||
case 5 : return power(_data[1], 1 / _data[2]); break;
|
case MATH_OPERATOR.root : return power(_data[1], 1 / _data[2]); break;
|
||||||
|
|
||||||
case 6 : return sin(_data[1]); break;
|
case MATH_OPERATOR.sin : return sin(_data[1]); break;
|
||||||
case 7 : return cos(_data[1]); break;
|
case MATH_OPERATOR.cos : return cos(_data[1]); break;
|
||||||
case 8 : return tan(_data[1]); break;
|
case MATH_OPERATOR.tan : return tan(_data[1]); break;
|
||||||
|
case MATH_OPERATOR.modulo : return safe_mod(_data[1], _data[2]); break;
|
||||||
|
|
||||||
|
case MATH_OPERATOR.floor : return floor(_data[1]); break;
|
||||||
|
case MATH_OPERATOR.ceiling : return ceil(_data[1]); break;
|
||||||
|
case MATH_OPERATOR.round : return round(_data[1]); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _data[1];
|
return _data[1];
|
||||||
|
@ -58,23 +108,31 @@ function Node_Math(_x, _y) : Node_Value_Processor(_x, _y) constructor {
|
||||||
doUpdate();
|
doUpdate();
|
||||||
|
|
||||||
function onDrawNode(xx, yy, _mx, _my, _s) {
|
function onDrawNode(xx, yy, _mx, _my, _s) {
|
||||||
draw_set_text(f_h5, fa_center, fa_center, c_white);
|
draw_set_text(f_h3, fa_center, fa_center, c_white);
|
||||||
var str;
|
var str;
|
||||||
switch(inputs[| 0].getValue()) {
|
switch(inputs[| 0].getValue()) {
|
||||||
case 0 : str = "+"; break;
|
case MATH_OPERATOR.add : str = "+"; break;
|
||||||
case 1 : str = "-"; break;
|
case MATH_OPERATOR.subtract : str = "-"; break;
|
||||||
case 2 : str = "*"; break;
|
case MATH_OPERATOR.multiply : str = "*"; break;
|
||||||
case 3 : str = "/"; break;
|
case MATH_OPERATOR.divide : str = "/"; break;
|
||||||
case 4 : str = "pow";; break;
|
case MATH_OPERATOR.power : str = "pow";; break;
|
||||||
case 5 : str = "root"; break;
|
case MATH_OPERATOR.root : str = "root"; break;
|
||||||
|
|
||||||
case 6 : str = "sin"; break;
|
case MATH_OPERATOR.sin : str = "sin"; break;
|
||||||
case 7 : str = "cos"; break;
|
case MATH_OPERATOR.cos : str = "cos"; break;
|
||||||
case 8 : str = "tan"; break;
|
case MATH_OPERATOR.tan : str = "tan"; break;
|
||||||
|
case MATH_OPERATOR.modulo : str = "mod"; break;
|
||||||
|
|
||||||
|
case MATH_OPERATOR.floor : str = "floor"; break;
|
||||||
|
case MATH_OPERATOR.ceiling : str = "ceil"; break;
|
||||||
|
case MATH_OPERATOR.round : str = "round"; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ss = min((w - 8) * _s / string_width(str), (h - 8) * _s / string_height(str));
|
var _ss = min((w - 16) * _s / string_width(str), (h - 18) * _s / string_height(str));
|
||||||
|
|
||||||
draw_text_transformed(xx + w / 2 * _s, yy + 10 + h / 2 * _s, str, _ss, _ss, 0);
|
if(_s * w > 48)
|
||||||
|
draw_text_transformed(xx + w / 2 * _s, yy + 10 + h / 2 * _s, str, _ss, _ss, 0);
|
||||||
|
else
|
||||||
|
draw_text_transformed(xx + w / 2 * _s, yy + h / 2 * _s, str, _ss, _ss, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -6,7 +6,7 @@ function Node_create_Pin(_x, _y) {
|
||||||
|
|
||||||
function Node_Pin(_x, _y) : Node(_x, _y) constructor {
|
function Node_Pin(_x, _y) : Node(_x, _y) constructor {
|
||||||
name = "";
|
name = "";
|
||||||
w = 64;
|
w = 32;
|
||||||
h = 32;
|
h = 32;
|
||||||
min_h = 0;
|
min_h = 0;
|
||||||
auto_height = false;
|
auto_height = false;
|
||||||
|
|
|
@ -5,8 +5,8 @@ function NodeObject(_name, _spr, _create, tags = []) constructor {
|
||||||
|
|
||||||
self.tags = tags;
|
self.tags = tags;
|
||||||
|
|
||||||
function build(_x, _y) {
|
function build(_x, _y, _param = "") {
|
||||||
var _node = createNode(_x, _y);
|
var _node = createNode(_x, _y, _param);
|
||||||
return _node;
|
return _node;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ function NodeObject(_name, _spr, _create, tags = []) constructor {
|
||||||
|
|
||||||
var number = ds_list_create();
|
var number = ds_list_create();
|
||||||
addNodeCatagory("Number", number);
|
addNodeCatagory("Number", number);
|
||||||
addNodeObject(number, "Math", s_node_math, "Node_Math", Node_create_Math);
|
addNodeObject(number, "Math", s_node_math, "Node_Math", Node_create_Math, ["add", "subtract", "multiply", "divide", "power", "modulo", "round", "ceiling", "floor", "sin", "cos", "tan"]);
|
||||||
addNodeObject(number, "Array", s_node_array, "Node_Array", Node_create_Array);
|
addNodeObject(number, "Array", s_node_array, "Node_Array", Node_create_Array);
|
||||||
addNodeObject(number, "Array length", s_node_array_length, "Node_Array_Length", Node_create_Array_Length);
|
addNodeObject(number, "Array length", s_node_array_length, "Node_Array_Length", Node_create_Array_Length);
|
||||||
addNodeObject(number, "Array get", s_node_array_get, "Node_Array_Get", Node_create_Array_Get);
|
addNodeObject(number, "Array get", s_node_array_get, "Node_Array_Get", Node_create_Array_Get);
|
||||||
|
@ -195,11 +195,13 @@ function NodeObject(_name, _spr, _create, tags = []) constructor {
|
||||||
|
|
||||||
var node = ds_list_create();
|
var node = ds_list_create();
|
||||||
addNodeCatagory("Node", node);
|
addNodeCatagory("Node", node);
|
||||||
addNodeObject(node, "Pin", s_node_pin, "Node_Pin", Node_create_Pin);
|
addNodeObject(node, "Pin", s_node_pin, "Node_Pin", Node_create_Pin);
|
||||||
addNodeObject(node, "Frame", s_node_frame, "Node_Frame", Node_create_Frame);
|
addNodeObject(node, "Frame", s_node_frame, "Node_Frame", Node_create_Frame);
|
||||||
addNodeObject(node, "Condition", s_node_condition, "Node_Condition", Node_create_Condition);
|
addNodeObject(node, "Display text", s_node_frame, "Node_Display_Text", Node_create_Display_Text);
|
||||||
|
addNodeObject(node, "Condition", s_node_condition, "Node_Condition", Node_create_Condition);
|
||||||
|
|
||||||
NODE_CREATE_FUCTION[? "Node_Group"] = Node_create_Group;
|
NODE_CREATE_FUCTION[? "Node_Group"] = Node_create_Group;
|
||||||
|
NODE_CREATE_FUCTION[? "Node_Iterate"] = Node_create_Iterate;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region node function
|
#region node function
|
||||||
|
|
|
@ -12,11 +12,14 @@ function Node_Solid(_x, _y) : Node(_x, _y) constructor {
|
||||||
|
|
||||||
inputs[| 1] = nodeValue(1, "Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white);
|
inputs[| 1] = nodeValue(1, "Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white);
|
||||||
|
|
||||||
|
inputs[| 2] = nodeValue(2, "Empty", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
||||||
|
|
||||||
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, surface_create(1, 1));
|
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, surface_create(1, 1));
|
||||||
|
|
||||||
static update = function() {
|
static update = function() {
|
||||||
var _dim = inputs[| 0].getValue();
|
var _dim = inputs[| 0].getValue();
|
||||||
var _col = inputs[| 1].getValue();
|
var _col = inputs[| 1].getValue();
|
||||||
|
var _emp = inputs[| 2].getValue();
|
||||||
|
|
||||||
var _outSurf = outputs[| 0].getValue();
|
var _outSurf = outputs[| 0].getValue();
|
||||||
if(!is_surface(_outSurf)) {
|
if(!is_surface(_outSurf)) {
|
||||||
|
@ -26,7 +29,10 @@ function Node_Solid(_x, _y) : Node(_x, _y) constructor {
|
||||||
surface_size_to(_outSurf, surface_valid(_dim[0]), surface_valid(_dim[1]));
|
surface_size_to(_outSurf, surface_valid(_dim[0]), surface_valid(_dim[1]));
|
||||||
|
|
||||||
surface_set_target(_outSurf);
|
surface_set_target(_outSurf);
|
||||||
draw_clear(_col);
|
if(_emp)
|
||||||
|
draw_clear_alpha(0, 0);
|
||||||
|
else
|
||||||
|
draw_clear(_col);
|
||||||
surface_reset_target();
|
surface_reset_target();
|
||||||
}
|
}
|
||||||
doUpdate();
|
doUpdate();
|
||||||
|
|
|
@ -1,20 +1,94 @@
|
||||||
|
function DirectoryObject(name, path) constructor {
|
||||||
|
self.name = name;
|
||||||
|
self.path = path;
|
||||||
|
|
||||||
|
subDir = ds_list_create();
|
||||||
|
open = false;
|
||||||
|
|
||||||
|
static destroy = function() {
|
||||||
|
ds_list_destroy(subDir);
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSub = function() {
|
||||||
|
var _temp_name = ds_list_create();
|
||||||
|
var folder = file_find_first(path + "/*", fa_directory);
|
||||||
|
while(folder != "") {
|
||||||
|
ds_list_add(_temp_name, folder);
|
||||||
|
folder = file_find_next();
|
||||||
|
}
|
||||||
|
file_find_close();
|
||||||
|
|
||||||
|
ds_list_clear(subDir);
|
||||||
|
|
||||||
|
ds_list_sort(_temp_name, true);
|
||||||
|
for( var i = 0; i < ds_list_size(_temp_name); i++ ) {
|
||||||
|
var file = _temp_name[| i];
|
||||||
|
|
||||||
|
if(directory_exists(path + "/" + file)) {
|
||||||
|
var _fol_path = path + "/" + file;
|
||||||
|
var fol = new DirectoryObject(file, _fol_path);
|
||||||
|
ds_list_add(subDir, fol);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ds_list_destroy(_temp_name);
|
||||||
|
}
|
||||||
|
getSub();
|
||||||
|
|
||||||
|
static draw = function(_x, _y, _m, _w) {
|
||||||
|
var hg = 28;
|
||||||
|
var hh = 0;
|
||||||
|
|
||||||
|
if(path == PANEL_COLLECTION.context.path)
|
||||||
|
draw_sprite_stretched_ext(s_ui_panel_bg, 0, _x, _y, _w, hg, c_ui_blue_ltgrey, 1);
|
||||||
|
|
||||||
|
if(HOVER == PANEL_COLLECTION.panel && point_in_rectangle(_m[0], _m[1], 0, _y, _w, _y + hg - 1)) {
|
||||||
|
draw_sprite_stretched_ext(s_ui_panel_bg, 0, _x, _y, _w, hg, c_ui_blue_white, 1);
|
||||||
|
if(FOCUS == PANEL_COLLECTION.panel && mouse_check_button_pressed(mb_left)) {
|
||||||
|
open = !open;
|
||||||
|
|
||||||
|
if(PANEL_COLLECTION.context = self)
|
||||||
|
PANEL_COLLECTION.setContext(COLLECTIONS);
|
||||||
|
else
|
||||||
|
PANEL_COLLECTION.setContext(self);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
draw_set_text(f_p0, fa_left, fa_center, c_white);
|
||||||
|
if(ds_list_empty(subDir)) {
|
||||||
|
draw_sprite_ext(s_folder_24, 0, _x + 16, _y + hg / 2 - 1, 1, 1, 0, c_ui_blue_dkgrey, 1);
|
||||||
|
} else {
|
||||||
|
draw_sprite_ext(s_folder_content_24, open, _x + 16, _y + hg / 2 - 1, 1, 1, 0, c_ui_blue_grey, 1);
|
||||||
|
}
|
||||||
|
draw_text(_x + 8 + 24, _y + hg / 2, name);
|
||||||
|
hh += hg;
|
||||||
|
_y += hg;
|
||||||
|
|
||||||
|
if(open) {
|
||||||
|
for(var i = 0; i < ds_list_size(subDir); i++) {
|
||||||
|
var hg = subDir[| i].draw(_x + 16, _y, _m, _w - 16);
|
||||||
|
hh += hg;
|
||||||
|
_y += hg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return hh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function Panel_Collection(_panel) : PanelContent(_panel) constructor {
|
function Panel_Collection(_panel) : PanelContent(_panel) constructor {
|
||||||
group_w = 160;
|
group_w = 180;
|
||||||
content_w = w - 24 - group_w;
|
content_w = w - 24 - group_w;
|
||||||
content_h = h - 32 - 16;
|
content_h = h - 32 - 16;
|
||||||
|
|
||||||
min_w = group_w + 40;
|
min_w = group_w + 40;
|
||||||
min_h = 40;
|
min_h = 40;
|
||||||
|
|
||||||
context = ds_list_create();
|
context = COLLECTIONS;
|
||||||
ds_list_add(context, COLLECTIONS);
|
|
||||||
page_key = "";
|
|
||||||
|
|
||||||
folder_list = ds_list_create();
|
|
||||||
content_list = ds_list_create();
|
content_list = ds_list_create();
|
||||||
|
|
||||||
file_dragging = noone;
|
file_dragging = noone;
|
||||||
readonly = false;
|
|
||||||
|
|
||||||
_menu_node = noone;
|
_menu_node = noone;
|
||||||
contentPane = new scrollPane(content_w, content_h, function(_y, _m) {
|
contentPane = new scrollPane(content_w, content_h, function(_y, _m) {
|
||||||
|
@ -54,11 +128,9 @@ function Panel_Collection(_panel) : PanelContent(_panel) constructor {
|
||||||
dia.setMenu([
|
dia.setMenu([
|
||||||
[ "Replace with selected", function() {
|
[ "Replace with selected", function() {
|
||||||
saveCollection(_menu_node.path, false);
|
saveCollection(_menu_node.path, false);
|
||||||
searchFolder();
|
|
||||||
} ],
|
} ],
|
||||||
[ "Delete", function() {
|
[ "Delete", function() {
|
||||||
file_delete(_menu_node.path);
|
file_delete(_menu_node.path);
|
||||||
searchFolder();
|
|
||||||
} ],
|
} ],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -86,112 +158,12 @@ function Panel_Collection(_panel) : PanelContent(_panel) constructor {
|
||||||
|
|
||||||
folderPane = new scrollPane(group_w - 8, content_h, function(_y, _m) {
|
folderPane = new scrollPane(group_w - 8, content_h, function(_y, _m) {
|
||||||
draw_clear(c_ui_blue_black);
|
draw_clear(c_ui_blue_black);
|
||||||
|
var hh = 0;
|
||||||
|
|
||||||
var hh = 0;
|
for(var i = 0; i < ds_list_size(COLLECTIONS.subDir); i++) {
|
||||||
var hg = 28;
|
var hg = COLLECTIONS.subDir[| i].draw(8, _y, _m, folderPane.w - 16);
|
||||||
var key = "";
|
hh += hg;
|
||||||
var con = getCurrentContext();
|
_y += hg;
|
||||||
|
|
||||||
if(con) {
|
|
||||||
if(con.path == "") {
|
|
||||||
for(var i = 0; i < ds_list_size(NODE_CATAGORY); i++) {
|
|
||||||
var key = NODE_CATAGORY[| i];
|
|
||||||
|
|
||||||
if(key == page_key) {
|
|
||||||
draw_sprite_stretched_ext(s_ui_panel_bg, 0, 8, _y, folderPane.w - 16, hg, c_ui_blue_ltgrey, 1);
|
|
||||||
} else if(HOVER == panel && point_in_rectangle(_m[0], _m[1], 0, _y, group_w + 16, _y + hg - 1)) {
|
|
||||||
draw_sprite_stretched_ext(s_ui_panel_bg, 0, 8, _y, folderPane.w - 16, hg, c_ui_blue_white, 1);
|
|
||||||
if(FOCUS == panel && mouse_check_button_pressed(mb_left)) {
|
|
||||||
ds_list_copy(content_list, ALL_NODES[? key]);
|
|
||||||
page_key = key;
|
|
||||||
contentPane.scroll_y = 0;
|
|
||||||
contentPane.scroll_y_to = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
draw_set_text(f_p0, fa_left, fa_center, c_white);
|
|
||||||
draw_text(16, _y + hg / 2, key);
|
|
||||||
hh += hg;
|
|
||||||
_y += hg;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for(var i = 0; i < ds_list_size(folder_list); i++) {
|
|
||||||
folder = folder_list[| i];
|
|
||||||
|
|
||||||
if(folder.name == page_key) {
|
|
||||||
draw_sprite_stretched_ext(s_ui_panel_bg, 0, 8, _y, folderPane.w - 16, hg, c_ui_blue_ltgrey, 1);
|
|
||||||
} else if(HOVER == panel && point_in_rectangle(_m[0], _m[1], 0, _y, group_w + 16, _y + hg - 1)) {
|
|
||||||
draw_sprite_stretched_ext(s_ui_panel_bg, 0, 8, _y, folderPane.w - 16, hg, c_ui_blue_white, 1);
|
|
||||||
if(FOCUS == panel && mouse_check_button_pressed(mb_left)) {
|
|
||||||
ds_list_add(context, folder);
|
|
||||||
searchFolder();
|
|
||||||
|
|
||||||
contentPane.scroll_y = 0;
|
|
||||||
contentPane.scroll_y_to = 0;
|
|
||||||
file_find_close();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(FOCUS == panel && mouse_check_button_pressed(mb_right)) {
|
|
||||||
var dia = dialogCall(o_dialog_menubox, mouse_mx + 8, mouse_my + 8);
|
|
||||||
dia.setMenu([
|
|
||||||
[ "Delete", function() {
|
|
||||||
directory_destroy(folder.path);
|
|
||||||
searchFolder();
|
|
||||||
} ],
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
draw_set_text(f_p0, fa_left, fa_center, c_white);
|
|
||||||
if(folder.path == "") {
|
|
||||||
draw_text(16, _y + hg / 2, folder.name);
|
|
||||||
} else {
|
|
||||||
draw_sprite_ext(s_folder_24, 0, 16 + 8, _y + hg / 2 - 1, 1, 1, 0, c_ui_blue_grey, 1);
|
|
||||||
draw_text(16 + 24, _y + hg / 2, folder.name);
|
|
||||||
}
|
|
||||||
hh += hg;
|
|
||||||
_y += hg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for(var i = 0; i < ds_list_size(COLLECTIONS); i++) {
|
|
||||||
folder = COLLECTIONS[| i];
|
|
||||||
|
|
||||||
if(HOVER == panel && point_in_rectangle(_m[0], _m[1], 0, _y, group_w + 16, _y + hg - 1)) {
|
|
||||||
draw_sprite_stretched_ext(s_ui_panel_bg, 0, 8, _y, folderPane.w - 16, hg, c_ui_blue_white, 1);
|
|
||||||
|
|
||||||
if(FOCUS == panel && mouse_check_button_pressed(mb_left)) {
|
|
||||||
readonly = i == 0;
|
|
||||||
ds_list_add(context, folder);
|
|
||||||
searchFolder();
|
|
||||||
|
|
||||||
contentPane.scroll_y = 0;
|
|
||||||
contentPane.scroll_y_to = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(FOCUS == panel && mouse_check_button_pressed(mb_right)) {
|
|
||||||
if(folder.path != "") {
|
|
||||||
var dia = dialogCall(o_dialog_menubox, mouse_mx + 8, mouse_my + 8);
|
|
||||||
dia.setMenu([
|
|
||||||
[ "Delete", function() {
|
|
||||||
directory_destroy(folder.path);
|
|
||||||
searchFolder();
|
|
||||||
} ],
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
draw_set_text(f_p0, fa_left, fa_center, c_white);
|
|
||||||
if(folder.path == "") {
|
|
||||||
draw_text(16, _y + hg / 2, folder.name);
|
|
||||||
} else {
|
|
||||||
draw_sprite_ext(s_folder_24, 0, 16 + 8, _y + hg / 2 - 1, 1, 1, 0, c_ui_blue_grey, 1);
|
|
||||||
draw_text(16 + 24, _y + hg / 2, folder.name);
|
|
||||||
}
|
|
||||||
hh += hg;
|
|
||||||
_y += hg;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return hh;
|
return hh;
|
||||||
|
@ -209,51 +181,43 @@ function Panel_Collection(_panel) : PanelContent(_panel) constructor {
|
||||||
return _node.build(0, 0);
|
return _node.build(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchFolder() {
|
function setContext(cont) {
|
||||||
|
context = cont;
|
||||||
|
searchContent();
|
||||||
|
contentPane.scroll_y_raw = 0;
|
||||||
|
contentPane.scroll_y_to = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function searchContent() {
|
||||||
if(content_list != -1 && ds_exists(content_list, ds_type_list)) {
|
if(content_list != -1 && ds_exists(content_list, ds_type_list)) {
|
||||||
if(!readonly) {
|
for( var i = 0; i < ds_list_size(content_list); i++ ) {
|
||||||
for( var i = 0; i < ds_list_size(content_list); i++ ) {
|
var _f = content_list[| i];
|
||||||
var _f = content_list[| i];
|
if(_f.spr && sprite_exists(_f.spr))
|
||||||
if(_f.spr && sprite_exists(_f.spr))
|
sprite_delete(_f.spr);
|
||||||
sprite_delete(_f.spr);
|
delete _f;
|
||||||
delete _f;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ds_list_clear(content_list);
|
ds_list_clear(content_list);
|
||||||
} else
|
} else
|
||||||
content_list = ds_list_create();
|
content_list = ds_list_create();
|
||||||
|
|
||||||
contentPane.scroll_y = 0;
|
var _path = context.path;
|
||||||
contentPane.scroll_y_to = 0;
|
|
||||||
|
|
||||||
var _curr = getCurrentContext();
|
|
||||||
if(_curr == -1 || _curr.path == "") {
|
|
||||||
searchCollections();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var _temp_name = ds_list_create();
|
var _temp_name = ds_list_create();
|
||||||
var folder = file_find_first(_curr.path + "/*", fa_directory);
|
var folder = file_find_first(_path + "/*", fa_directory);
|
||||||
while(folder != "") {
|
while(folder != "") {
|
||||||
ds_list_add(_temp_name, folder);
|
ds_list_add(_temp_name, folder);
|
||||||
folder = file_find_next();
|
folder = file_find_next();
|
||||||
}
|
}
|
||||||
file_find_close();
|
file_find_close();
|
||||||
|
|
||||||
ds_list_clear(folder_list);
|
|
||||||
|
|
||||||
ds_list_sort(_temp_name, true);
|
ds_list_sort(_temp_name, true);
|
||||||
for( var i = 0; i < ds_list_size(_temp_name); i++ ) {
|
for( var i = 0; i < ds_list_size(_temp_name); i++ ) {
|
||||||
var file = _temp_name[| i];
|
var file = _temp_name[| i];
|
||||||
|
|
||||||
if(directory_exists(_curr.path + "/" + file)) {
|
if(filename_ext(file) == ".json" || filename_ext(file) == ".pxcc") {
|
||||||
var fol = new FileContext(file, _curr.path + "/" + file);
|
var f = new FileContext(string_copy(file, 1, string_length(file) - 5), _path + "/" + file);
|
||||||
ds_list_add(folder_list, fol);
|
|
||||||
} else if(filename_ext(file) == ".json" || filename_ext(file) == ".pxcc") {
|
|
||||||
var f = new FileContext(string_copy(file, 1, string_length(file) - 5), _curr.path + "/" + file);
|
|
||||||
f.buildin = false;
|
|
||||||
ds_list_add(content_list, f);
|
ds_list_add(content_list, f);
|
||||||
var icon_path = _curr.path + "/" + string_copy(file, 1, string_length(file) - 5) + ".png";
|
var icon_path = _path + "/" + string_copy(file, 1, string_length(file) - 5) + ".png";
|
||||||
|
|
||||||
if(file_exists(icon_path)) {
|
if(file_exists(icon_path)) {
|
||||||
var _temp = sprite_add(icon_path, 0, false, false, 0, 0);
|
var _temp = sprite_add(icon_path, 0, false, false, 0, 0);
|
||||||
|
@ -271,44 +235,6 @@ function Panel_Collection(_panel) : PanelContent(_panel) constructor {
|
||||||
ds_list_destroy(_temp_name);
|
ds_list_destroy(_temp_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawContext() {
|
|
||||||
draw_set_text(f_p0b, fa_left, fa_center, c_ui_blue_ltgrey);
|
|
||||||
var xx = 24, tt, tw, th;
|
|
||||||
|
|
||||||
var st = max(0, ds_list_size(context) - 2);
|
|
||||||
for(var i = st; i < ds_list_size(context); i++) {
|
|
||||||
if(i == 0) {
|
|
||||||
tt = "Collections";
|
|
||||||
} else {
|
|
||||||
var _cnt = context[| i];
|
|
||||||
tt = _cnt.name;
|
|
||||||
}
|
|
||||||
tw = string_width(tt);
|
|
||||||
th = string_height(tt);
|
|
||||||
|
|
||||||
if(i < ds_list_size(context) - 1) {
|
|
||||||
if(buttonInstant(s_button_hide_fill, xx - 10, 20 - th / 2 - 3, tw + 20, th + 6, [mx, my], FOCUS == panel, HOVER == panel) == 2) {
|
|
||||||
for(var j = ds_list_size(context) - 1; j > i; j--)
|
|
||||||
ds_list_delete(context, j);
|
|
||||||
searchFolder();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
draw_sprite_ext(s_arrow_16, 0, xx + tw + 16, 20, 1, 1, 0, c_ui_blue_grey, 1);
|
|
||||||
}
|
|
||||||
draw_set_alpha(1);
|
|
||||||
draw_text(xx, 20, tt);
|
|
||||||
draw_set_alpha(1);
|
|
||||||
xx += tw;
|
|
||||||
xx += 32;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function getCurrentContext() {
|
|
||||||
if(ds_list_size(context) == 1) return -1;
|
|
||||||
return context[| ds_list_size(context) - 1];
|
|
||||||
}
|
|
||||||
|
|
||||||
function saveCollection(_path, save_surface = true) {
|
function saveCollection(_path, save_surface = true) {
|
||||||
if(PANEL_INSPECTOR.inspecting == noone) return;
|
if(PANEL_INSPECTOR.inspecting == noone) return;
|
||||||
|
|
||||||
|
@ -321,7 +247,6 @@ function Panel_Collection(_panel) : PanelContent(_panel) constructor {
|
||||||
|
|
||||||
function drawContent() {
|
function drawContent() {
|
||||||
draw_clear_alpha(c_ui_blue_black, 0);
|
draw_clear_alpha(c_ui_blue_black, 0);
|
||||||
var con = getCurrentContext();
|
|
||||||
|
|
||||||
draw_sprite_stretched(s_ui_panel_bg, 1, group_w, 40, content_w + 16, content_h);
|
draw_sprite_stretched(s_ui_panel_bg, 1, group_w, 40, content_w + 16, content_h);
|
||||||
contentPane.active = HOVER == panel;
|
contentPane.active = HOVER == panel;
|
||||||
|
@ -330,16 +255,17 @@ function Panel_Collection(_panel) : PanelContent(_panel) constructor {
|
||||||
folderPane.active = HOVER == panel;
|
folderPane.active = HOVER == panel;
|
||||||
folderPane.draw(0, 40, mx, my - 40);
|
folderPane.draw(0, 40, mx, my - 40);
|
||||||
|
|
||||||
drawContext();
|
draw_set_text(f_p0b, fa_left, fa_center, c_ui_blue_ltgrey);
|
||||||
|
draw_text(24, 20, "Collections");
|
||||||
|
|
||||||
var bx = w - 8 - 24;
|
var bx = w - 8 - 24;
|
||||||
var by = 8;
|
var by = 8;
|
||||||
|
|
||||||
if(con && con.path != "") {
|
if(context != COLLECTIONS) {
|
||||||
if(buttonInstant(s_button_hide, bx, by, 24, 24, [mx, my], FOCUS == panel, HOVER == panel, "Add selecting node as collection", s_add_24, 0, c_ui_lime) == 2) {
|
if(buttonInstant(s_button_hide, bx, by, 24, 24, [mx, my], FOCUS == panel, HOVER == panel, "Add selecting node as collection", s_add_24, 0, c_ui_lime) == 2) {
|
||||||
if(PANEL_INSPECTOR.inspecting != noone) {
|
if(PANEL_INSPECTOR.inspecting != noone) {
|
||||||
var dia = dialogCall(o_dialog_file_name, mouse_mx + 8, mouse_my + 8);
|
var dia = dialogCall(o_dialog_file_name, mouse_mx + 8, mouse_my + 8);
|
||||||
data_path = con.path;
|
data_path = context.path;
|
||||||
if(PANEL_INSPECTOR.inspecting)
|
if(PANEL_INSPECTOR.inspecting)
|
||||||
dia.tb_name._input_text = PANEL_INSPECTOR.inspecting.name;
|
dia.tb_name._input_text = PANEL_INSPECTOR.inspecting.name;
|
||||||
dia.onModify = function (txt) {
|
dia.onModify = function (txt) {
|
||||||
|
@ -360,26 +286,19 @@ function Panel_Collection(_panel) : PanelContent(_panel) constructor {
|
||||||
}
|
}
|
||||||
bx -= 32;
|
bx -= 32;
|
||||||
|
|
||||||
if(con == -1 || con.path != "") {
|
if(buttonInstant(s_button_hide, bx, by, 24, 24, [mx, my], FOCUS == panel, HOVER == panel, "Add folder") == 2) {
|
||||||
if(buttonInstant(s_button_hide, bx, by, 24, 24, [mx, my], FOCUS == panel, HOVER == panel, "Add folder") == 2) {
|
var dia = dialogCall(o_dialog_file_name, mouse_mx + 8, mouse_my + 8);
|
||||||
var dia = dialogCall(o_dialog_file_name, mouse_mx + 8, mouse_my + 8);
|
dia.onModify = function (txt) {
|
||||||
dia.onModify = function (txt) {
|
directory_create(txt);
|
||||||
directory_create(txt);
|
};
|
||||||
searchFolder();
|
dia.path = context.path + "/";
|
||||||
};
|
|
||||||
if(con == -1) dia.path = DIRECTORY + "Collections/";
|
|
||||||
else dia.path = con.path;
|
|
||||||
}
|
|
||||||
draw_sprite_ext(s_folder_add, 0, bx + 12, by + 12, 1, 1, 0, c_ui_blue_grey, 1);
|
|
||||||
draw_sprite_ext(s_folder_add, 1, bx + 12, by + 12, 1, 1, 0, c_ui_lime, 1);
|
|
||||||
} else {
|
|
||||||
draw_sprite_ext(s_folder_add, 0, bx + 12, by + 12, 1, 1, 0, c_ui_blue_dkgrey, 1);
|
|
||||||
draw_sprite_ext(s_folder_add, 1, bx + 12, by + 12, 1, 1, 0, c_ui_blue_dkgrey, 1);
|
|
||||||
}
|
}
|
||||||
|
draw_sprite_ext(s_folder_add, 0, bx + 12, by + 12, 1, 1, 0, c_ui_blue_grey, 1);
|
||||||
|
draw_sprite_ext(s_folder_add, 1, bx + 12, by + 12, 1, 1, 0, c_ui_lime, 1);
|
||||||
bx -= 32;
|
bx -= 32;
|
||||||
|
|
||||||
if(buttonInstant(s_button_hide, bx, by, 24, 24, [mx, my], FOCUS == panel, HOVER == panel, "Open in file explorer", s_folder_24) == 2) {
|
if(buttonInstant(s_button_hide, bx, by, 24, 24, [mx, my], FOCUS == panel, HOVER == panel, "Open in file explorer", s_folder_24) == 2) {
|
||||||
var _realpath = con == -1? DIRECTORY + "Collections" : con.path;
|
var _realpath = context.path;
|
||||||
var _windir = environment_get_variable("WINDIR") + "\\explorer.exe";
|
var _windir = environment_get_variable("WINDIR") + "\\explorer.exe";
|
||||||
|
|
||||||
execute_shell(_windir, _realpath);
|
execute_shell(_windir, _realpath);
|
||||||
|
@ -387,7 +306,8 @@ function Panel_Collection(_panel) : PanelContent(_panel) constructor {
|
||||||
bx -= 32;
|
bx -= 32;
|
||||||
|
|
||||||
if(buttonInstant(s_button_hide, bx, by, 24, 24, [mx, my], FOCUS == panel, HOVER == panel, "Refresh", s_refresh_16) == 2) {
|
if(buttonInstant(s_button_hide, bx, by, 24, 24, [mx, my], FOCUS == panel, HOVER == panel, "Refresh", s_refresh_16) == 2) {
|
||||||
searchFolder();
|
searchCollections();
|
||||||
|
searchContent();
|
||||||
}
|
}
|
||||||
bx -= 32;
|
bx -= 32;
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
PANEL_GRAPH = new Panel_Graph(split_prev[1]);
|
PANEL_GRAPH = new Panel_Graph(split_prev[1]);
|
||||||
|
|
||||||
if(PREF_MAP[? "panel_collection"]) {
|
if(PREF_MAP[? "panel_collection"]) {
|
||||||
var pane = PANEL_ANIMATION.panel.split_h(460);
|
var pane = PANEL_ANIMATION.panel.split_h(500);
|
||||||
pane[1].set(PANEL_ANIMATION);
|
pane[1].set(PANEL_ANIMATION);
|
||||||
PANEL_COLLECTION = new Panel_Collection(pane[0]);
|
PANEL_COLLECTION = new Panel_Collection(pane[0]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,8 @@ function Panel_Graph(_panel) : PanelContent(_panel) constructor {
|
||||||
node_focus = noone;
|
node_focus = noone;
|
||||||
node_previewing = noone;
|
node_previewing = noone;
|
||||||
|
|
||||||
|
junction_hovering = noone;
|
||||||
|
|
||||||
value_focus = noone;
|
value_focus = noone;
|
||||||
value_dragging = noone;
|
value_dragging = noone;
|
||||||
|
|
||||||
|
@ -343,9 +345,12 @@ function Panel_Graph(_panel) : PanelContent(_panel) constructor {
|
||||||
_node.drawActive(gr_x, gr_y, graph_s);
|
_node.drawActive(gr_x, gr_y, graph_s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var hov = noone;
|
||||||
for(var i = 0; i < ds_list_size(nodes_list); i++) {
|
for(var i = 0; i < ds_list_size(nodes_list); i++) {
|
||||||
nodes_list[| i].drawConnections(gr_x, gr_y, mx, my, graph_s);
|
var _hov = nodes_list[| i].drawConnections(gr_x, gr_y, mx, my, graph_s);
|
||||||
|
if(_hov != noone) hov = _hov;
|
||||||
}
|
}
|
||||||
|
junction_hovering = hov;
|
||||||
|
|
||||||
value_focus = noone;
|
value_focus = noone;
|
||||||
|
|
||||||
|
@ -813,6 +818,7 @@ function Panel_Graph(_panel) : PanelContent(_panel) constructor {
|
||||||
with(dialogCall(o_dialog_add_node, mouse_mx + 8, mouse_my + 8)) {
|
with(dialogCall(o_dialog_add_node, mouse_mx + 8, mouse_my + 8)) {
|
||||||
node_target_x = other.mouse_grid_x;
|
node_target_x = other.mouse_grid_x;
|
||||||
node_target_y = other.mouse_grid_y;
|
node_target_y = other.mouse_grid_y;
|
||||||
|
junction_hovering = other.junction_hovering;
|
||||||
|
|
||||||
alarm[0] = 1;
|
alarm[0] = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ function Panel_Menu(_panel) : PanelContent(_panel) constructor {
|
||||||
[ "Render all nodes", function() {
|
[ "Render all nodes", function() {
|
||||||
for(var i = 0; i < ds_list_size(NODES); i++)
|
for(var i = 0; i < ds_list_size(NODES); i++)
|
||||||
NODES[| i].setRenderStatus(false);
|
NODES[| i].setRenderStatus(false);
|
||||||
UPDATE = true;
|
UPDATE |= RENDER_TYPE.full;
|
||||||
}, ["", "Render all"] ]
|
}, ["", "Render all"] ]
|
||||||
]],
|
]],
|
||||||
["Panels", [
|
["Panels", [
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
enum RENDER_TYPE {
|
||||||
|
none = 0,
|
||||||
|
partial = 1,
|
||||||
|
full = 2
|
||||||
|
}
|
||||||
|
|
||||||
function renderAll() {
|
function renderAll() {
|
||||||
var _key = ds_map_find_first(NODE_MAP);
|
var _key = ds_map_find_first(NODE_MAP);
|
||||||
var amo = ds_map_size(NODE_MAP);
|
var amo = ds_map_size(NODE_MAP);
|
||||||
|
@ -8,6 +14,28 @@ function renderAll() {
|
||||||
_key = ds_map_find_next(NODE_MAP, _key);
|
_key = ds_map_find_next(NODE_MAP, _key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ds_stack_clear(RENDER_STACK);
|
||||||
|
// get leaf node
|
||||||
|
var key = ds_map_find_first(NODE_MAP);
|
||||||
|
repeat(ds_map_size(NODE_MAP)) {
|
||||||
|
var _node = NODE_MAP[? key];
|
||||||
|
key = ds_map_find_next(NODE_MAP, key);
|
||||||
|
|
||||||
|
if(instanceof(_node) == "Node_Group_Input") continue;
|
||||||
|
if(instanceof(_node) == "Node_Iterator_Input") continue;
|
||||||
|
|
||||||
|
if(_node.active && !is_undefined(_node) && is_struct(_node)) {
|
||||||
|
var _startNode = true;
|
||||||
|
for(var j = 0; j < ds_list_size(_node.inputs); j++) {
|
||||||
|
var _in = _node.inputs[| j];
|
||||||
|
if(_in.value_from != noone)
|
||||||
|
_startNode = false;
|
||||||
|
}
|
||||||
|
if(_startNode)
|
||||||
|
ds_stack_push(RENDER_STACK, _node);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
renderUpdated();
|
renderUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,36 +58,14 @@ function __nodeLeafList(_list, _stack) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderUpdated() {
|
function renderUpdated() {
|
||||||
var render_st = ds_stack_create();
|
|
||||||
var rendering = noone;
|
var rendering = noone;
|
||||||
var error = 0;
|
var error = 0;
|
||||||
|
|
||||||
// get leaf node
|
//show_debug_message("\n=== RENDER ===")
|
||||||
var key = ds_map_find_first(NODE_MAP);
|
|
||||||
repeat(ds_map_size(NODE_MAP)) {
|
|
||||||
var _node = NODE_MAP[? key];
|
|
||||||
key = ds_map_find_next(NODE_MAP, key);
|
|
||||||
|
|
||||||
if(instanceof(_node) == "Node_Group_Input") continue;
|
|
||||||
if(instanceof(_node) == "Node_Iterator_Input") continue;
|
|
||||||
|
|
||||||
if(_node.active && !is_undefined(_node) && is_struct(_node)) {
|
|
||||||
var _startNode = true;
|
|
||||||
for(var j = 0; j < ds_list_size(_node.inputs); j++) {
|
|
||||||
var _in = _node.inputs[| j];
|
|
||||||
if(_in.value_from != noone)
|
|
||||||
_startNode = false;
|
|
||||||
}
|
|
||||||
if(_startNode)
|
|
||||||
ds_stack_push(render_st, _node);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
show_debug_message("\n=== RENDER ===")
|
|
||||||
|
|
||||||
// render forward
|
// render forward
|
||||||
while(!ds_stack_empty(render_st)) {
|
while(!ds_stack_empty(RENDER_STACK)) {
|
||||||
rendering = ds_stack_pop(render_st);
|
rendering = ds_stack_pop(RENDER_STACK);
|
||||||
|
|
||||||
if(rendering.rendered) continue;
|
if(rendering.rendered) continue;
|
||||||
|
|
||||||
|
@ -75,7 +81,7 @@ function renderUpdated() {
|
||||||
for(var i = rendering.custom_input_index; i < ds_list_size(rendering.inputs); i++) {
|
for(var i = rendering.custom_input_index; i < ds_list_size(rendering.inputs); i++) {
|
||||||
var _in = rendering.inputs[| i].from;
|
var _in = rendering.inputs[| i].from;
|
||||||
|
|
||||||
if(_in.isUpdateReady()) ds_stack_push(render_st, _in);
|
if(_in.isUpdateReady()) ds_stack_push(RENDER_STACK, _in);
|
||||||
}
|
}
|
||||||
} else if(instanceof(rendering) == "Node_Group_Output") { //Group output in-junction connect automatically to parent out-junction
|
} else if(instanceof(rendering) == "Node_Group_Output") { //Group output in-junction connect automatically to parent out-junction
|
||||||
var _ot = rendering.outParent;
|
var _ot = rendering.outParent;
|
||||||
|
@ -84,7 +90,7 @@ function renderUpdated() {
|
||||||
|
|
||||||
if(_to.node.active && _to.value_from != noone && _to.value_from.node == rendering.group) {
|
if(_to.node.active && _to.value_from != noone && _to.value_from.node == rendering.group) {
|
||||||
_to.node.setRenderStatus(false);
|
_to.node.setRenderStatus(false);
|
||||||
if(_to.node.isUpdateReady()) ds_stack_push(render_st, _to.node);
|
if(_to.node.isUpdateReady()) ds_stack_push(RENDER_STACK, _to.node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,29 +98,29 @@ function renderUpdated() {
|
||||||
} else if(instanceof(rendering) == "Node_Iterate") { //Put each input node in group to stack
|
} else if(instanceof(rendering) == "Node_Iterate") { //Put each input node in group to stack
|
||||||
for(var i = rendering.custom_input_index; i < ds_list_size(rendering.inputs); i++) {
|
for(var i = rendering.custom_input_index; i < ds_list_size(rendering.inputs); i++) {
|
||||||
var _in = rendering.inputs[| i].from;
|
var _in = rendering.inputs[| i].from;
|
||||||
if(_in.isUpdateReady()) ds_stack_push(render_st, _in);
|
if(_in.isUpdateReady()) ds_stack_push(RENDER_STACK, _in);
|
||||||
}
|
}
|
||||||
} else if(instanceof(rendering) == "Node_Iterator_Output") { //Check iteration result
|
} else if(instanceof(rendering) == "Node_Iterator_Output") { //Check iteration result
|
||||||
var _node_it = rendering.group;
|
var _node_it = rendering.group;
|
||||||
var _ren = _node_it.outputRendered();
|
var _ren = _node_it.outputRendered();
|
||||||
|
|
||||||
if(_ren == 1) { //Go back to the beginning of the loop, reset render status for leaf node inside?
|
if(_ren == 1) { //Go back to the beginning of the loop, reset render status for leaf node inside?
|
||||||
show_debug_message("iteration restart");
|
//show_debug_message("iteration restart");
|
||||||
var _ot = rendering.group.inputs;
|
var _ot = rendering.group.inputs;
|
||||||
for(var j = 1; j < ds_list_size(_ot); j++) {
|
for(var j = 1; j < ds_list_size(_ot); j++) {
|
||||||
if(_ot[| j].from.isUpdateReady()) ds_stack_push(render_st, _ot[| j].from);
|
if(_ot[| j].from.isUpdateReady()) ds_stack_push(RENDER_STACK, _ot[| j].from);
|
||||||
}
|
}
|
||||||
|
|
||||||
__nodeLeafList(rendering.group.nodes, render_st);
|
__nodeLeafList(rendering.group.nodes, RENDER_STACK);
|
||||||
} else if(_ren == 2) { //Go out of loop
|
} else if(_ren == 2) { //Go out of loop
|
||||||
show_debug_message("iteration completed");
|
//show_debug_message("iteration completed");
|
||||||
var _ot = rendering.outParent;
|
var _ot = rendering.outParent;
|
||||||
for(var j = 0; j < ds_list_size(_ot.value_to); j++) {
|
for(var j = 0; j < ds_list_size(_ot.value_to); j++) {
|
||||||
var _to = _ot.value_to[| j];
|
var _to = _ot.value_to[| j];
|
||||||
|
|
||||||
if(_to.node.active && _to.value_from != noone && _to.value_from.node == rendering.group) {
|
if(_to.node.active && _to.value_from != noone && _to.value_from.node == rendering.group) {
|
||||||
_to.node.setRenderStatus(false);
|
_to.node.setRenderStatus(false);
|
||||||
if(_to.node.isUpdateReady()) ds_stack_push(render_st, _to.node);
|
if(_to.node.isUpdateReady()) ds_stack_push(RENDER_STACK, _to.node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rendering.group.setRenderStatus(true);
|
rendering.group.setRenderStatus(true);
|
||||||
|
@ -128,7 +134,7 @@ function renderUpdated() {
|
||||||
|
|
||||||
if(_to.node.active && _to.value_from != noone && _to.value_from.node == rendering) {
|
if(_to.node.active && _to.value_from != noone && _to.value_from.node == rendering) {
|
||||||
_to.node.setRenderStatus(false);
|
_to.node.setRenderStatus(false);
|
||||||
if(_to.node.isUpdateReady()) ds_stack_push(render_st, _to.node);
|
if(_to.node.isUpdateReady()) ds_stack_push(RENDER_STACK, _to.node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -136,13 +142,11 @@ function renderUpdated() {
|
||||||
|
|
||||||
//show_debug_message(txt);
|
//show_debug_message(txt);
|
||||||
}
|
}
|
||||||
|
|
||||||
ds_stack_destroy(render_st);
|
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
function renderNodeBackward(_node) {
|
function renderNodeBackward(_node) { //unused
|
||||||
var render_st = ds_stack_create();
|
var RENDER_STACK = ds_stack_create();
|
||||||
ds_stack_push(render_st, _node);
|
ds_stack_push(RENDER_STACK, _node);
|
||||||
|
|
||||||
var key = ds_map_find_first(NODE_MAP);
|
var key = ds_map_find_first(NODE_MAP);
|
||||||
for(var i = 0; i < ds_map_size(NODE_MAP); i++) {
|
for(var i = 0; i < ds_map_size(NODE_MAP); i++) {
|
||||||
|
@ -156,18 +160,18 @@ function renderNodeBackward(_node) {
|
||||||
var _in = _node.inputs[| i];
|
var _in = _node.inputs[| i];
|
||||||
|
|
||||||
if(_in.value_from) {
|
if(_in.value_from) {
|
||||||
ds_stack_push(render_st, _in.value_from.node);
|
ds_stack_push(RENDER_STACK, _in.value_from.node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while(!ds_stack_empty(render_st)) {
|
while(!ds_stack_empty(RENDER_STACK)) {
|
||||||
var _rendering = ds_stack_top(render_st);
|
var _rendering = ds_stack_top(RENDER_STACK);
|
||||||
var _leaf = true;
|
var _leaf = true;
|
||||||
|
|
||||||
for(var i = 0; i < ds_list_size(_rendering.inputs); i++) {
|
for(var i = 0; i < ds_list_size(_rendering.inputs); i++) {
|
||||||
var _in = _rendering.inputs[| i];
|
var _in = _rendering.inputs[| i];
|
||||||
if(_in.value_from && !_in.value_from.node.rendered) {
|
if(_in.value_from && !_in.value_from.node.rendered) {
|
||||||
ds_stack_push(render_st, _in.value_from.node);
|
ds_stack_push(RENDER_STACK, _in.value_from.node);
|
||||||
_leaf = false;
|
_leaf = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -180,9 +184,9 @@ function renderNodeBackward(_node) {
|
||||||
_rendering.doUpdate();
|
_rendering.doUpdate();
|
||||||
} else
|
} else
|
||||||
_rendering.doUpdate();
|
_rendering.doUpdate();
|
||||||
ds_stack_pop(render_st);
|
ds_stack_pop(RENDER_STACK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ds_stack_destroy(render_st);
|
ds_stack_destroy(RENDER_STACK);
|
||||||
}
|
}
|
|
@ -124,7 +124,7 @@ function SAVE_COLLECTIONS(_list, _path, save_surface = true) {
|
||||||
|
|
||||||
ds_map_destroy(_map);
|
ds_map_destroy(_map);
|
||||||
var pane = findPanel("Panel_Collection", PANEL_MAIN, noone);
|
var pane = findPanel("Panel_Collection", PANEL_MAIN, noone);
|
||||||
if(pane) pane.searchFolder();
|
if(pane) pane.searchContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
function SAVE_COLLECTION(_node, _path, save_surface = true) {
|
function SAVE_COLLECTION(_node, _path, save_surface = true) {
|
||||||
|
@ -148,7 +148,7 @@ function SAVE_COLLECTION(_node, _path, save_surface = true) {
|
||||||
|
|
||||||
ds_map_destroy(_map);
|
ds_map_destroy(_map);
|
||||||
var pane = findPanel("Panel_Collection", PANEL_MAIN, noone);
|
var pane = findPanel("Panel_Collection", PANEL_MAIN, noone);
|
||||||
if(pane) pane.searchFolder();
|
if(pane) pane.searchContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
function SAVE_NODE(_list, _node, dx = 0, dy = 0, scale = false) {
|
function SAVE_NODE(_list, _node, dx = 0, dy = 0, scale = false) {
|
||||||
|
|
3
scripts/type_conversion/type_conversion.gml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
function type_conversion(val, to) {
|
||||||
|
|
||||||
|
}
|
12
scripts/type_conversion/type_conversion.yy
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"isDnD": false,
|
||||||
|
"isCompatibility": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "value",
|
||||||
|
"path": "folders/functions/value.yy",
|
||||||
|
},
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "type_conversion",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
}
|
After Width: | Height: | Size: 332 B |
After Width: | Height: | Size: 257 B |
After Width: | Height: | Size: 313 B |
After Width: | Height: | Size: 251 B |
83
sprites/s_folder_content_24/s_folder_content_24.yy
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
{
|
||||||
|
"bboxMode": 0,
|
||||||
|
"collisionKind": 1,
|
||||||
|
"type": 0,
|
||||||
|
"origin": 4,
|
||||||
|
"preMultiplyAlpha": false,
|
||||||
|
"edgeFiltering": false,
|
||||||
|
"collisionTolerance": 0,
|
||||||
|
"swfPrecision": 2.525,
|
||||||
|
"bbox_left": 2,
|
||||||
|
"bbox_right": 21,
|
||||||
|
"bbox_top": 4,
|
||||||
|
"bbox_bottom": 20,
|
||||||
|
"HTile": false,
|
||||||
|
"VTile": false,
|
||||||
|
"For3D": false,
|
||||||
|
"width": 24,
|
||||||
|
"height": 24,
|
||||||
|
"textureGroupId": {
|
||||||
|
"name": "Default",
|
||||||
|
"path": "texturegroups/Default",
|
||||||
|
},
|
||||||
|
"swatchColours": null,
|
||||||
|
"gridX": 0,
|
||||||
|
"gridY": 0,
|
||||||
|
"frames": [
|
||||||
|
{"compositeImage":{"FrameId":{"name":"e370d044-47b2-4385-b536-765d62658b53","path":"sprites/s_folder_content_24/s_folder_content_24.yy",},"LayerId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},"images":[
|
||||||
|
{"FrameId":{"name":"e370d044-47b2-4385-b536-765d62658b53","path":"sprites/s_folder_content_24/s_folder_content_24.yy",},"LayerId":{"name":"1b3ed37a-f867-49ee-9b1f-1668f53c9a96","path":"sprites/s_folder_content_24/s_folder_content_24.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},
|
||||||
|
],"parent":{"name":"s_folder_content_24","path":"sprites/s_folder_content_24/s_folder_content_24.yy",},"resourceVersion":"1.0","name":"e370d044-47b2-4385-b536-765d62658b53","tags":[],"resourceType":"GMSpriteFrame",},
|
||||||
|
{"compositeImage":{"FrameId":{"name":"087b63df-395b-442a-9541-13c1b948a89e","path":"sprites/s_folder_content_24/s_folder_content_24.yy",},"LayerId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},"images":[
|
||||||
|
{"FrameId":{"name":"087b63df-395b-442a-9541-13c1b948a89e","path":"sprites/s_folder_content_24/s_folder_content_24.yy",},"LayerId":{"name":"1b3ed37a-f867-49ee-9b1f-1668f53c9a96","path":"sprites/s_folder_content_24/s_folder_content_24.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},
|
||||||
|
],"parent":{"name":"s_folder_content_24","path":"sprites/s_folder_content_24/s_folder_content_24.yy",},"resourceVersion":"1.0","name":"087b63df-395b-442a-9541-13c1b948a89e","tags":[],"resourceType":"GMSpriteFrame",},
|
||||||
|
],
|
||||||
|
"sequence": {
|
||||||
|
"spriteId": {"name":"s_folder_content_24","path":"sprites/s_folder_content_24/s_folder_content_24.yy",},
|
||||||
|
"timeUnits": 1,
|
||||||
|
"playback": 1,
|
||||||
|
"playbackSpeed": 30.0,
|
||||||
|
"playbackSpeedType": 0,
|
||||||
|
"autoRecord": true,
|
||||||
|
"volume": 1.0,
|
||||||
|
"length": 2.0,
|
||||||
|
"events": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MessageEventKeyframe>",},
|
||||||
|
"moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MomentsEventKeyframe>",},
|
||||||
|
"tracks": [
|
||||||
|
{"name":"frames","spriteId":null,"keyframes":{"Keyframes":[
|
||||||
|
{"id":"c2ac1835-866f-41f9-acbf-d9cc2ef24d8d","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"e370d044-47b2-4385-b536-765d62658b53","path":"sprites/s_folder_content_24/s_folder_content_24.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
|
||||||
|
{"id":"841150bf-ecfb-4047-b2cc-6b2c2de7cbae","Key":1.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"087b63df-395b-442a-9541-13c1b948a89e","path":"sprites/s_folder_content_24/s_folder_content_24.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
|
||||||
|
],"resourceVersion":"1.0","resourceType":"KeyframeStore<SpriteFrameKeyframe>",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"isCreationTrack":false,"resourceVersion":"1.0","tags":[],"resourceType":"GMSpriteFramesTrack","modifiers":[],},
|
||||||
|
],
|
||||||
|
"visibleRange": null,
|
||||||
|
"lockOrigin": false,
|
||||||
|
"showBackdrop": true,
|
||||||
|
"showBackdropImage": false,
|
||||||
|
"backdropImagePath": "",
|
||||||
|
"backdropImageOpacity": 0.5,
|
||||||
|
"backdropWidth": 1366,
|
||||||
|
"backdropHeight": 768,
|
||||||
|
"backdropXOffset": 0.0,
|
||||||
|
"backdropYOffset": 0.0,
|
||||||
|
"xorigin": 12,
|
||||||
|
"yorigin": 12,
|
||||||
|
"eventToFunction": {},
|
||||||
|
"eventStubScript": null,
|
||||||
|
"parent": {"name":"s_folder_content_24","path":"sprites/s_folder_content_24/s_folder_content_24.yy",},
|
||||||
|
"resourceVersion": "1.3",
|
||||||
|
"name": "s_folder_content_24",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMSequence",
|
||||||
|
},
|
||||||
|
"layers": [
|
||||||
|
{"visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default","resourceVersion":"1.0","name":"1b3ed37a-f867-49ee-9b1f-1668f53c9a96","tags":[],"resourceType":"GMImageLayer",},
|
||||||
|
],
|
||||||
|
"nineSlice": null,
|
||||||
|
"parent": {
|
||||||
|
"name": "icon",
|
||||||
|
"path": "folders/sprites/icon.yy",
|
||||||
|
},
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "s_folder_content_24",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMSprite",
|
||||||
|
}
|
BIN
sprites/s_node_pin_bg/388f3040-3a10-4d25-9bbf-2ed6887d2f11.png
Normal file
After Width: | Height: | Size: 434 B |
Before Width: | Height: | Size: 486 B |
After Width: | Height: | Size: 436 B |
Before Width: | Height: | Size: 489 B |
|
@ -8,13 +8,13 @@
|
||||||
"collisionTolerance": 0,
|
"collisionTolerance": 0,
|
||||||
"swfPrecision": 2.525,
|
"swfPrecision": 2.525,
|
||||||
"bbox_left": 0,
|
"bbox_left": 0,
|
||||||
"bbox_right": 63,
|
"bbox_right": 31,
|
||||||
"bbox_top": 0,
|
"bbox_top": 0,
|
||||||
"bbox_bottom": 31,
|
"bbox_bottom": 31,
|
||||||
"HTile": false,
|
"HTile": false,
|
||||||
"VTile": false,
|
"VTile": false,
|
||||||
"For3D": false,
|
"For3D": false,
|
||||||
"width": 64,
|
"width": 32,
|
||||||
"height": 32,
|
"height": 32,
|
||||||
"textureGroupId": {
|
"textureGroupId": {
|
||||||
"name": "Default",
|
"name": "Default",
|
||||||
|
@ -24,9 +24,9 @@
|
||||||
"gridX": 0,
|
"gridX": 0,
|
||||||
"gridY": 0,
|
"gridY": 0,
|
||||||
"frames": [
|
"frames": [
|
||||||
{"compositeImage":{"FrameId":{"name":"7e26ac4a-cf07-4d11-8846-fdb949383281","path":"sprites/s_node_pin_bg/s_node_pin_bg.yy",},"LayerId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},"images":[
|
{"compositeImage":{"FrameId":{"name":"388f3040-3a10-4d25-9bbf-2ed6887d2f11","path":"sprites/s_node_pin_bg/s_node_pin_bg.yy",},"LayerId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},"images":[
|
||||||
{"FrameId":{"name":"7e26ac4a-cf07-4d11-8846-fdb949383281","path":"sprites/s_node_pin_bg/s_node_pin_bg.yy",},"LayerId":{"name":"08c0d8ba-52ee-4d3c-9201-abc52d91e889","path":"sprites/s_node_pin_bg/s_node_pin_bg.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},
|
{"FrameId":{"name":"388f3040-3a10-4d25-9bbf-2ed6887d2f11","path":"sprites/s_node_pin_bg/s_node_pin_bg.yy",},"LayerId":{"name":"436620d9-dfdd-4d34-8647-b12b0b32e71e","path":"sprites/s_node_pin_bg/s_node_pin_bg.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},
|
||||||
],"parent":{"name":"s_node_pin_bg","path":"sprites/s_node_pin_bg/s_node_pin_bg.yy",},"resourceVersion":"1.0","name":"7e26ac4a-cf07-4d11-8846-fdb949383281","tags":[],"resourceType":"GMSpriteFrame",},
|
],"parent":{"name":"s_node_pin_bg","path":"sprites/s_node_pin_bg/s_node_pin_bg.yy",},"resourceVersion":"1.0","name":"388f3040-3a10-4d25-9bbf-2ed6887d2f11","tags":[],"resourceType":"GMSpriteFrame",},
|
||||||
],
|
],
|
||||||
"sequence": {
|
"sequence": {
|
||||||
"spriteId": {"name":"s_node_pin_bg","path":"sprites/s_node_pin_bg/s_node_pin_bg.yy",},
|
"spriteId": {"name":"s_node_pin_bg","path":"sprites/s_node_pin_bg/s_node_pin_bg.yy",},
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
"moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MomentsEventKeyframe>",},
|
"moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MomentsEventKeyframe>",},
|
||||||
"tracks": [
|
"tracks": [
|
||||||
{"name":"frames","spriteId":null,"keyframes":{"Keyframes":[
|
{"name":"frames","spriteId":null,"keyframes":{"Keyframes":[
|
||||||
{"id":"0e78db92-77a0-4808-81b9-ba1130b46e12","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"7e26ac4a-cf07-4d11-8846-fdb949383281","path":"sprites/s_node_pin_bg/s_node_pin_bg.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
|
{"id":"0ac17b77-8ab5-4309-a240-2a12c94faa0e","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"388f3040-3a10-4d25-9bbf-2ed6887d2f11","path":"sprites/s_node_pin_bg/s_node_pin_bg.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
|
||||||
],"resourceVersion":"1.0","resourceType":"KeyframeStore<SpriteFrameKeyframe>",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"isCreationTrack":false,"resourceVersion":"1.0","tags":[],"resourceType":"GMSpriteFramesTrack","modifiers":[],},
|
],"resourceVersion":"1.0","resourceType":"KeyframeStore<SpriteFrameKeyframe>",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"isCreationTrack":false,"resourceVersion":"1.0","tags":[],"resourceType":"GMSpriteFramesTrack","modifiers":[],},
|
||||||
],
|
],
|
||||||
"visibleRange": null,
|
"visibleRange": null,
|
||||||
|
@ -65,12 +65,12 @@
|
||||||
"resourceType": "GMSequence",
|
"resourceType": "GMSequence",
|
||||||
},
|
},
|
||||||
"layers": [
|
"layers": [
|
||||||
{"visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default","resourceVersion":"1.0","name":"08c0d8ba-52ee-4d3c-9201-abc52d91e889","tags":[],"resourceType":"GMImageLayer",},
|
{"visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default","resourceVersion":"1.0","name":"436620d9-dfdd-4d34-8647-b12b0b32e71e","tags":[],"resourceType":"GMImageLayer",},
|
||||||
],
|
],
|
||||||
"nineSlice": {
|
"nineSlice": {
|
||||||
"left": 28,
|
"left": 15,
|
||||||
"top": 15,
|
"top": 15,
|
||||||
"right": 24,
|
"right": 16,
|
||||||
"bottom": 16,
|
"bottom": 16,
|
||||||
"guideColour": [
|
"guideColour": [
|
||||||
4294902015,
|
4294902015,
|
||||||
|
|
Before Width: | Height: | Size: 707 B |
After Width: | Height: | Size: 626 B |
Before Width: | Height: | Size: 712 B |
After Width: | Height: | Size: 630 B |
|
@ -8,13 +8,13 @@
|
||||||
"collisionTolerance": 0,
|
"collisionTolerance": 0,
|
||||||
"swfPrecision": 2.525,
|
"swfPrecision": 2.525,
|
||||||
"bbox_left": 0,
|
"bbox_left": 0,
|
||||||
"bbox_right": 63,
|
"bbox_right": 31,
|
||||||
"bbox_top": 0,
|
"bbox_top": 0,
|
||||||
"bbox_bottom": 31,
|
"bbox_bottom": 31,
|
||||||
"HTile": false,
|
"HTile": false,
|
||||||
"VTile": false,
|
"VTile": false,
|
||||||
"For3D": false,
|
"For3D": false,
|
||||||
"width": 64,
|
"width": 32,
|
||||||
"height": 32,
|
"height": 32,
|
||||||
"textureGroupId": {
|
"textureGroupId": {
|
||||||
"name": "Default",
|
"name": "Default",
|
||||||
|
@ -24,9 +24,9 @@
|
||||||
"gridX": 0,
|
"gridX": 0,
|
||||||
"gridY": 0,
|
"gridY": 0,
|
||||||
"frames": [
|
"frames": [
|
||||||
{"compositeImage":{"FrameId":{"name":"05b2e8dc-35db-4c71-b1f0-22dde0d3e82b","path":"sprites/s_node_pin_bg_active/s_node_pin_bg_active.yy",},"LayerId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},"images":[
|
{"compositeImage":{"FrameId":{"name":"604a92a7-301f-4d97-9458-fb3556493573","path":"sprites/s_node_pin_bg_active/s_node_pin_bg_active.yy",},"LayerId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},"images":[
|
||||||
{"FrameId":{"name":"05b2e8dc-35db-4c71-b1f0-22dde0d3e82b","path":"sprites/s_node_pin_bg_active/s_node_pin_bg_active.yy",},"LayerId":{"name":"38a923c1-df5b-4555-933d-e573af686008","path":"sprites/s_node_pin_bg_active/s_node_pin_bg_active.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},
|
{"FrameId":{"name":"604a92a7-301f-4d97-9458-fb3556493573","path":"sprites/s_node_pin_bg_active/s_node_pin_bg_active.yy",},"LayerId":{"name":"8e106beb-1be9-406e-954b-3a5f83ae687e","path":"sprites/s_node_pin_bg_active/s_node_pin_bg_active.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},
|
||||||
],"parent":{"name":"s_node_pin_bg_active","path":"sprites/s_node_pin_bg_active/s_node_pin_bg_active.yy",},"resourceVersion":"1.0","name":"05b2e8dc-35db-4c71-b1f0-22dde0d3e82b","tags":[],"resourceType":"GMSpriteFrame",},
|
],"parent":{"name":"s_node_pin_bg_active","path":"sprites/s_node_pin_bg_active/s_node_pin_bg_active.yy",},"resourceVersion":"1.0","name":"604a92a7-301f-4d97-9458-fb3556493573","tags":[],"resourceType":"GMSpriteFrame",},
|
||||||
],
|
],
|
||||||
"sequence": {
|
"sequence": {
|
||||||
"spriteId": {"name":"s_node_pin_bg_active","path":"sprites/s_node_pin_bg_active/s_node_pin_bg_active.yy",},
|
"spriteId": {"name":"s_node_pin_bg_active","path":"sprites/s_node_pin_bg_active/s_node_pin_bg_active.yy",},
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
"moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MomentsEventKeyframe>",},
|
"moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MomentsEventKeyframe>",},
|
||||||
"tracks": [
|
"tracks": [
|
||||||
{"name":"frames","spriteId":null,"keyframes":{"Keyframes":[
|
{"name":"frames","spriteId":null,"keyframes":{"Keyframes":[
|
||||||
{"id":"0c00b804-b4da-4541-b342-bd8e2df9b911","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"05b2e8dc-35db-4c71-b1f0-22dde0d3e82b","path":"sprites/s_node_pin_bg_active/s_node_pin_bg_active.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
|
{"id":"9eeb162f-8b68-499f-8214-a3b5d1ff852f","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"604a92a7-301f-4d97-9458-fb3556493573","path":"sprites/s_node_pin_bg_active/s_node_pin_bg_active.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
|
||||||
],"resourceVersion":"1.0","resourceType":"KeyframeStore<SpriteFrameKeyframe>",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"isCreationTrack":false,"resourceVersion":"1.0","tags":[],"resourceType":"GMSpriteFramesTrack","modifiers":[],},
|
],"resourceVersion":"1.0","resourceType":"KeyframeStore<SpriteFrameKeyframe>",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"isCreationTrack":false,"resourceVersion":"1.0","tags":[],"resourceType":"GMSpriteFramesTrack","modifiers":[],},
|
||||||
],
|
],
|
||||||
"visibleRange": null,
|
"visibleRange": null,
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
"backdropHeight": 768,
|
"backdropHeight": 768,
|
||||||
"backdropXOffset": 0.0,
|
"backdropXOffset": 0.0,
|
||||||
"backdropYOffset": 0.0,
|
"backdropYOffset": 0.0,
|
||||||
"xorigin": 32,
|
"xorigin": 16,
|
||||||
"yorigin": 16,
|
"yorigin": 16,
|
||||||
"eventToFunction": {},
|
"eventToFunction": {},
|
||||||
"eventStubScript": null,
|
"eventStubScript": null,
|
||||||
|
@ -65,9 +65,33 @@
|
||||||
"resourceType": "GMSequence",
|
"resourceType": "GMSequence",
|
||||||
},
|
},
|
||||||
"layers": [
|
"layers": [
|
||||||
{"visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default","resourceVersion":"1.0","name":"38a923c1-df5b-4555-933d-e573af686008","tags":[],"resourceType":"GMImageLayer",},
|
{"visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default","resourceVersion":"1.0","name":"8e106beb-1be9-406e-954b-3a5f83ae687e","tags":[],"resourceType":"GMImageLayer",},
|
||||||
],
|
],
|
||||||
"nineSlice": null,
|
"nineSlice": {
|
||||||
|
"left": 15,
|
||||||
|
"top": 16,
|
||||||
|
"right": 16,
|
||||||
|
"bottom": 15,
|
||||||
|
"guideColour": [
|
||||||
|
4294902015,
|
||||||
|
4294902015,
|
||||||
|
4294902015,
|
||||||
|
4294902015,
|
||||||
|
],
|
||||||
|
"highlightColour": 1728023040,
|
||||||
|
"highlightStyle": 0,
|
||||||
|
"enabled": true,
|
||||||
|
"tileMode": [
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
],
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"loadedVersion": null,
|
||||||
|
"resourceType": "GMNineSliceData",
|
||||||
|
},
|
||||||
"parent": {
|
"parent": {
|
||||||
"name": "nodes",
|
"name": "nodes",
|
||||||
"path": "folders/sprites/nodes.yy",
|
"path": "folders/sprites/nodes.yy",
|
||||||
|
|