diff --git a/Sources/epoch_code/gui/scripts/e_pad/Apps/E_Pad.html b/Sources/epoch_code/customs/E_Pad/E_Pad.html similarity index 100% rename from Sources/epoch_code/gui/scripts/e_pad/Apps/E_Pad.html rename to Sources/epoch_code/customs/E_Pad/E_Pad.html diff --git a/Sources/epoch_code/customs/E_Pad/ServerInfos.html b/Sources/epoch_code/customs/E_Pad/ServerInfos.html new file mode 100644 index 00000000..0b82b001 --- /dev/null +++ b/Sources/epoch_code/customs/E_Pad/ServerInfos.html @@ -0,0 +1,36 @@ + + + + +E_Pad + + + + +

+Server Infos:
+Homepage: EpochMod.com
+Discord: EpochMod Discord
+FaceBook: https://www.facebook.com/EpochMod/
+

+ + diff --git a/Sources/epoch_code/customs/E_Pad/ServerRules.html b/Sources/epoch_code/customs/E_Pad/ServerRules.html new file mode 100644 index 00000000..c10881bf --- /dev/null +++ b/Sources/epoch_code/customs/E_Pad/ServerRules.html @@ -0,0 +1,37 @@ + + + + +E_Pad + + + + +

+Server Rules
+- Play fair!
+   - Do not glitch
+   - Do not use bugs
+   - Do not flame other players
+

+ + diff --git a/Sources/epoch_code/customs/E_Pad/ServerSettings.html b/Sources/epoch_code/customs/E_Pad/ServerSettings.html new file mode 100644 index 00000000..5efdb214 --- /dev/null +++ b/Sources/epoch_code/customs/E_Pad/ServerSettings.html @@ -0,0 +1,35 @@ + + + + +E_Pad + + + + +

+Server Settings:
+Ask an Admin to change this file:
+epoch_code\customs\E_Pad\ServerSettings.html
+

