From 246ce8757e6062edbc70ee80045187b72efbd3f4 Mon Sep 17 00:00:00 2001 From: Raymix Date: Wed, 24 May 2017 21:18:06 +0100 Subject: [PATCH] added exec_server button to code editor --- .../@EpochDevTools/Addons/rmx_init.pbo | Bin 291739 -> 292099 bytes .../@EpochDevTools/Addons/rmx_sandbox.pbo | Bin 114062 -> 114062 bytes .../x/addons/rmx_init/CfgGUI/editor.hpp | 23 +++++++++++++----- .../addons/rmx_init/functions/codeEditor.sqf | 2 +- .../rmx_init/functions/codeEditorActions.sqf | 8 ++++-- 5 files changed, 24 insertions(+), 9 deletions(-) diff --git a/Tools/DevFrameWork/@EpochDevTools/Addons/rmx_init.pbo b/Tools/DevFrameWork/@EpochDevTools/Addons/rmx_init.pbo index ba48f9a7530572fcf0b2c03085f586e0ba6d3318..4e7a680ede94452b5747ee241f98b11a7dfe3aa0 100644 GIT binary patch delta 348 zcmbRJT(J3-;DlV}l`m8$7R+V~d#)NOD>+$^@f}EHGZRx46LZK5)yefNhHM=#R3jyL zCkwI)Z$8PA$IJ#)5P6(sI%6xN_~Z}{cQ!LK10zH8%?ml4TbPZ^Oea6<$zXHN$xO{F znJm~QD`seH&CA8f$yt(GQKDe0pahlrD5^YpO>Z(sd@@+6`s9P%CX?O!5|~ZRjV3Sb zkDbiYKby(KWb%UkzR3=~d~Cs~MP;c)5EIQ%O@vATO=L2&1Zs%mNv%jtjxPr502!>+ ztT&-uZvrC_Gi}$Kz+5E7XtsUfD&|Fu>`?2c&tJ!^I6Zw0b0#;E-su}YGmA26OwU`x xtiz}|owtfvcKf|G%nR6n+Uqwna~u%iTK(Ozd_CV{4IkG98_#U{$xvJgjg5s+;Ih=(MRaGM6Ya9vjx7?TkJ?g)s7Bw6bW005UTas(E$9Rgnh z1C`<-lYay;1%sMgSGSW81r)Q%1a1Qciiadw#{`!Fh5;9oR0u}~H8wdoF*dWI2t$Md zGdYvzjA#Z$cx7XCbdynz9}hD-4GIYf33O$6bRaz-B9{ym0VYi?t_A@$x97A22*4CeVI22IcY)W#b(kfWG`pG{ G1ixG1i&|0u diff --git a/Tools/DevFrameWork/@EpochDevTools/Addons/rmx_sandbox.pbo b/Tools/DevFrameWork/@EpochDevTools/Addons/rmx_sandbox.pbo index 78c56ad91238bbcdc396a719780a2350237939c7..07fbacba9440e7a6de9055690c1977f412a3dc90 100644 GIT binary patch delta 92 zcmeDC&DQsuZ9;+4su!w}E({C|$@zI{ndy4T1qDD30sy5qPKsw@2GWziFtxFnnHd-v lS~NE>Z*O2`{Iyf0rKZz6S&1=e@$E~$ns--r9h;dn8vunWA&39~ delta 92 zcmeDC&DQsuZ9;)kce_fY3j+f~a(-S~X1ZQ-K>?7106^)Dlj50}f%N1rOl@qYW|kI) lmdy>!+Z&h}f9(_zo3_TG*)8j-+C9FO$Lc=MH}xjp1pp_bA9DZz diff --git a/Tools/DevFrameWork/x/addons/rmx_init/CfgGUI/editor.hpp b/Tools/DevFrameWork/x/addons/rmx_init/CfgGUI/editor.hpp index 53130e34..82e66c3a 100644 --- a/Tools/DevFrameWork/x/addons/rmx_init/CfgGUI/editor.hpp +++ b/Tools/DevFrameWork/x/addons/rmx_init/CfgGUI/editor.hpp @@ -177,26 +177,26 @@ class dUI_editor { idc = 7212; x = 0.155; y = 0.928; - w = 0.39; + w = 0.265; h = 0.068; onMouseButtonUp = "'slider' call rmx_fnc_codeEditorActions"; }; - class ce_btn_Execute: RscButton + class ce_btn_Client: RscButton { idc = 7213; - text = "Execute"; //--- ToDo: Localize; + text = "Client"; //--- ToDo: Localize; x = 0.825; y = 0.92; w = 0.1025; h = 0.08; colorText[] = {1,0.5,0,1}; - action = "'execute' call rmx_fnc_codeEditorActions"; + action = "'exec_client' call rmx_fnc_codeEditorActions"; }; class ce_btn_save: RscButton { idc = 7214; text = "Save Tab"; //--- ToDo: Localize; - x = 0.7; + x = 0.5725; y = 0.92; w = 0.1025; h = 0.08; @@ -207,12 +207,23 @@ class dUI_editor { { idc = 7215; text = "Clear Tab"; //--- ToDo: Localize; - x = 0.575; + x = 0.4475; y = 0.92; w = 0.1025; h = 0.08; colorText[] = {1,0.5,0,1}; action = "'clear' call rmx_fnc_codeEditorActions"; }; + class ce_btn_Server: RscButton + { + idc = 7216; + text = "Server"; //--- ToDo: Localize; + x = 0.6975; + y = 0.92; + w = 0.1025; + h = 0.08; + colorText[] = {1,0.5,0,1}; + action = "'exec_server' call rmx_fnc_codeEditorActions"; + }; }; }; \ No newline at end of file diff --git a/Tools/DevFrameWork/x/addons/rmx_init/functions/codeEditor.sqf b/Tools/DevFrameWork/x/addons/rmx_init/functions/codeEditor.sqf index ad918c3b..e277ff51 100644 --- a/Tools/DevFrameWork/x/addons/rmx_init/functions/codeEditor.sqf +++ b/Tools/DevFrameWork/x/addons/rmx_init/functions/codeEditor.sqf @@ -24,7 +24,7 @@ _display displayAddEventHandler ["keyDown", "_this call rmx_fnc_keyDown;"]; rmx_var_ctrl_editorMain = [_display displayCtrl 7200, _display displayCtrl 7300]; rmx_var_ctrl_editorItems = []; -for "_i" from 7200 to 7215 do { +for "_i" from 7200 to 7216 do { rmx_var_ctrl_editorItems set [count rmx_var_ctrl_editorItems,_display displayCtrl _i]; }; diff --git a/Tools/DevFrameWork/x/addons/rmx_init/functions/codeEditorActions.sqf b/Tools/DevFrameWork/x/addons/rmx_init/functions/codeEditorActions.sqf index 5f52be0b..cb0da2ed 100644 --- a/Tools/DevFrameWork/x/addons/rmx_init/functions/codeEditorActions.sqf +++ b/Tools/DevFrameWork/x/addons/rmx_init/functions/codeEditorActions.sqf @@ -12,12 +12,16 @@ _tab = param [1, 0]; switch (_action) do { - case "execute": + case "exec_client": { playSound "click"; _code = ctrlText (rmx_var_ctrl_editorItems select 1); call compile _code; //add try catch }; + case "exec_server": + { + hintSilent (ctrlText (rmx_var_ctrl_editorItems select 1)); + }; case "save": { playSound "click"; @@ -66,7 +70,7 @@ switch (_action) do (rmx_var_ctrl_editorItems select rmx_var_editorIndex + 2) ctrlSetTextColor (call rmx_fnc_getColorScheme); (rmx_var_ctrl_editorMain select 1) ctrlSetBackgroundColor (call rmx_fnc_getColorScheme); - for "_c" from 13 to 15 do { + for "_c" from 13 to 16 do { (rmx_var_ctrl_editorItems select _c) ctrlSetTextColor (call rmx_fnc_getColorScheme); }; };