From 0ce3d592905662fcbeb5854d4a7573b82dfe804b Mon Sep 17 00:00:00 2001 From: Tanasart Date: Thu, 14 Nov 2024 13:31:57 +0700 Subject: [PATCH] p --- PixelComposer.yyp | 1 + objects/o_main/Other_2.gml | 11 +++++++- scripts/globals/globals.gml | 2 +- .../node_armature_bind/node_armature_bind.gml | 9 ++++--- .../node_websocket_receiver.gml | 25 ++++++++++--------- scripts/panel_menu/panel_menu.gml | 2 +- scripts/panel_patreon/panel_patreon.gml | 3 ++- .../patreon_email_check.gml | 11 ++++---- 8 files changed, 39 insertions(+), 25 deletions(-) diff --git a/PixelComposer.yyp b/PixelComposer.yyp index cc700a919..297543a6e 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -785,6 +785,7 @@ {"id":{"name":"o_dialog_output_visibility","path":"objects/o_dialog_output_visibility/o_dialog_output_visibility.yy",},}, {"id":{"name":"o_dialog_palette","path":"objects/o_dialog_palette/o_dialog_palette.yy",},}, {"id":{"name":"o_dialog_panel","path":"objects/o_dialog_panel/o_dialog_panel.yy",},}, + {"id":{"name":"o_dialog_patreon","path":"objects/o_dialog_patreon/o_dialog_patreon.yy",},}, {"id":{"name":"o_dialog_preference","path":"objects/o_dialog_preference/o_dialog_preference.yy",},}, {"id":{"name":"o_dialog_preset","path":"objects/o_dialog_preset/o_dialog_preset.yy",},}, {"id":{"name":"o_dialog_release_note","path":"objects/o_dialog_release_note/o_dialog_release_note.yy",},}, diff --git a/objects/o_main/Other_2.gml b/objects/o_main/Other_2.gml index 3685bd684..bb0d9c648 100644 --- a/objects/o_main/Other_2.gml +++ b/objects/o_main/Other_2.gml @@ -107,12 +107,21 @@ if(file_exists_empty("icon.png")) file_copy("icon.png", DIRECTORY + "icon.png"); - + + var _prg_path = $"{program_directory}PixelComposer.exe"; // var cmd = ".pxc=\"" + string(program_directory) + "PixelComposer.exe\""; // shell_execute_async("assoc", cmd); // var cmd = ".pxcc=\"" + string(program_directory) + "PixelComposer.exe\""; // shell_execute_async("assoc", cmd); + + // shell_execute_async("reg", "ADD HKCU\\Software\\Classes\\pxc"); + // shell_execute_async("reg", "ADD HKCU\\Software\\Classes\\pxc /v \"URL Protocol\" /t REG_SZ"); + // shell_execute_async("reg", "ADD HKCU\\Software\\Classes\\pxc\\shell"); + // shell_execute_async("reg", "ADD HKCU\\Software\\Classes\\pxc\\shell\\open"); + + // shell_execute_async("reg", $"DELETE HKCU\\Software\\Classes\\pxc\\shell\\open\\command"); + // shell_execute_async("reg", $"ADD HKCU\\Software\\Classes\\pxc\\shell\\open\\command /t REG_SZ /d \"{_prg_path} -m %1\""); } directory_set_current_working(DIRECTORY); diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index c25d0bb77..402f8fce8 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -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.005"; + VERSION_STRING = MAC? "1.18.003m" : "1.18.4.006"; BUILD_NUMBER = 1_18_03_1; HOTKEYS = ds_map_create(); diff --git a/scripts/node_armature_bind/node_armature_bind.gml b/scripts/node_armature_bind/node_armature_bind.gml index 10a60b874..6045072b3 100644 --- a/scripts/node_armature_bind/node_armature_bind.gml +++ b/scripts/node_armature_bind/node_armature_bind.gml @@ -311,9 +311,12 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr _tx += 22; } - draw_set_text(f_p2, fa_left, fa_center, tc); - draw_set_alpha(aa); - draw_text_add(_tx, _ty, inputs[_inp].name); + var _nam = inputs[_inp].name; + if(inputs[_inp].value_from != noone) + _nam = inputs[_inp].value_from.node.getDisplayName(); + + draw_set_text(f_p2, fa_left, fa_center, tc, aa); + draw_text_add(_tx, _ty, _nam); draw_set_alpha(1); if(_hover && point_in_rectangle(_m[0], _m[1], _x, _cy, _x + _w, _cy + lh)) { diff --git a/scripts/node_websocket_receiver/node_websocket_receiver.gml b/scripts/node_websocket_receiver/node_websocket_receiver.gml index 6483136c0..87f937631 100644 --- a/scripts/node_websocket_receiver/node_websocket_receiver.gml +++ b/scripts/node_websocket_receiver/node_websocket_receiver.gml @@ -25,7 +25,7 @@ function Node_Websocket_Receiver(_x, _y, _group = noone) : Node(_x, _y, _group) socket = noone; client = noone; - function setPort() { #region + function setPort() { var _port = getInputData(0); var _mode = getInputData(2); @@ -55,11 +55,11 @@ function Node_Websocket_Receiver(_x, _y, _group = noone) : Node(_x, _y, _group) socket = network_create_server_raw(network_socket_ws, port, 16); if(socket) NETWORK_SERVERS[? port] = socket; } - } #endregion + } setInspector(1, __txt("Refresh Server"), [ THEME.refresh_icon, 1, COLORS._main_value_positive ], function() { setPort(); }); - static asyncPackets = function(_async_load) { #region + static asyncPackets = function(_async_load) { if(!active) return; var _active = getInputData(1); @@ -95,9 +95,9 @@ function Node_Websocket_Receiver(_x, _y, _group = noone) : Node(_x, _y, _group) network_trigger = true; break; } - } #endregion + } - static step = function() { #region + static step = function() { var _mode = getInputData(2); inputs[3].setVisible(_mode == 0); @@ -109,14 +109,14 @@ function Node_Websocket_Receiver(_x, _y, _group = noone) : Node(_x, _y, _group) outputs[1].setValue(0); network_trigger = 0; } - } #endregion + } - static update = function(frame = CURRENT_FRAME) { #region + static update = function(frame = CURRENT_FRAME) { if(CLONING) return; setPort(); - } #endregion + } - static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var _active = getInputData(1); var bbox = drawGetBbox(xx, yy, _s); var network = ds_map_try_get(NETWORK_SERVERS, port, noone); @@ -129,13 +129,14 @@ function Node_Websocket_Receiver(_x, _y, _group = noone) : Node(_x, _y, _group) var _y1 = bbox.y1 - ui(16); var _ts = _s * 0.75; - draw_set_text(f_code, fa_center, fa_top, COLORS._main_text); - draw_set_alpha(0.75); + draw_set_text(f_code, fa_center, fa_top, COLORS._main_text, 0.75); draw_text_add(bbox.xc, bbox.y0, $"Port {port}", _ts); + draw_set_valign(fa_bottom) draw_text_add(bbox.xc, bbox.y1, $"{connected_device} " + __txt("Connected"), _ts); + draw_set_alpha(1); draw_sprite_fit(THEME.node_websocket_receive, 0, bbox.xc, (_y0 + _y1) / 2, bbox.w, _y1 - _y0, cc, aa); - } #endregion + } } \ No newline at end of file diff --git a/scripts/panel_menu/panel_menu.gml b/scripts/panel_menu/panel_menu.gml index e0afa8162..51a58c862 100644 --- a/scripts/panel_menu/panel_menu.gml +++ b/scripts/panel_menu/panel_menu.gml @@ -147,7 +147,7 @@ function Panel_Menu() : PanelContent() constructor { zip_unzip("data/Assets.zip", DIRECTORY + "Assets"); }), -1, - menuItem(__txtx("panel_menu_connect_patreon", "Connect to Patreon"), function() { dialogPanelCall(new Panel_Patreon()); }, THEME.patreon), + menuItem(__txtx("panel_menu_connect_patreon", "Connect to Patreon"), function() { dialogCall(o_dialog_patreon); /*dialogPanelCall(new Panel_Patreon());*/ }, THEME.patreon), ]; menuItem_undo = MENU_ITEMS.undo; diff --git a/scripts/panel_patreon/panel_patreon.gml b/scripts/panel_patreon/panel_patreon.gml index e95a7061d..bcf86b224 100644 --- a/scripts/panel_patreon/panel_patreon.gml +++ b/scripts/panel_patreon/panel_patreon.gml @@ -165,4 +165,5 @@ function Panel_Patreon() : PanelContent() constructor { draw_set_text(f_p0, fa_center, fa_top, result_color); draw_text(w / 2, _yy, result); } -} \ No newline at end of file +} + diff --git a/scripts/patreon_email_check/patreon_email_check.gml b/scripts/patreon_email_check/patreon_email_check.gml index 6f1713584..38e056b9d 100644 --- a/scripts/patreon_email_check/patreon_email_check.gml +++ b/scripts/patreon_email_check/patreon_email_check.gml @@ -24,13 +24,12 @@ function __initPatreon() { if(!file_exists_empty(_path)) return; - var _map = ds_map_secure_load(_path); + // var _map = ds_map_secure_load(_path); + // var _mail = ds_map_try_get(_map, "mail", ""); + // if(_mail == "") return; - var _mail = ds_map_try_get(_map, "mail", ""); - if(_mail == "") return; + // var _code = _map[? "code"]; + // var _keyTarget = patreon_generate_activation_key(_mail); - var _code = _map[? "code"]; - - var _keyTarget = patreon_generate_activation_key(_mail); IS_PATREON = _code == _keyTarget; }