This commit is contained in:
Tanasart 2024-11-16 13:01:14 +07:00
parent cdaa653d49
commit 5e41976907
11 changed files with 49 additions and 25 deletions

View file

@ -10,6 +10,7 @@ event_inherited();
campaign_id = "2263128";
req_patreon = "";
req_user = "";
req_member = {};
access_token = "";
status = 0;
@ -27,9 +28,12 @@ event_inherited();
server = network_create_server_raw(network_socket_ws, port, 32);
} until(server >= 0 || attmp++ >= 100);
var _url = @"www.patreon.com/oauth2/authorize?response_type=code
&client_id=oZ1PNvUY61uH0FiA7ZPMBy77Xau3Ok9tfvsT_Y8DQwyKeMNjaVC35r1qsK09QJhY
&redirect_uri=https://pixel-composer.com/verify";
var _url = @"www.patreon.com/oauth2/authorize";
_url += "?response_type=code";
_url += "&client_id=oZ1PNvUY61uH0FiA7ZPMBy77Xau3Ok9tfvsT_Y8DQwyKeMNjaVC35r1qsK09QJhY";
_url += "&redirect_uri=https://pixel-composer.com/verify";
_url += "&scope=identity campaigns.members";
_url += $"&state={port}";
url_open(_url);

View file

@ -106,11 +106,13 @@ function setException() {
var tt = "";
tt += $"\n-------------------------- Pixel Composer {VERSION_STRING} Crashed --------------------------\n";
tt += "\n" + ex.longMessage;
tt += "\n" + ex.script;
tt += $"\n{ex.longMessage}";
tt += $"\n{ex.script}";
tt += "\n\n-------------------------- STACK TRACE --------------------------\n\n";
for( var i = 0, n = array_length(ex.stacktrace); i < n; i++ )
tt += ex.stacktrace[i] + "\n";
tt += $"{ex.stacktrace[i]}\n";
tt += "\n\n\n\n-------------------------- Device Info --------------------------\n";
tt += $"\nVersion: {VERSION_STRING} ({VERSION})";
tt += $"\nOperating system: {os_type_sting()} ({os_version})"

View file

@ -42,7 +42,7 @@
LATEST_VERSION = 1_18_00_0;
VERSION = 1_18_04_0;
SAVE_VERSION = 1_18_02_0;
VERSION_STRING = MAC? "1.18.003m" : "1.18.4.008";
VERSION_STRING = MAC? "1.18.003m" : "1.18.4";
BUILD_NUMBER = 1_18_03_1;
HOTKEYS = ds_map_create();

View file

@ -1,5 +1,8 @@
function variable_instance_set_struct(object, params) {
var _keys = variable_struct_get_names(params);
for( var i = 0, n = array_length(_keys); i < n; i++ )
variable_instance_set(object, _keys[i], params[$ _keys[i]]);
for( var i = 0, n = array_length(_keys); i < n; i++ ) {
var _k = _keys[i];
variable_instance_set(object, _k, params[$ _k]);
}
}

View file

@ -11,11 +11,12 @@ function Node_Array_Split(_x, _y, _group = noone) : Node(_x, _y, _group) constru
attributes.output_amount = 1;
io_pool = [];
static update = function() {
var _inp = getInputData(0);
var type = inputs[0].value_from == noone? VALUE_TYPE.any : inputs[0].value_from.type;
inputs[0].setType(type);
inputs[0].resetDisplay();
if(!is_array(_inp)) {
attributes.output_amount = 0;
@ -25,8 +26,15 @@ function Node_Array_Split(_x, _y, _group = noone) : Node(_x, _y, _group) constru
var amo = array_length(_inp);
for (var i = 0; i < amo; i++) {
if(i >= array_length(outputs))
newOutput(i, nodeValue_Output($"val {i}", self, type, 0));
if(i >= array_length(outputs)) {
var _pl = array_safe_get(io_pool, i, 0);
if(_pl == 0) _pl = nodeValue_Output($"val {i}", self, type, 0);
newOutput(i, _pl);
io_pool[i] = _pl;
}
outputs[i].setType(type);
outputs[i].setValue(_inp[i]);
}
@ -56,7 +64,9 @@ function Node_Array_Split(_x, _y, _group = noone) : Node(_x, _y, _group) constru
var _ind = 0;
repeat(_amo) {
newOutput(_ind, nodeValue_Output($"val {_ind}", self, VALUE_TYPE.any, 0));
var _pl = nodeValue_Output($"val {_ind}", self, VALUE_TYPE.any, 0);
newOutput(_ind, _pl);
io_pool[_ind] = _pl;
_ind++;
}
}

View file

@ -774,7 +774,7 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc
__temp_panel = panel;
if(PREFERENCES.graph_open_group_in_tab)
run_in(1, function() { __temp_panel.openGroupTab(self) });
run_in(1, function() /*=>*/ { __temp_panel.open_group_tab(self) });
else
panel.addContext(self);
}

View file

@ -4,7 +4,8 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct
setDimension(96, 48);
newInput(0, nodeValue_Float("Check value", self, 0 ))
.setVisible(true, true);
.setVisible(true, true)
.rejectArray();
newInput(1, nodeValue_Enum_Scroll("Condition", self, 0 , [ new scrollItem("Equal", s_node_condition_type, 0),
new scrollItem("Not equal", s_node_condition_type, 1),
@ -42,7 +43,7 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct
newOutput(0, nodeValue_Output("Result", self, VALUE_TYPE.any, []));
newOutput(1, nodeValue_Output("Bool", self, VALUE_TYPE.boolean, false));
static step = function() { #region
static step = function() {
var _mode = getInputData(5);
inputs[0].setVisible(_mode == 1, _mode == 1);
@ -54,9 +55,9 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct
inputs[3].setType(inputs[3].value_from == noone? VALUE_TYPE.any : inputs[3].value_from.type);
inputs[4].setType(inputs[4].value_from == noone? VALUE_TYPE.any : inputs[4].value_from.type);
} #endregion
}
static update = function(frame = CURRENT_FRAME) { #region
static update = function(frame = CURRENT_FRAME) {
var _true = getInputData(3);
var _fals = getInputData(4);
@ -97,9 +98,9 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct
}
outputs[1].setValue(res);
} #endregion
}
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
var val = outputs[1].getValue();
var frm = val? inputs[3] : inputs[4];
var to = outputs[0];
@ -109,5 +110,5 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct
draw_set_alpha(0.5);
draw_line_width(frm.x, frm.y, to.x, to.y, _s * 4);
draw_set_alpha(1);
} #endregion
}
}