+ + diff --git a/Sources/epoch_code/gui/scripts/e_pad/Apps/traderDiag_nearPlayers.sqf b/Sources/epoch_code/customs/E_Pad/traderDiag_nearPlayers.sqf similarity index 100% rename from Sources/epoch_code/gui/scripts/e_pad/Apps/traderDiag_nearPlayers.sqf rename to Sources/epoch_code/customs/E_Pad/traderDiag_nearPlayers.sqf diff --git a/Sources/epoch_code/gui/scripts/e_pad/Apps/traderDiag_nearVehicles.sqf b/Sources/epoch_code/customs/E_Pad/traderDiag_nearVehicles.sqf similarity index 100% rename from Sources/epoch_code/gui/scripts/e_pad/Apps/traderDiag_nearVehicles.sqf rename to Sources/epoch_code/customs/E_Pad/traderDiag_nearVehicles.sqf diff --git a/Sources/epoch_code/gui/scripts/e_pad/Apps/traderDiag_news.sqf b/Sources/epoch_code/customs/E_Pad/traderDiag_news.sqf similarity index 100% rename from Sources/epoch_code/gui/scripts/e_pad/Apps/traderDiag_news.sqf rename to Sources/epoch_code/customs/E_Pad/traderDiag_news.sqf diff --git a/Sources/epoch_code/gui/scripts/e_pad/Apps/web.sqf b/Sources/epoch_code/customs/E_Pad/web.sqf similarity index 100% rename from Sources/epoch_code/gui/scripts/e_pad/Apps/web.sqf rename to Sources/epoch_code/customs/E_Pad/web.sqf diff --git a/Sources/epoch_code/gui/scripts/e_pad/EPOCH_EPad_clearscreen.sqf b/Sources/epoch_code/gui/scripts/e_pad/EPOCH_EPad_clearscreen.sqf index 179b737e..85bc749d 100644 --- a/Sources/epoch_code/gui/scripts/e_pad/EPOCH_EPad_clearscreen.sqf +++ b/Sources/epoch_code/gui/scripts/e_pad/EPOCH_EPad_clearscreen.sqf @@ -2,4 +2,4 @@ disableSerialization; _display = finddisplay 9898; { (_display displayctrl _x) ctrlshow false; -} foreach [1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1801,1802,1803,1804,1805,1806,1807,1808,1809,1810,1811,1812,1814,1901,1902,1903]; +} foreach [1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1801,1802,1803,1804,1805,1806,1807,1808,1809,1810,1811,1812,1814,1900,1902,1903]; diff --git a/Sources/epoch_code/gui/scripts/e_pad/EPOCH_EPad_dialog.sqf b/Sources/epoch_code/gui/scripts/e_pad/EPOCH_EPad_dialog.sqf index f4b3c68d..2056882e 100644 --- a/Sources/epoch_code/gui/scripts/e_pad/EPOCH_EPad_dialog.sqf +++ b/Sources/epoch_code/gui/scripts/e_pad/EPOCH_EPad_dialog.sqf @@ -30,15 +30,21 @@ for "_i" from ((Epoch_E_Pad_Page-1)*13) to (((count _configs)-1) min (((Epoch_E_ _subclasses = configProperties [_configx, "isClass _x",true]; _action = format ["%1;",getText(_configx >> "action")]; _togglevar = getText(_configx >> "ToggleVar"); - if !(_subclasses isEqualTo []) then { - _action = _action + format ["Epoch_E_Pad_Page = 1; [%1] call EPOCH_EPad_dialog", _arr + [(configName _configx)]]; - } - else { - if (tolower (getText(_configx >> "ToggleAble")) isequalto "true") then { - if !(_togglevar isequalto "") then { - _action = _action + format ["%1 = %2; ['Epoch_ToggleVars','%1',%2] call Epoch_SaveVarsToProfile; [%3] call EPOCH_EPad_dialog",_togglevar,!(missionnamespace getvariable [format ["%1",_togglevar],false]),_arr]; + _html = getText (_configx >> "html"); + if (_html isequalto "") then { + if !(_subclasses isEqualTo []) then { + _action = _action + format ["Epoch_E_Pad_Page = 1; [%1] call EPOCH_EPad_dialog", _arr + [(configName _configx)]]; + } + else { + if (tolower (getText(_configx >> "ToggleAble")) isequalto "true") then { + if !(_togglevar isequalto "") then { + _action = _action + format ["%1 = %2; ['Epoch_ToggleVars','%1',%2] call Epoch_SaveVarsToProfile; [%3] call EPOCH_EPad_dialog",_togglevar,!(missionnamespace getvariable [format ["%1",_togglevar],false]),_arr]; + }; }; }; + } + else { + _action = format ["disableserialization;call EPOCH_EPad_clearscreen;_htmlctrlsgrp = ((finddisplay 9898) displayctrl 1900); _htmlctrlsgrp ctrlshow true; _htmlctrl = _htmlctrlsgrp controlsGroupCtrl 1901;_htmlctrl htmlLoad %1;",str _html]; }; _ButtonText = ""; diff --git a/Sources/epoch_config/Configs/CfgEPad.hpp b/Sources/epoch_config/Configs/CfgEPad.hpp index d1541f0b..24f564c6 100644 --- a/Sources/epoch_config/Configs/CfgEPad.hpp +++ b/Sources/epoch_config/Configs/CfgEPad.hpp @@ -20,15 +20,28 @@ class e_pad_config IconCode = "if (true) then {'addons\MyIcon.paa'} else {''}"; // Variable Icon - will overwrite static Icon, if defined color[] = {1,1,1,1}; // default color for Icon / Button text colortoggled[] = {0,1,0,1}; // Icon / Button color if toggleable and variable is toggled (true) + html = "epoch_code\customs\E_Pad\ServerInfos.html"; // Path to a html-file (if defined or not "", the action will only load this web site into the e-pad) action = ""; // code to run on button click Tooltip = "PLACE-HOLDER"; // Static Tooltip TooltipCode = "if (true) then {'My ToolTip'} else {''}"; // Variable Tooltip - will overwrite static Tooltip, if defined ToggleVar = ""; // Script will check this variable. If true, Button is toggled and color change to "colortoggled" ToggleAble = "false"; // if "true", the defined variable will be toggled (and saved to profile) on buttonclick - class SubMenu { // On Buttonclick, a new submenu will be opened with defined classes here - ... - ... - } + class SubMenu { // If a Sub-Menu is defined, on Buttonclick, a new submenu will be opened with defined classes here + ButtonText = "app10"; + ButtonTextCode = "if (true) then {'Text'} else {''}"; + Description = ""; + DescriptionCode = "if (true) then {'Desctription'} else {''}"; + Icon = ""; + IconCode = "if (true) then {'addons\MyIcon.paa'} else {''}"; + color[] = {1,1,1,1}; + colortoggled[] = {0,1,0,1}; + html = "epoch_code\customs\E_Pad\ServerInfos.html"; + action = ""; + Tooltip = "PLACE-HOLDER"; + TooltipCode = "if (true) then {'My ToolTip'} else {''}"; + ToggleVar = ""; + ToggleAble = "false"; + }; }; */ class settings @@ -53,17 +66,6 @@ class e_pad_config ToggleVar = "EPOCH_EpadButtonOn"; ToggleAble = "true"; }; - class Reset { - ButtonText = "Reset"; - Description = "Reset Settings"; - Icon = ""; - color[] = {1,1,0,1}; - colortoggled[] = {0,1,0,1}; - action = "[] spawn {_confirm = ['Reset all E-Pad Settings? Sure?','WARNING!',true,true] call BIS_fnc_guiMessage; if (_confirm) then {call Epoch_EPad_Reset; [] call EPOCH_EPad_dialog}}"; - Tooltip = "Reset all settings"; - ToggleVar = ""; - ToggleAble = "false"; - }; class playerMarker { ButtonText = ""; @@ -99,6 +101,18 @@ class e_pad_config ToggleVar = "EPOCH_AutoEarplug"; ToggleAble = "true"; }; + class Reset { + ButtonText = "Reset"; + Description = "Reset Settings"; + Icon = ""; + color[] = {1,1,0,1}; + colortoggled[] = {0,1,0,1}; + action = "[] spawn {_confirm = ['Reset all E-Pad Settings? Sure?','WARNING!',true,true] call BIS_fnc_guiMessage; if (_confirm) then {call Epoch_EPad_Reset; [] call EPOCH_EPad_dialog}}"; + Tooltip = "Reset all settings"; + ToggleVar = ""; + ToggleAble = "false"; + }; +/* class SubSub { ButtonText = "SubMenu"; Description = "Sub Menu"; @@ -121,18 +135,58 @@ class e_pad_config ToggleAble = "false"; }; }; +*/ }; - class info + class infos { ButtonText = ""; - Description = "Server Info"; + Description = "Infos"; icon = "x\addons\a3_epoch_code\Data\UI\epad\server_info_icon_ca.paa"; color[] = {1,1,1,1}; colortoggled[] = {0,1,0,1}; - action = "createDialog 'server_info_picture'"; - Tooltip = "Display server Info"; + action = ""; + Tooltip = "Info-Menu"; ToggleVar = ""; ToggleAble = "false"; + class serverinfo + { + ButtonText = ""; + Description = "Server Info"; + icon = "x\addons\a3_epoch_code\Data\UI\epad\server_info_icon_ca.paa"; + color[] = {1,1,1,1}; + colortoggled[] = {0,1,0,1}; + html = "epoch_code\customs\E_Pad\ServerInfos.html"; + action = ""; + Tooltip = "Display Server Infos"; + ToggleVar = ""; + ToggleAble = "false"; + }; + class serversettings + { + ButtonText = ""; + Description = "Server Rules"; + icon = "x\addons\a3_epoch_code\Data\UI\epad\server_info_icon_ca.paa"; + color[] = {1,1,1,1}; + colortoggled[] = {0,1,0,1}; + html = "epoch_code\customs\E_Pad\ServerSettings.html"; + action = ""; + Tooltip = "Display Server Settings"; + ToggleVar = ""; + ToggleAble = "false"; + }; + class serverrules + { + ButtonText = ""; + Description = "Server Rules"; + icon = "x\addons\a3_epoch_code\Data\UI\epad\server_info_icon_ca.paa"; + color[] = {1,1,1,1}; + colortoggled[] = {0,1,0,1}; + html = "epoch_code\customs\E_Pad\ServerRules.html"; + action = "createDialog 'server_info_picture'"; + Tooltip = "Display Server Rules"; + ToggleVar = ""; + ToggleAble = "false"; + }; }; class debug { @@ -165,23 +219,11 @@ class e_pad_config Icon = ""; color[] = {1,1,1,1}; colortoggled[] = {0,1,0,1}; - action = "call compile preprocessfilelinenumbers ""epoch_code\gui\scripts\e_pad\Apps\traderDiag_news.sqf"""; + action = "call compile preprocessfilelinenumbers 'epoch_code\customs\E_Pad\traderDiag_news.sqf'"; Tooltip = "News"; ToggleVar = ""; ToggleAble = "false"; }; - class web - { - ButtonText = "WEB"; - Description = "Web links"; - Icon = ""; - color[] = {1,1,1,1}; - colortoggled[] = {0,1,0,1}; - action = "call compile preprocessfilelinenumbers ""epoch_code\gui\scripts\e_pad\Apps\web.sqf"""; - Tooltip = "WEB LINK"; - ToggleVar = ""; - ToggleAble = "false"; - }; class vehs { ButtonText = "Vehicle"; @@ -189,7 +231,7 @@ class e_pad_config Icon = ""; color[] = {1,1,1,1}; colortoggled[] = {0,1,0,1}; - action = "[250,1000] call compile preprocessfilelinenumbers ""epoch_code\gui\scripts\e_pad\Apps\traderDiag_nearVehicles.sqf"""; + action = "[250,1000] call compile preprocessfilelinenumbers 'epoch_code\customs\E_Pad\traderDiag_nearVehicles.sqf'"; Tooltip = "Scan for near Vehicles (costs 250 energy)"; ToggleVar = ""; ToggleAble = "false"; @@ -201,10 +243,22 @@ class e_pad_config Icon = ""; color[] = {1,1,1,1}; colortoggled[] = {0,1,0,1}; - action = "[250,250] call compile preprocessfilelinenumbers ""epoch_code\gui\scripts\e_pad\Apps\traderDiag_nearPlayers.sqf"""; + action = "[250,250] call compile preprocessfilelinenumbers 'epoch_code\customs\E_Pad\traderDiag_nearPlayers.sqf'"; Tooltip = "Scan for near Players (costs 250 energy)"; ToggleVar = ""; ToggleAble = "false"; }; + class suicide + { + ButtonText = "KILL"; + Description = "Kill yourself"; + Icon = ""; + color[] = {1,1,1,1}; + colortoggled[] = {0,1,0,1}; + action = "[] spawn {_confirm = ['Are you sure to kill yourself?','Suicide!',true,true] call BIS_fnc_guiMessage;if (_confirm) then {while {dialog} do {closedialog 0};disableUserInput true;Player playAction 'GestureSuicide';uisleep 3;Player setdamage 1;disableUserInput false;};};"; + Tooltip = "Kill yourself to respawn"; + ToggleVar = ""; + ToggleAble = "false"; + }; }; }; \ No newline at end of file