mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-01-23 11:28:06 +01:00
- [Line] Fix line error when inverted in fix length mode.
This commit is contained in:
parent
0b28909dc0
commit
538e206cfb
26 changed files with 29002 additions and 24905 deletions
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -337,5 +337,11 @@
|
||||||
"points": "Points",
|
"points": "Points",
|
||||||
"text_area": "Text Area",
|
"text_area": "Text Area",
|
||||||
|
|
||||||
|
"safe_mode": "SAFE MODE",
|
||||||
|
"read_only": "READ ONLY",
|
||||||
|
"untitled": "Untitled",
|
||||||
|
"supporter": "Supporter",
|
||||||
|
"supporter_exclusive": "Supporter exclusive",
|
||||||
|
|
||||||
"" : ""
|
"" : ""
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load diff
|
@ -298,7 +298,7 @@ event_inherited();
|
||||||
if(i == ADD_NODE_PAGE) draw_set_text(f_p0b, fa_left, fa_center, COLORS._main_text_accent);
|
if(i == ADD_NODE_PAGE) draw_set_text(f_p0b, fa_left, fa_center, COLORS._main_text_accent);
|
||||||
else draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text_inner);
|
else draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text_inner);
|
||||||
|
|
||||||
var _is_extra = name == "Extra";
|
var _is_extra = name == "Supporter";
|
||||||
name = __txt(name);
|
name = __txt(name);
|
||||||
|
|
||||||
var _tx = ui(8);
|
var _tx = ui(8);
|
||||||
|
|
|
@ -78,10 +78,8 @@ if(OS == os_windows && gameframe_is_minimized()) exit;
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
var tt = "";
|
var tt = "";
|
||||||
if(is_struct(content))
|
if(is_struct(content)) tt = $"[{instanceof(content)}] {content}";
|
||||||
tt = $"[{instanceof(content)}] {content}";
|
else tt = string(content);
|
||||||
else
|
|
||||||
tt = string(content);
|
|
||||||
|
|
||||||
draw_tooltip_text(tt);
|
draw_tooltip_text(tt);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
//print("===== Game Start Begin =====");
|
//print("===== Game Start Begin =====");
|
||||||
|
|
||||||
#region directory
|
#region directory
|
||||||
globalvar DIRECTORY, APP_DIRECTORY, PRESIST_PREF;
|
globalvar DIRECTORY, APP_DIRECTORY, APP_LOCATION, PRESIST_PREF;
|
||||||
DIRECTORY = "";
|
DIRECTORY = "";
|
||||||
PRESIST_PREF = {};
|
PRESIST_PREF = {};
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
//directory_set_current_working(DIRECTORY);
|
//directory_set_current_working(DIRECTORY);
|
||||||
|
|
||||||
METADATA = __getdefaultMetaData();
|
METADATA = __getdefaultMetaData();
|
||||||
|
APP_LOCATION = program_directory;
|
||||||
//print($"===================== WORKING DIRECTORIES =====================\n\t{working_directory}\n\t{DIRECTORY}");
|
//print($"===================== WORKING DIRECTORIES =====================\n\t{working_directory}\n\t{DIRECTORY}");
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ function filepath_resolve(path) {
|
||||||
var _path = path;
|
var _path = path;
|
||||||
|
|
||||||
_path = string_replace_all(_path, "%DIR%/", DIRECTORY);
|
_path = string_replace_all(_path, "%DIR%/", DIRECTORY);
|
||||||
_path = string_replace_all(_path, "%APP%/", program_directory);
|
_path = string_replace_all(_path, "%APP%/", APP_LOCATION);
|
||||||
|
|
||||||
return _path;
|
return _path;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,10 +25,10 @@
|
||||||
|
|
||||||
globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER;
|
globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER;
|
||||||
|
|
||||||
VERSION = 11581;
|
VERSION = 11582;
|
||||||
SAVE_VERSION = 11570;
|
SAVE_VERSION = 11570;
|
||||||
VERSION_STRING = "1.16rc1";
|
VERSION_STRING = "1.16rc2";
|
||||||
BUILD_NUMBER = 11581;
|
BUILD_NUMBER = 11582;
|
||||||
|
|
||||||
globalvar APPEND_MAP;
|
globalvar APPEND_MAP;
|
||||||
APPEND_MAP = ds_map_create();
|
APPEND_MAP = ds_map_create();
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#region locale
|
#region locale
|
||||||
globalvar LOCALE, TEST_LOCALE, LOCALE_USE_DEFAULT;
|
globalvar LOCALE, TEST_LOCALE, LOCALE_DEF;
|
||||||
LOCALE = {}
|
LOCALE = {}
|
||||||
TEST_LOCALE = false;
|
TEST_LOCALE = false;
|
||||||
LOCALE_USE_DEFAULT = true;
|
LOCALE_DEF = true;
|
||||||
|
|
||||||
function __initLocale() {
|
function __initLocale() { #region
|
||||||
var lfile = $"data/locale/en.zip";
|
var lfile = $"data/locale/en.zip";
|
||||||
var root = $"{DIRECTORY}Locale";
|
var root = $"{DIRECTORY}Locale";
|
||||||
|
|
||||||
|
@ -13,16 +13,16 @@
|
||||||
zip_unzip(lfile, root);
|
zip_unzip(lfile, root);
|
||||||
|
|
||||||
loadLocale();
|
loadLocale();
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function __locale_file(file) {
|
function __locale_file(file) { #region
|
||||||
var dirr = $"{DIRECTORY}Locale/{PREFERENCES.local}";
|
var dirr = $"{DIRECTORY}Locale/{PREFERENCES.local}";
|
||||||
if(!directory_exists(dirr) || !file_exists(dirr + file))
|
if(!directory_exists(dirr) || !file_exists(dirr + file))
|
||||||
dirr = $"{DIRECTORY}Locale/en";
|
dirr = $"{DIRECTORY}Locale/en";
|
||||||
return dirr + file;
|
return dirr + file;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function loadLocale() {
|
function loadLocale() { #region
|
||||||
LOCALE.word = json_load_struct(__locale_file("/words.json"));
|
LOCALE.word = json_load_struct(__locale_file("/words.json"));
|
||||||
LOCALE.ui = json_load_struct(__locale_file("/UI.json"));
|
LOCALE.ui = json_load_struct(__locale_file("/UI.json"));
|
||||||
LOCALE.node = json_load_struct(__locale_file("/nodes.json"));
|
LOCALE.node = json_load_struct(__locale_file("/nodes.json"));
|
||||||
|
@ -32,9 +32,9 @@
|
||||||
LOCALE.fontDir = directory_exists(fontDir)? fontDir : noone;
|
LOCALE.fontDir = directory_exists(fontDir)? fontDir : noone;
|
||||||
|
|
||||||
print("FONT DIR: " + fontDir);
|
print("FONT DIR: " + fontDir);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function __txtx(key, def = "") {
|
function __txtx(key, def = "") { #region
|
||||||
INLINE
|
INLINE
|
||||||
|
|
||||||
if(key == "") return "";
|
if(key == "") return "";
|
||||||
|
@ -46,15 +46,15 @@
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(LOCALE_USE_DEFAULT) return def;
|
if(LOCALE_DEF) return def;
|
||||||
|
|
||||||
if(struct_has(LOCALE.word, key)) return LOCALE.word[$ key];
|
if(struct_has(LOCALE.word, key)) return LOCALE.word[$ key];
|
||||||
if(struct_has(LOCALE.ui, key)) return LOCALE.ui[$ key];
|
if(struct_has(LOCALE.ui, key)) return LOCALE.ui[$ key];
|
||||||
|
|
||||||
return def;
|
return def;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function __txt(txt, prefix = "") {
|
function __txt(txt, prefix = "") { #region
|
||||||
INLINE
|
INLINE
|
||||||
|
|
||||||
if(txt == "") return "";
|
if(txt == "") return "";
|
||||||
|
@ -68,46 +68,68 @@
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
if(LOCALE_USE_DEFAULT) return txt;
|
if(LOCALE_DEF) return txt;
|
||||||
return __txtx(prefix + key, txt);
|
return __txtx(prefix + key, txt);
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function __txta(txt) {
|
function __txta(txt) { #region
|
||||||
var _txt = __txt(txt);
|
var _txt = __txt(txt);
|
||||||
for(var i = 1; i < argument_count; i++)
|
for(var i = 1; i < argument_count; i++)
|
||||||
_txt = string_replace_all(_txt, "{" + string(i) + "}", string(argument[i]));
|
_txt = string_replace_all(_txt, "{" + string(i) + "}", string(argument[i]));
|
||||||
|
|
||||||
return _txt;
|
return _txt;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function __txt_node_name(node, def = "") {
|
function __txt_node_name(node, def = "") { #region
|
||||||
INLINE
|
INLINE
|
||||||
|
|
||||||
if(LOCALE_USE_DEFAULT) return def;
|
if(TEST_LOCALE) {
|
||||||
|
if(!struct_has(LOCALE.node, node)) {
|
||||||
|
show_debug_message($"LOCALE [NODE]: \"{node}\": \"{def}\",");
|
||||||
|
return def;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(LOCALE_DEF) return def;
|
||||||
|
|
||||||
if(!struct_has(LOCALE.node, node))
|
if(!struct_has(LOCALE.node, node))
|
||||||
return def;
|
return def;
|
||||||
|
|
||||||
if(TEST_LOCALE) return "";
|
return LOCALE.node[$ node].name;
|
||||||
return def;
|
} #endregion
|
||||||
}
|
|
||||||
|
|
||||||
function __txt_node_tooltip(node, def = "") {
|
function __txt_node_tooltip(node, def = "") { #region
|
||||||
INLINE
|
INLINE
|
||||||
|
|
||||||
if(LOCALE_USE_DEFAULT) return def;
|
if(TEST_LOCALE) {
|
||||||
|
if(!struct_has(LOCALE.node, node)) {
|
||||||
|
show_debug_message($"LOCALE [TIP]: \"{node}\": \"{def}\",");
|
||||||
|
return def;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(LOCALE_DEF) return def;
|
||||||
|
|
||||||
if(!struct_has(LOCALE.node, node))
|
if(!struct_has(LOCALE.node, node))
|
||||||
return def;
|
return def;
|
||||||
|
|
||||||
if(TEST_LOCALE) return "";
|
|
||||||
return LOCALE.node[$ node].tooltip;
|
return LOCALE.node[$ node].tooltip;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function __txt_junction_name(node, type, index, def = "") {
|
function __txt_junction_name(node, type, index, def = "") { #region
|
||||||
INLINE
|
INLINE
|
||||||
|
|
||||||
if(LOCALE_USE_DEFAULT) return def;
|
if(TEST_LOCALE) {
|
||||||
|
if(!struct_has(LOCALE.node, node)) {
|
||||||
|
show_debug_message($"LOCALE [JNAME]: \"{node}\": \"{def}\",");
|
||||||
|
return def;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(LOCALE_DEF) return def;
|
||||||
|
|
||||||
if(!struct_has(LOCALE.node, node))
|
if(!struct_has(LOCALE.node, node))
|
||||||
return def;
|
return def;
|
||||||
|
@ -116,14 +138,21 @@
|
||||||
var lst = type == JUNCTION_CONNECT.input? nde.inputs : nde.outputs;
|
var lst = type == JUNCTION_CONNECT.input? nde.inputs : nde.outputs;
|
||||||
if(index >= array_length(lst)) return def;
|
if(index >= array_length(lst)) return def;
|
||||||
|
|
||||||
if(TEST_LOCALE) return "";
|
|
||||||
return lst[index].name;
|
return lst[index].name;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function __txt_junction_tooltip(node, type, index, def = "") {
|
function __txt_junction_tooltip(node, type, index, def = "") { #region
|
||||||
INLINE
|
INLINE
|
||||||
|
|
||||||
if(LOCALE_USE_DEFAULT) return def;
|
if(TEST_LOCALE) {
|
||||||
|
if(!struct_has(LOCALE.node, node)) {
|
||||||
|
show_debug_message($"LOCALE [JTIP]: \"{node}\": \"{def}\",");
|
||||||
|
return def;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(LOCALE_DEF) return def;
|
||||||
|
|
||||||
if(!struct_has(LOCALE.node, node))
|
if(!struct_has(LOCALE.node, node))
|
||||||
return def;
|
return def;
|
||||||
|
@ -132,14 +161,21 @@
|
||||||
var lst = type == JUNCTION_CONNECT.input? nde.inputs : nde.outputs;
|
var lst = type == JUNCTION_CONNECT.input? nde.inputs : nde.outputs;
|
||||||
if(index >= array_length(lst)) return def;
|
if(index >= array_length(lst)) return def;
|
||||||
|
|
||||||
if(TEST_LOCALE) return "";
|
|
||||||
return lst[index].tooltip;
|
return lst[index].tooltip;
|
||||||
}
|
} #endregion
|
||||||
|
|
||||||
function __txt_junction_data(node, type, index, def = []) {
|
function __txt_junction_data(node, type, index, def = []) { #region
|
||||||
INLINE
|
INLINE
|
||||||
|
|
||||||
return def;
|
if(TEST_LOCALE) {
|
||||||
|
if(!struct_has(LOCALE.node, node)) {
|
||||||
|
show_debug_message($"LOCALE [DDATA]: \"{node}\": \"{def}\",");
|
||||||
|
return def;
|
||||||
|
}
|
||||||
|
return [ "" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(LOCALE_DEF) return def;
|
||||||
|
|
||||||
if(!struct_has(LOCALE.node, node))
|
if(!struct_has(LOCALE.node, node))
|
||||||
return def;
|
return def;
|
||||||
|
@ -151,7 +187,6 @@
|
||||||
if(!struct_has(lst[index], "display_data"))
|
if(!struct_has(lst[index], "display_data"))
|
||||||
return def;
|
return def;
|
||||||
|
|
||||||
if(TEST_LOCALE) return [ "" ];
|
|
||||||
return lst[index].display_data;
|
return lst[index].display_data;
|
||||||
}
|
} #endregion
|
||||||
#endregion
|
#endregion
|
|
@ -72,11 +72,11 @@ function Node_3D_Repeat(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr
|
||||||
var _Asca = _data[11];
|
var _Asca = _data[11];
|
||||||
var _inst = _data[12];
|
var _inst = _data[12];
|
||||||
|
|
||||||
if(_mode == 1 && !is_array(_object)) return noone;
|
|
||||||
var _amo = _mode == 1? array_length(_object) : _data[2];
|
|
||||||
|
|
||||||
var _scene = new __3dGroup();
|
var _scene = new __3dGroup();
|
||||||
|
|
||||||
|
if(_mode == 1 && !is_array(_object)) return _scene;
|
||||||
|
var _amo = _mode == 1? array_length(_object) : _data[2];
|
||||||
|
|
||||||
for( var i = 0; i < _amo; i++ ) {
|
for( var i = 0; i < _amo; i++ ) {
|
||||||
var _obj = _mode == 1? _object[i] : _object;
|
var _obj = _mode == 1? _object[i] : _object;
|
||||||
if(_obj == noone) continue;
|
if(_obj == noone) continue;
|
||||||
|
|
|
@ -60,7 +60,7 @@ function Node_Boolean(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
if(!active) return;
|
if(!active) return;
|
||||||
if(_s < 0.75) return;
|
if(_s < 0.75) return;
|
||||||
|
|
||||||
var _name = display_name == ""? name : display_name;
|
var _name = renamed? display_name : name;
|
||||||
if(_name == "") return;
|
if(_name == "") return;
|
||||||
|
|
||||||
var hid = getInputData(1);
|
var hid = getInputData(1);
|
||||||
|
|
|
@ -47,9 +47,9 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
PROJECT.modified = true;
|
PROJECT.modified = true;
|
||||||
|
|
||||||
run_in(1, function() {
|
run_in(1, function() {
|
||||||
if(display_name != "") return;
|
|
||||||
resetInternalName();
|
resetInternalName();
|
||||||
display_name = __txt_node_name(instanceof(self), name);
|
display_name = __txt_node_name(instanceof(self), name);
|
||||||
|
if(!LOCALE_DEF || TESTING) renamed = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
RENDER_ALL_REORDER
|
RENDER_ALL_REORDER
|
||||||
|
@ -392,7 +392,8 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static getFullName = function() { #region
|
static getFullName = function() { #region
|
||||||
return display_name == ""? name : "[" + name + "] " + display_name;
|
INLINE
|
||||||
|
return renamed? "[" + name + "] " + display_name : name;
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static addInput = function(junctionFrom, shift = input_fix_len) { #region
|
static addInput = function(junctionFrom, shift = input_fix_len) { #region
|
||||||
|
@ -856,7 +857,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
if(!active) return;
|
if(!active) return;
|
||||||
|
|
||||||
draw_name = false;
|
draw_name = false;
|
||||||
var _name = display_name == ""? name : display_name;
|
var _name = renamed? display_name : name;
|
||||||
if(_name == "") return;
|
if(_name == "") return;
|
||||||
if(_s < 0.75) return;
|
if(_s < 0.75) return;
|
||||||
draw_name = true;
|
draw_name = true;
|
||||||
|
|
|
@ -218,10 +218,10 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
||||||
gifski = filepath_resolve(PREFERENCES.gifski_path) + "win/gifski.exe";
|
gifski = filepath_resolve(PREFERENCES.gifski_path) + "win/gifski.exe";
|
||||||
ffmpeg = filepath_resolve(PREFERENCES.ffmpeg_path) + "bin/ffmpeg.exe";
|
ffmpeg = filepath_resolve(PREFERENCES.ffmpeg_path) + "bin/ffmpeg.exe";
|
||||||
|
|
||||||
if(!file_exists(converter) || !file_exists(magick)) noti_warning("No ImageMagick deteced, please make sure the installation is complete and ImageMagick path is set properly in preference.");
|
if(!file_exists(converter) || !file_exists(magick)) noti_warning($"No ImageMagick detected at {magick}, please make sure the installation is complete and ImageMagick path is set properly in preference.");
|
||||||
if(!file_exists(webp)) noti_warning("No webp deteced, please make sure the installation is complete and webp path is set properly in preference.");
|
if(!file_exists(webp)) noti_warning($"No webp detected at {webp}, please make sure the installation is complete and webp path is set properly in preference.");
|
||||||
if(!file_exists(gifski)) noti_warning("No gifski deteced, please make sure the installation is complete and gifski path is set properly in preference.");
|
if(!file_exists(gifski)) noti_warning($"No gifski detected at {gifski}, please make sure the installation is complete and gifski path is set properly in preference.");
|
||||||
if(!file_exists(ffmpeg)) noti_warning("No ffmpeg deteced, please make sure the installation is complete and ffmpeg path is set properly in preference.");
|
if(!file_exists(ffmpeg)) noti_warning($"No ffmpeg detected at {ffmpeg}, please make sure the installation is complete and ffmpeg path is set properly in preference.");
|
||||||
|
|
||||||
static onValueUpdate = function(_index) { #region
|
static onValueUpdate = function(_index) { #region
|
||||||
var form = getInputData(3);
|
var form = getInputData(3);
|
||||||
|
|
|
@ -58,7 +58,7 @@ function Node_Frame(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
|
|
||||||
static drawNodeBase = function(xx, yy, _s) { #region
|
static drawNodeBase = function(xx, yy, _s) { #region
|
||||||
draw_sprite_stretched_ext(bg_spr, 0, xx, yy, w * _s, h * _s, color, alpha);
|
draw_sprite_stretched_ext(bg_spr, 0, xx, yy, w * _s, h * _s, color, alpha);
|
||||||
var txt = display_name == ""? name : display_name;
|
var txt = renamed? display_name : name;
|
||||||
|
|
||||||
hover_progress = lerp_float(hover_progress, name_hover, 2);
|
hover_progress = lerp_float(hover_progress, name_hover, 2);
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ function Node_Frame(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
var xx = x * _s + _x;
|
var xx = x * _s + _x;
|
||||||
var yy = y * _s + _y;
|
var yy = y * _s + _y;
|
||||||
|
|
||||||
var txt = display_name == ""? name : display_name;
|
var txt = renamed? display_name : name;
|
||||||
draw_set_font(f_h5);
|
draw_set_font(f_h5);
|
||||||
var ww = string_width(txt) + 24 + 8;
|
var ww = string_width(txt) + 24 + 8;
|
||||||
var hh = string_height("l") + 8;
|
var hh = string_height("l") + 8;
|
||||||
|
|
|
@ -225,6 +225,7 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
||||||
var _prog_total = 0; //Record how far the pointer have moved so far
|
var _prog_total = 0; //Record how far the pointer have moved so far
|
||||||
var points = [];
|
var points = [];
|
||||||
var wght;
|
var wght;
|
||||||
|
var _pathPng;
|
||||||
|
|
||||||
if(_useDistance) {
|
if(_useDistance) {
|
||||||
_pathStr *= _pathLength;
|
_pathStr *= _pathLength;
|
||||||
|
@ -246,15 +247,17 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
||||||
|
|
||||||
if(_prog_next == segmentLength)
|
if(_prog_next == segmentLength)
|
||||||
_segIndex = (_segIndex + 1) % array_length(_segLength);
|
_segIndex = (_segIndex + 1) % array_length(_segLength);
|
||||||
|
_pathPng = _ratInv? _pathLength - _prog_curr : _prog_curr;
|
||||||
} else {
|
} else {
|
||||||
if(_prog_curr >= 1) //Wrap overflow path
|
if(_prog_curr >= 1) //Wrap overflow path
|
||||||
_prog_next = frac(_prog_curr);
|
_prog_next = frac(_prog_curr);
|
||||||
else
|
else
|
||||||
_prog_next = min(_prog_curr + _stepLen, 1); //Move forward _stepLen or _total (if less) stop at 1
|
_prog_next = min(_prog_curr + _stepLen, 1); //Move forward _stepLen or _total (if less) stop at 1
|
||||||
|
_pathPng = _ratInv? 1 - _prog_curr : _prog_curr;
|
||||||
}
|
}
|
||||||
|
|
||||||
wght = 1;
|
wght = 1;
|
||||||
var _pathPng = _ratInv? 1 - _prog_curr : _prog_curr;
|
|
||||||
if(_useDistance) {
|
if(_useDistance) {
|
||||||
p = _pat.getPointDistance(_pathPng, i, p);
|
p = _pat.getPointDistance(_pathPng, i, p);
|
||||||
if(struct_has(_pat, "getWeightRatio"))
|
if(struct_has(_pat, "getWeightRatio"))
|
||||||
|
|
|
@ -100,7 +100,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
|
||||||
|
|
||||||
draw_sprite_ext(s_patreon_supporter, 1, spr_x, spr_y, 1, 1, 0, COLORS._main_accent, 1);
|
draw_sprite_ext(s_patreon_supporter, 1, spr_x, spr_y, 1, 1, 0, COLORS._main_accent, 1);
|
||||||
|
|
||||||
if(point_in_circle(_mx, _my, spr_x, spr_y, 10)) TOOLTIP = "Supporter exclusive";
|
if(point_in_circle(_mx, _my, spr_x, spr_y, 10)) TOOLTIP = __txt("Supporter exclusive");
|
||||||
}
|
}
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
|
||||||
|
|
||||||
draw_sprite_ext(s_patreon_supporter, 1, spr_x, spr_y, 1, 1, 0, COLORS._main_accent, 1);
|
draw_sprite_ext(s_patreon_supporter, 1, spr_x, spr_y, 1, 1, 0, COLORS._main_accent, 1);
|
||||||
|
|
||||||
if(point_in_circle(_mx, _my, spr_x, spr_y, 10)) TOOLTIP = "Supporter exclusive";
|
if(point_in_circle(_mx, _my, spr_x, spr_y, 10)) TOOLTIP = __txt("Supporter exclusive");
|
||||||
}
|
}
|
||||||
|
|
||||||
return tx;
|
return tx;
|
||||||
|
|
|
@ -1268,7 +1268,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
||||||
tt = __txt("Global");
|
tt = __txt("Global");
|
||||||
} else {
|
} else {
|
||||||
var _cnt = node_context[| i];
|
var _cnt = node_context[| i];
|
||||||
tt = _cnt.display_name == ""? _cnt.name : _cnt.display_name;
|
tt = _cnt.renamed? _cnt.display_name : _cnt.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
tw = string_width(tt);
|
tw = string_width(tt);
|
||||||
|
@ -1514,7 +1514,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
||||||
dragGraph();
|
dragGraph();
|
||||||
|
|
||||||
var context = getCurrentContext();
|
var context = getCurrentContext();
|
||||||
if(context != noone) title_raw += " > " + (context.display_name == ""? context.name : context.display_name);
|
if(context != noone) title_raw += " > " + (context.renamed? context.display_name : context.name);
|
||||||
|
|
||||||
bg_color = context == noone? COLORS.panel_bg_clear : merge_color(COLORS.panel_bg_clear, context.getColor(), 0.05);
|
bg_color = context == noone? COLORS.panel_bg_clear : merge_color(COLORS.panel_bg_clear, context.getColor(), 0.05);
|
||||||
draw_clear(bg_color);
|
draw_clear(bg_color);
|
||||||
|
|
|
@ -732,7 +732,7 @@ function Panel_Inspector() : PanelContent() constructor {
|
||||||
tb_node_name.setFocusHover(pFOCUS, pHOVER);
|
tb_node_name.setFocusHover(pFOCUS, pHOVER);
|
||||||
tb_node_name.align = fa_center;
|
tb_node_name.align = fa_center;
|
||||||
tb_node_name.format = TEXT_AREA_FORMAT.node_title;
|
tb_node_name.format = TEXT_AREA_FORMAT.node_title;
|
||||||
var txt = inspecting.display_name == ""? inspecting.name : inspecting.display_name;
|
var txt = inspecting.renamed? inspecting.display_name : inspecting.name;
|
||||||
tb_node_name.draw(ui(64), ui(14), w - ui(128), ui(32), txt, [mx, my]);
|
tb_node_name.draw(ui(64), ui(14), w - ui(128), ui(32), txt, [mx, my]);
|
||||||
|
|
||||||
draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text_sub);
|
draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text_sub);
|
||||||
|
@ -795,7 +795,7 @@ function Panel_Inspector() : PanelContent() constructor {
|
||||||
inspecting = noone;
|
inspecting = noone;
|
||||||
|
|
||||||
if(inspecting) {
|
if(inspecting) {
|
||||||
title = inspecting.display_name == ""? inspecting.name : inspecting.display_name;
|
title = inspecting.renamed? inspecting.display_name : inspecting.name;
|
||||||
inspecting.inspectorStep();
|
inspecting.inspectorStep();
|
||||||
drawInspectingNode();
|
drawInspectingNode();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -647,10 +647,10 @@ function Panel_Menu() : PanelContent() constructor {
|
||||||
|
|
||||||
#region title
|
#region title
|
||||||
var txt = "";
|
var txt = "";
|
||||||
if(PROJECT.safeMode) txt += "[SAFE MODE] ";
|
if(PROJECT.safeMode) txt += $"[{__txt("SAFE MODE")}] ";
|
||||||
if(PROJECT.readonly) txt += "[READ ONLY] ";
|
if(PROJECT.readonly) txt += $"[{__txt("READ ONLY")}] ";
|
||||||
|
|
||||||
txt += PROJECT.path == ""? "Untitled" : filename_name(PROJECT.path);
|
txt += PROJECT.path == ""? __txt("Untitled") : filename_name(PROJECT.path);
|
||||||
if(PROJECT.modified) txt += "*";
|
if(PROJECT.modified) txt += "*";
|
||||||
txt += " - Pixel Composer";
|
txt += " - Pixel Composer";
|
||||||
if(ALPHA) txt += " ALPHA";
|
if(ALPHA) txt += " ALPHA";
|
||||||
|
@ -742,7 +742,7 @@ function Panel_Menu() : PanelContent() constructor {
|
||||||
var _ib = COLORS._main_text_sub;
|
var _ib = COLORS._main_text_sub;
|
||||||
|
|
||||||
if(pHOVER && point_in_rectangle(mx, my, _cx - 12, _cy - 12, _cx + 12, _cy + 12)) {
|
if(pHOVER && point_in_rectangle(mx, my, _cx - 12, _cy - 12, _cx + 12, _cy + 12)) {
|
||||||
TOOLTIP = "Supporter";
|
TOOLTIP = __txt("Supporter");
|
||||||
_ib = COLORS._main_accent;
|
_ib = COLORS._main_accent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ function Panel_Nodes() : PanelContent() constructor {
|
||||||
|
|
||||||
for( var i = 0; i < ds_list_size(_list); i++ ) {
|
for( var i = 0; i < ds_list_size(_list); i++ ) {
|
||||||
var node = _list[| i];
|
var node = _list[| i];
|
||||||
var name = node.display_name == ""? node.name : node.display_name;
|
var name = node.renamed? node.display_name : node.name;
|
||||||
|
|
||||||
if(string_lower(search_string) != "" && string_lower(string_pos(search_string, name)) == 0)
|
if(string_lower(search_string) != "" && string_lower(string_pos(search_string, name)) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -615,7 +615,7 @@ function Panel_Preview() : PanelContent() constructor {
|
||||||
|
|
||||||
var _node = getNodePreview();
|
var _node = getNodePreview();
|
||||||
if(_node)
|
if(_node)
|
||||||
title = _node.display_name == ""? _node.name : _node.display_name;
|
title = _node.renamed? _node.display_name : _node.name;
|
||||||
|
|
||||||
if(splitView == 0 && tileMode == 0 && is_surface(preview_surface[0])) {
|
if(splitView == 0 && tileMode == 0 && is_surface(preview_surface[0])) {
|
||||||
var node = preview_node[0];
|
var node = preview_node[0];
|
||||||
|
|
|
@ -129,7 +129,7 @@ function Panel_Tunnels() : PanelContent() constructor {
|
||||||
|
|
||||||
draw_sprite_ui(THEME.tunnel, 0, ui(32), _y + ui(10), 0.75, 0.75, 0, COLORS._main_icon);
|
draw_sprite_ui(THEME.tunnel, 0, ui(32), _y + ui(10), 0.75, 0.75, 0, COLORS._main_icon);
|
||||||
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text_sub);
|
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text_sub);
|
||||||
draw_text(ui(32 + 16), _y + ui(10), _node.display_name == ""? _node.name : _node.display_name);
|
draw_text(ui(32 + 16), _y + ui(10), _node.renamed? _node.display_name : _node.name);
|
||||||
|
|
||||||
|
|
||||||
if(point_in_rectangle(_m[0], _m[1], 0, _y, ww, _y + ui(20)))
|
if(point_in_rectangle(_m[0], _m[1], 0, _y, ww, _y + ui(20)))
|
||||||
|
|
|
@ -198,7 +198,7 @@
|
||||||
var f = json_load_struct(DIRECTORY + "key_nodes.json");
|
var f = json_load_struct(DIRECTORY + "key_nodes.json");
|
||||||
struct_override(HOTKEYS_CUSTOM, f);
|
struct_override(HOTKEYS_CUSTOM, f);
|
||||||
|
|
||||||
LOCALE_USE_DEFAULT = PREFERENCES.local == "en";
|
LOCALE_DEF = PREFERENCES.local == "en";
|
||||||
|
|
||||||
directory_verify(filepath_resolve(PREFERENCES.temp_path));
|
directory_verify(filepath_resolve(PREFERENCES.temp_path));
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ function timelineItemNode(node) : timelineItem() constructor {
|
||||||
draw_set_color(itHover == self? COLORS._main_text_accent : COLORS._main_text);
|
draw_set_color(itHover == self? COLORS._main_text_accent : COLORS._main_text);
|
||||||
var txx = lx + ui(24);
|
var txx = lx + ui(24);
|
||||||
|
|
||||||
if(nameType == 0 || nameType == 1 || node.display_name == "") {
|
if(nameType == 0 || nameType == 1 || !node.renamed) {
|
||||||
draw_set_alpha(0.6);
|
draw_set_alpha(0.6);
|
||||||
draw_text_add(txx, _y + lh / 2 - ui(2), nodeName);
|
draw_text_add(txx, _y + lh / 2 - ui(2), nodeName);
|
||||||
txx += tw;
|
txx += tw;
|
||||||
|
|
|
@ -49,4 +49,6 @@ function audioObject(sample = 8, channel = 2) constructor {
|
||||||
|
|
||||||
static getChannel = function() { return mono? 1 : channels; }
|
static getChannel = function() { return mono? 1 : channels; }
|
||||||
static getData = function() { return mono? soundF : sound; }
|
static getData = function() { return mono? soundF : sound; }
|
||||||
|
|
||||||
|
static toString = function() { return $"\{duration:{duration}, channels:{channels}\}"; }
|
||||||
}
|
}
|
Loading…
Reference in a new issue