mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-01-23 11:28:06 +01:00
1.15rc3
This commit is contained in:
parent
7e69f6088d
commit
98e6f416b4
30 changed files with 37354 additions and 1770 deletions
|
@ -254,7 +254,6 @@
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"UI.json","CopyToMask":-1,"filePath":"datafiles/data/locale/sample locale",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"UI.json","CopyToMask":-1,"filePath":"datafiles/data/locale/sample locale",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"words.json","CopyToMask":-1,"filePath":"datafiles/data/locale/sample locale",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"words.json","CopyToMask":-1,"filePath":"datafiles/data/locale/sample locale",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"nodes.json","CopyToMask":-1,"filePath":"datafiles/data",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"nodes.json","CopyToMask":-1,"filePath":"datafiles/data",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"default x2.zip","CopyToMask":-1,"filePath":"datafiles/data/themes",},
|
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"default.zip","CopyToMask":-1,"filePath":"datafiles/data/themes",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"default.zip","CopyToMask":-1,"filePath":"datafiles/data/themes",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"FiraCode-Medium.ttf","CopyToMask":-1,"filePath":"datafiles/data/themes/default/fonts",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"FiraCode-Medium.ttf","CopyToMask":-1,"filePath":"datafiles/data/themes/default/fonts",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"fonts.json","CopyToMask":-1,"filePath":"datafiles/data/themes/default/fonts",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"fonts.json","CopyToMask":-1,"filePath":"datafiles/data/themes/default/fonts",},
|
||||||
|
@ -624,7 +623,6 @@
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"5 Particle and effectors.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"5 Particle and effectors.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"5 Particle and effectors.pxc","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"5 Particle and effectors.pxc","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"6 Camera.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"6 Camera.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"6 Camera.pxc","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"7 Path.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"7 Path.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"8 Batch processing.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"8 Batch processing.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"9 Armature.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"9 Armature.png","CopyToMask":-1,"filePath":"datafiles/Getting started",},
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -53,10 +53,10 @@ event_inherited();
|
||||||
content_w = dialog_w - ui(36) - folderW;
|
content_w = dialog_w - ui(36) - folderW;
|
||||||
content_h = dialog_h - ui(32);
|
content_h = dialog_h - ui(32);
|
||||||
contentPane.resize(content_w, content_h);
|
contentPane.resize(content_w, content_h);
|
||||||
folderPane.resize(folderW - ui(8), content_h - ui(32));
|
folderPane.resize(folderW - ui(12), content_h - ui(32));
|
||||||
}
|
}
|
||||||
|
|
||||||
folderPane = new scrollPane(folderW - ui(8), content_h - ui(32), function(_y, _m) {
|
folderPane = new scrollPane(folderW - ui(12), content_h - ui(32), function(_y, _m) {
|
||||||
draw_clear_alpha(COLORS.panel_bg_clear, 0);
|
draw_clear_alpha(COLORS.panel_bg_clear, 0);
|
||||||
var hh = 8;
|
var hh = 8;
|
||||||
|
|
||||||
|
|
|
@ -60,13 +60,13 @@ event_inherited();
|
||||||
#region new preset
|
#region new preset
|
||||||
function newPresetFromNode(name) {
|
function newPresetFromNode(name) {
|
||||||
if(node == noone) return;
|
if(node == noone) return;
|
||||||
var dir = DIRECTORY + "Presets/" + instanceof(node) + "/";
|
var dir = $"{DIRECTORY}Presets/{instanceof(node)}/";
|
||||||
if(!directory_exists(dir))
|
if(!directory_exists(dir))
|
||||||
directory_create(dir);
|
directory_create(dir);
|
||||||
|
|
||||||
var pth = dir + name + ".json";
|
var pth = dir + name + ".json";
|
||||||
var map = node.serialize(true, true);
|
var map = node.serialize(true, true);
|
||||||
json_save(pth, map);
|
json_save_struct(pth, map);
|
||||||
__initPresets();
|
__initPresets();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
|
@ -70,6 +70,7 @@
|
||||||
function applyAutoComplete(rep) {
|
function applyAutoComplete(rep) {
|
||||||
var line = array_safe_get(textbox._input_text_line, textbox.cursor_line, "");
|
var line = array_safe_get(textbox._input_text_line, textbox.cursor_line, "");
|
||||||
var crop = string_copy(line, 1, textbox.cursor - textbox.char_run);
|
var crop = string_copy(line, 1, textbox.cursor - textbox.char_run);
|
||||||
|
var rest = string_copy(line, textbox.cursor + 1, string_length(line) - textbox.cursor);
|
||||||
var slp = string_splice(crop, [" ", "(", ","], true);
|
var slp = string_splice(crop, [" ", "(", ","], true);
|
||||||
slp[array_length(slp) - 1] = rep;
|
slp[array_length(slp) - 1] = rep;
|
||||||
|
|
||||||
|
@ -78,12 +79,14 @@
|
||||||
if(i == textbox.cursor_line) {
|
if(i == textbox.cursor_line) {
|
||||||
for( var j = 0; j < array_length(slp); j++ )
|
for( var j = 0; j < array_length(slp); j++ )
|
||||||
txt += slp[j];
|
txt += slp[j];
|
||||||
|
txt += rest;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
txt += textbox._input_text_line[i];
|
txt += textbox._input_text_line[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
txt = string_trim(txt, [ "\n" ]);
|
||||||
var shf = string_length(rep) - string_length(prompt);
|
var shf = string_length(rep) - string_length(prompt);
|
||||||
|
|
||||||
textbox.cursor += shf;
|
textbox.cursor += shf;
|
||||||
|
|
|
@ -31,9 +31,7 @@ if(textbox != WIDGET_CURRENT) exit;
|
||||||
|
|
||||||
#region draw
|
#region draw
|
||||||
draw_sprite_stretched(THEME.textbox, 3, dialog_x, dialog_y, dialog_w, dialog_h);
|
draw_sprite_stretched(THEME.textbox, 3, dialog_x, dialog_y, dialog_w, dialog_h);
|
||||||
|
|
||||||
sc_content.draw(dialog_x, dialog_y);
|
sc_content.draw(dialog_x, dialog_y);
|
||||||
|
|
||||||
draw_sprite_stretched(THEME.textbox, 1, dialog_x, dialog_y, dialog_w, dialog_h);
|
draw_sprite_stretched(THEME.textbox, 1, dialog_x, dialog_y, dialog_w, dialog_h);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
function FileObject(_name, _path) constructor {
|
function FileObject(_name, _path) constructor {
|
||||||
|
static loadThumbnailAsync = false;
|
||||||
|
|
||||||
name = _name;
|
name = _name;
|
||||||
path = _path;
|
path = _path;
|
||||||
spr_path = [];
|
spr_path = [];
|
||||||
|
@ -54,11 +56,16 @@ function FileObject(_name, _path) constructor {
|
||||||
if(sprFetchID != noone) return -1;
|
if(sprFetchID != noone) return -1;
|
||||||
|
|
||||||
if(array_length(spr_path) == 0) {
|
if(array_length(spr_path) == 0) {
|
||||||
sprFetchID = sprite_add_ext(self.path, 0, 0, 0, false);
|
if(loadThumbnailAsync) {
|
||||||
IMAGE_FETCH_MAP[? sprFetchID] = function(load_result) {
|
sprFetchID = sprite_add_ext(self.path, 0, 0, 0, true);
|
||||||
spr = load_result[? "id"];
|
IMAGE_FETCH_MAP[? sprFetchID] = function(load_result) {
|
||||||
|
spr = load_result[? "id"];
|
||||||
|
sprite_set_offset(spr, sprite_get_width(spr) / 2, sprite_get_height(spr) / 2);
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
spr = sprite_add(self.path, 0, false, false, 0, 0);
|
||||||
sprite_set_offset(spr, sprite_get_width(spr) / 2, sprite_get_height(spr) / 2);
|
sprite_set_offset(spr, sprite_get_width(spr) / 2, sprite_get_height(spr) / 2);
|
||||||
};
|
}
|
||||||
return spr;
|
return spr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,12 +74,18 @@ function FileObject(_name, _path) constructor {
|
||||||
|
|
||||||
if(path == 0) return -1;
|
if(path == 0) return -1;
|
||||||
|
|
||||||
sprFetchID = sprite_add_ext(path, amo, 0, 0, false);
|
if(loadThumbnailAsync) {
|
||||||
IMAGE_FETCH_MAP[? sprFetchID] = function(load_result) {
|
sprFetchID = sprite_add_ext(path, amo, 0, 0, true);
|
||||||
spr = load_result[? "id"];
|
IMAGE_FETCH_MAP[? sprFetchID] = function(load_result) {
|
||||||
if(array_safe_get(spr_path, 2))
|
spr = load_result[? "id"];
|
||||||
sprite_set_offset(spr, sprite_get_width(spr) / 2, sprite_get_height(spr) / 2);
|
if(array_safe_get(spr_path, 2))
|
||||||
};
|
sprite_set_offset(spr, sprite_get_width(spr) / 2, sprite_get_height(spr) / 2);
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
spr = sprite_add(path, amo, false, false, 0, 0);
|
||||||
|
if(array_safe_get(spr_path, 2))
|
||||||
|
sprite_set_offset(spr, sprite_get_width(spr) / 2, sprite_get_height(spr) / 2);
|
||||||
|
}
|
||||||
|
|
||||||
return spr;
|
return spr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -218,7 +218,7 @@ function MetaDataManager() constructor {
|
||||||
var path = DIRECTORY + "meta.json";
|
var path = DIRECTORY + "meta.json";
|
||||||
|
|
||||||
if(!file_exists(path)) return meta;
|
if(!file_exists(path)) return meta;
|
||||||
var over = json_load(path);
|
var over = json_load_struct(path);
|
||||||
return meta.deserialize(over);
|
return meta.deserialize(over);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -175,7 +175,8 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
|
|
||||||
doUpdate();
|
doUpdate();
|
||||||
}
|
}
|
||||||
run_in(1, method(self, resetDefault));
|
if(!APPENDING && !LOADING)
|
||||||
|
run_in(1, method(self, resetDefault));
|
||||||
|
|
||||||
static getInputJunctionIndex = function(index) {
|
static getInputJunctionIndex = function(index) {
|
||||||
if(input_display_list == -1)
|
if(input_display_list == -1)
|
||||||
|
|
|
@ -102,7 +102,7 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||||
outputs[| 0] = nodeValue("Value", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, 0)
|
outputs[| 0] = nodeValue("Value", self, JUNCTION_CONNECT.output, VALUE_TYPE.any, 0)
|
||||||
.uncache();
|
.uncache();
|
||||||
|
|
||||||
attributes.inherit_name = true;
|
attributes.inherit_name = !LOADING && !APPENDING;
|
||||||
doTrigger = 0;
|
doTrigger = 0;
|
||||||
|
|
||||||
_onSetDisplayName = function() {
|
_onSetDisplayName = function() {
|
||||||
|
|
|
@ -17,7 +17,7 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
||||||
.uncache()
|
.uncache()
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
attributes.inherit_name = true;
|
attributes.inherit_name = !LOADING && !APPENDING;
|
||||||
outParent = undefined;
|
outParent = undefined;
|
||||||
output_index = -1;
|
output_index = -1;
|
||||||
|
|
||||||
|
|
|
@ -303,9 +303,9 @@ function Panel_Animation() : PanelContent() constructor {
|
||||||
]),
|
]),
|
||||||
-1,
|
-1,
|
||||||
menuItemGroup(__txt("Align"), [
|
menuItemGroup(__txt("Align"), [
|
||||||
[ [THEME.timeline_key_halign, 0], function() { alignKeys(fa_left); } ],
|
[ [THEME.object_halign, 0], function() { alignKeys(fa_left); } ],
|
||||||
[ [THEME.timeline_key_halign, 1], function() { alignKeys(fa_center); } ],
|
[ [THEME.object_halign, 1], function() { alignKeys(fa_center); } ],
|
||||||
[ [THEME.timeline_key_halign, 2], function() { alignKeys(fa_right); } ],
|
[ [THEME.object_halign, 2], function() { alignKeys(fa_right); } ],
|
||||||
]),
|
]),
|
||||||
menuItem(__txtx("panel_animation_stagger", "Stagger"), function() { stagger_mode = 1; }),
|
menuItem(__txtx("panel_animation_stagger", "Stagger"), function() { stagger_mode = 1; }),
|
||||||
-1,
|
-1,
|
||||||
|
|
|
@ -236,7 +236,7 @@ function Panel_Collection() : PanelContent() constructor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_set_text(f_p2, fa_center, fa_top, COLORS._main_text_inner);
|
draw_set_text(f_p3, fa_center, fa_top, COLORS._main_text_inner);
|
||||||
name_height = max(name_height, string_height_ext(_node.name, -1, grid_width) + 8);
|
name_height = max(name_height, string_height_ext(_node.name, -1, grid_width) + 8);
|
||||||
draw_text_ext_add(_boxx + grid_size / 2, yy + grid_size + ui(4), _node.name, -1, grid_width);
|
draw_text_ext_add(_boxx + grid_size / 2, yy + grid_size + ui(4), _node.name, -1, grid_width);
|
||||||
}
|
}
|
||||||
|
@ -291,7 +291,7 @@ function Panel_Collection() : PanelContent() constructor {
|
||||||
} else
|
} else
|
||||||
draw_sprite_ui_uniform(THEME.group, 0, spr_x, spr_y, 0.75, c_white);
|
draw_sprite_ui_uniform(THEME.group, 0, spr_x, spr_y, 0.75, c_white);
|
||||||
|
|
||||||
draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text_inner);
|
draw_set_text(f_p3, fa_left, fa_center, COLORS._main_text_inner);
|
||||||
draw_text_add(list_height + ui(20), yy + list_height / 2, _node.name);
|
draw_text_add(list_height + ui(20), yy + list_height / 2, _node.name);
|
||||||
|
|
||||||
yy += list_height;
|
yy += list_height;
|
||||||
|
|
|
@ -717,9 +717,7 @@ function Panel_Inspector() : PanelContent() constructor {
|
||||||
|
|
||||||
if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, __txtx("panel_inspector_set_default", "Set Metadata as default"), THEME.save, 0, COLORS._main_icon) == 2) {
|
if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, __txtx("panel_inspector_set_default", "Set Metadata as default"), THEME.save, 0, COLORS._main_icon) == 2) {
|
||||||
var path = DIRECTORY + "meta.json";
|
var path = DIRECTORY + "meta.json";
|
||||||
var f = file_text_open_write(path);
|
json_save_struct(path, METADATA.serialize());
|
||||||
file_text_write_string(f, json_encode_minify(METADATA.serialize()));
|
|
||||||
file_text_close(f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
by += ui(36);
|
by += ui(36);
|
||||||
|
|
|
@ -1,41 +1,60 @@
|
||||||
function Panel_Node_Align() : PanelContent() constructor {
|
function Panel_Node_Align() : PanelContent() constructor {
|
||||||
title = __txt("Align");
|
title = __txt("Align");
|
||||||
w = ui(200);
|
w = 160;
|
||||||
h = ui(200);
|
h = 32 + 8 * 2;
|
||||||
|
|
||||||
function drawContent(panel) {
|
function drawContent(panel) {
|
||||||
draw_clear_alpha(COLORS.panel_bg_clear, 0);
|
draw_clear_alpha(COLORS.panel_bg_clear, 0);
|
||||||
|
|
||||||
var xc = w / 2;
|
var xx = 8;
|
||||||
var yy = 12;
|
var yy = 8;
|
||||||
|
|
||||||
draw_set_text(f_p2, fa_center, fa_top, COLORS._main_text_sub);
|
/////////////////////////////
|
||||||
draw_text(xc, yy, __txt("Align"));
|
|
||||||
|
|
||||||
yy += ui(24);
|
if(buttonInstant(THEME.button_hide, xx, yy, 32, 32, [mx, my], pFOCUS, pHOVER,, THEME.object_halign, 0, c_white) == 2)
|
||||||
if(buttonInstant(THEME.button_hide, xc - ui(16) - ui(40), yy, 32, 32, [mx, my], pFOCUS, pHOVER,, THEME.inspector_surface_halign, 0, c_white) == 2)
|
|
||||||
node_halign(PANEL_GRAPH.nodes_select_list, fa_left);
|
node_halign(PANEL_GRAPH.nodes_select_list, fa_left);
|
||||||
if(buttonInstant(THEME.button_hide, xc - ui(16), yy, 32, 32, [mx, my], pFOCUS, pHOVER,, THEME.inspector_surface_halign, 1, c_white) == 2)
|
xx += 34
|
||||||
|
|
||||||
|
if(buttonInstant(THEME.button_hide, xx, yy, 32, 32, [mx, my], pFOCUS, pHOVER,, THEME.object_halign, 1, c_white) == 2)
|
||||||
node_halign(PANEL_GRAPH.nodes_select_list, fa_center);
|
node_halign(PANEL_GRAPH.nodes_select_list, fa_center);
|
||||||
if(buttonInstant(THEME.button_hide, xc - ui(16) + ui(40), yy, 32, 32, [mx, my], pFOCUS, pHOVER,, THEME.inspector_surface_halign, 2, c_white) == 2)
|
xx += 34
|
||||||
|
|
||||||
|
if(buttonInstant(THEME.button_hide, xx, yy, 32, 32, [mx, my], pFOCUS, pHOVER,, THEME.object_halign, 2, c_white) == 2)
|
||||||
node_halign(PANEL_GRAPH.nodes_select_list, fa_right);
|
node_halign(PANEL_GRAPH.nodes_select_list, fa_right);
|
||||||
|
xx += 34
|
||||||
|
|
||||||
yy += ui(40);
|
xx += 2;
|
||||||
if(buttonInstant(THEME.button_hide, xc - ui(16) - ui(40), yy, 32, 32, [mx, my], pFOCUS, pHOVER,, THEME.inspector_surface_valign, 0, c_white) == 2)
|
draw_set_color(CDEF.main_dkblack);
|
||||||
|
draw_line_width(xx, yy + 16 - 10, xx, yy + 16 + 10, 3);
|
||||||
|
xx += 6;
|
||||||
|
|
||||||
|
/////////////////////////////
|
||||||
|
|
||||||
|
if(buttonInstant(THEME.button_hide, xx, yy, 32, 32, [mx, my], pFOCUS, pHOVER,, THEME.object_valign, 0, c_white) == 2)
|
||||||
node_valign(PANEL_GRAPH.nodes_select_list, fa_top);
|
node_valign(PANEL_GRAPH.nodes_select_list, fa_top);
|
||||||
if(buttonInstant(THEME.button_hide, xc - ui(16), yy, 32, 32, [mx, my], pFOCUS, pHOVER,, THEME.inspector_surface_valign, 1, c_white) == 2)
|
xx += 34
|
||||||
|
|
||||||
|
if(buttonInstant(THEME.button_hide, xx, yy, 32, 32, [mx, my], pFOCUS, pHOVER,, THEME.object_valign, 1, c_white) == 2)
|
||||||
node_valign(PANEL_GRAPH.nodes_select_list, fa_middle);
|
node_valign(PANEL_GRAPH.nodes_select_list, fa_middle);
|
||||||
if(buttonInstant(THEME.button_hide, xc - ui(16) + ui(40), yy, 32, 32, [mx, my], pFOCUS, pHOVER,, THEME.inspector_surface_valign, 2, c_white) == 2)
|
xx += 34
|
||||||
|
|
||||||
|
if(buttonInstant(THEME.button_hide, xx, yy, 32, 32, [mx, my], pFOCUS, pHOVER,, THEME.object_valign, 2, c_white) == 2)
|
||||||
node_valign(PANEL_GRAPH.nodes_select_list, fa_bottom);
|
node_valign(PANEL_GRAPH.nodes_select_list, fa_bottom);
|
||||||
|
xx += 34
|
||||||
|
|
||||||
yy += ui(44);
|
xx += 2;
|
||||||
draw_set_text(f_p2, fa_center, fa_top, COLORS._main_text_sub);
|
draw_set_color(CDEF.main_dkblack);
|
||||||
draw_text(xc, yy, __txt("Distribute"));
|
draw_line_width(xx, yy + 16 - 10, xx, yy + 16 + 10, 3);
|
||||||
|
xx += 6;
|
||||||
|
|
||||||
yy += ui(24);
|
/////////////////////////////
|
||||||
if(buttonInstant(THEME.button_hide, xc - ui(16) - ui(20), yy, 32, 32, [mx, my], pFOCUS, pHOVER,, THEME.obj_distribute_h, 0, c_white) == 2)
|
|
||||||
|
if(buttonInstant(THEME.button_hide, xx, yy, 32, 32, [mx, my], pFOCUS, pHOVER,, THEME.obj_distribute_h, 0, c_white) == 2)
|
||||||
node_hdistribute(PANEL_GRAPH.nodes_select_list);
|
node_hdistribute(PANEL_GRAPH.nodes_select_list);
|
||||||
if(buttonInstant(THEME.button_hide, xc - ui(16) + ui(20), yy, 32, 32, [mx, my], pFOCUS, pHOVER,, THEME.obj_distribute_v, 0, c_white) == 2)
|
xx += 34
|
||||||
|
|
||||||
|
if(buttonInstant(THEME.button_hide, xx, yy, 32, 32, [mx, my], pFOCUS, pHOVER,, THEME.obj_distribute_v, 0, c_white) == 2)
|
||||||
node_vdistribute(PANEL_GRAPH.nodes_select_list);
|
node_vdistribute(PANEL_GRAPH.nodes_select_list);
|
||||||
|
xx += 34
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -29,7 +29,7 @@
|
||||||
for( var j = 0; j < ds_list_size(grp.content); j++ ) {
|
for( var j = 0; j < ds_list_size(grp.content); j++ ) {
|
||||||
var pth = grp.content[| j].path;
|
var pth = grp.content[| j].path;
|
||||||
var f = new FileObject(grp.content[| j].name, pth);
|
var f = new FileObject(grp.content[| j].name, pth);
|
||||||
f.content = json_load(pth);
|
f.content = json_load_struct(pth);
|
||||||
array_push(l, f);
|
array_push(l, f);
|
||||||
}
|
}
|
||||||
global.PRESETS_MAP[? grp.name] = l;
|
global.PRESETS_MAP[? grp.name] = l;
|
||||||
|
|
|
@ -278,12 +278,11 @@ function functionStringClean(fx) {
|
||||||
dependency = [];
|
dependency = [];
|
||||||
|
|
||||||
static _string = function(str) {
|
static _string = function(str) {
|
||||||
return string_char_at(str, 1) == "\"" &&
|
return string_char_at(str, 1) == "\"" && string_char_at(str, string_length(str)) == "\"";
|
||||||
string_char_at(str, string_length(str)) == "\"";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static _string_trim = function(str) {
|
static _string_trim = function(str) {
|
||||||
return _string(str)? string_copy(str, 2, string_length(str) - 2) : string(str);
|
return string_trim(str, [ "\"" ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static getVal = function(val, params = {}, getRaw = false) {
|
static getVal = function(val, params = {}, getRaw = false) {
|
||||||
|
@ -298,8 +297,10 @@ function functionStringClean(fx) {
|
||||||
if(struct_has(params, val))
|
if(struct_has(params, val))
|
||||||
return struct_try_get(params, val);
|
return struct_try_get(params, val);
|
||||||
|
|
||||||
if(_string(string_trim(val)))
|
val = string_trim(val);
|
||||||
return string_trim(val);
|
|
||||||
|
if(_string(val))
|
||||||
|
return _string_trim(val);
|
||||||
|
|
||||||
return nodeGetData(val);
|
return nodeGetData(val);
|
||||||
}
|
}
|
||||||
|
@ -465,10 +466,8 @@ function functionStringClean(fx) {
|
||||||
switch(_symbol) {
|
switch(_symbol) {
|
||||||
case "+":
|
case "+":
|
||||||
case "⊕":
|
case "⊕":
|
||||||
if(_string(v1) || _string(v2))
|
if(is_string(v1) || is_string(v2)) return string(v1) + string(v2);
|
||||||
return _string_trim(v1) + _string_trim(v2);
|
if(is_real(v1) && is_real(v2)) return v1 + v2;
|
||||||
if(is_real(v1) && is_real(v2))
|
|
||||||
return v1 + v2;
|
|
||||||
return 0;
|
return 0;
|
||||||
case "-":
|
case "-":
|
||||||
case "⊖": return (is_real(v1) && is_real(v2))? v1 - v2 : 0;
|
case "⊖": return (is_real(v1) && is_real(v2))? v1 - v2 : 0;
|
||||||
|
|
|
@ -265,7 +265,7 @@ function textArea(_input, _onModify, _extras = noone) : textInput(_input, _onMod
|
||||||
var ss = "";
|
var ss = "";
|
||||||
|
|
||||||
for( var i = 0, n = array_length(_txtLines); i < n; i++ ) {
|
for( var i = 0, n = array_length(_txtLines); i < n; i++ ) {
|
||||||
var _txt = _txtLines[i] + (i < array_length(_txtLines)? "\n" : "");
|
var _txt = _txtLines[i] + (i < array_length(_txtLines)? "\n" : "");
|
||||||
var words = string_splice(_txt, " ");
|
var words = string_splice(_txt, " ");
|
||||||
var currW = 0;
|
var currW = 0;
|
||||||
var currL = "";
|
var currL = "";
|
||||||
|
|
|
@ -227,8 +227,8 @@ function Theme() constructor {
|
||||||
timeline_elastic = noone;
|
timeline_elastic = noone;
|
||||||
timeline_keyframe = noone;
|
timeline_keyframe = noone;
|
||||||
timeline_keyframe_selecting = noone;
|
timeline_keyframe_selecting = noone;
|
||||||
timeline_key_halign = noone;
|
object_halign = noone;
|
||||||
timeline_key_valign = noone;
|
object_valign = noone;
|
||||||
timeline_onion_skin = noone;
|
timeline_onion_skin = noone;
|
||||||
|
|
||||||
obj_distribute_h = noone;
|
obj_distribute_h = noone;
|
||||||
|
|
|
@ -11,7 +11,6 @@ function vectorBox(_size, _onModify, _unit = noone) : widget() constructor {
|
||||||
|
|
||||||
linked = false;
|
linked = false;
|
||||||
b_link = button(function() { linked = !linked; });
|
b_link = button(function() { linked = !linked; });
|
||||||
b_link.icon = THEME.value_link;
|
|
||||||
|
|
||||||
onModifyIndex = function(index, val) {
|
onModifyIndex = function(index, val) {
|
||||||
var v = toNumber(val);
|
var v = toNumber(val);
|
||||||
|
@ -106,9 +105,10 @@ function vectorBox(_size, _onModify, _unit = noone) : widget() constructor {
|
||||||
}
|
}
|
||||||
|
|
||||||
b_link.setFocusHover(active, hover);
|
b_link.setFocusHover(active, hover);
|
||||||
b_link.icon_index = linked;
|
b_link.icon = THEME.value_link;
|
||||||
b_link.icon_blend = linked? COLORS._main_accent : COLORS._main_icon;
|
b_link.icon_index = linked;
|
||||||
b_link.tooltip = linked? __txt("Unlink values") : __txt("Link values");
|
b_link.icon_blend = linked? COLORS._main_accent : COLORS._main_icon;
|
||||||
|
b_link.tooltip = linked? __txt("Unlink values") : __txt("Link values");
|
||||||
|
|
||||||
var bx = _x;
|
var bx = _x;
|
||||||
var by = _y + _h / 2 - ui(32 / 2);
|
var by = _y + _h / 2 - ui(32 / 2);
|
||||||
|
|
Loading…
Reference in a new issue