View file

@ -142,7 +142,7 @@
var pan = getPanelFromName(panel, create, focus);
if(pan == noone) return noone;
return dialogPanelCall(pan, noone, noone, { focus });
return dialogPanelCall(pan, noone, noone, { focus: focus });
}
function panelObjectInit() {

View file

@ -147,7 +147,8 @@ function Panel_Menu() : PanelContent() constructor {
zip_unzip("data/Assets.zip", DIRECTORY + "Assets");
}),
-1,
menuItem(__txtx("panel_menu_connect_patreon", "Connect to Patreon"), function() { dialogCall(o_dialog_patreon); /*dialogPanelCall(new Panel_Patreon());*/ }, THEME.patreon),
menuItem(__txtx("panel_menu_connect_patreon", "Connect to Patreon"), function() { dialogCall(o_dialog_patreon); }, THEME.patreon),
// menuItem(__txtx("panel_menu_connect_patreon", "Connect to Patreon (legacy)"), function() { dialogPanelCall(new Panel_Patreon()); }, THEME.patreon),
];
menuItem_undo = MENU_ITEMS.undo;

View file

@ -148,8 +148,10 @@ function Panel_Patreon() : PanelContent() constructor {
if(code == verify_code) {
result = "Patreon verified, thank you for suporting Pixel Composer!";
result_color = COLORS._main_value_positive;
patreon_create_verification_key(mail, verify_code);
IS_PATREON = true;
patreon_create_verification_code($"pxc_legacy");
IS_PATREON = true;
} else {
result = "Incorrect code.";
result_color = COLORS._main_value_negative;

View file

@ -25,6 +25,7 @@ function patreon_create_verification_code(code) {
_map[? "code"] = code;
ds_map_secure_save(_map, _path);
IS_PATREON = true;
}
function __initPatreon() {