From aee2000133d99b79bef3c03349d7d4e31d218928 Mon Sep 17 00:00:00 2001 From: Freddo Date: Fri, 16 Apr 2021 10:31:13 +0200 Subject: [PATCH 1/5] Add include files, tweak file paths, mainprefix. --- .gitignore | 10 + addons/ai/CfgWaypoints.hpp | 8 +- addons/ai/XEH_postInit.sqf | 2 +- addons/ai/functions/fnc_addWaveHandler.sqf | 2 +- addons/ai/functions/fnc_arty.sqf | 2 +- addons/ai/functions/fnc_doArty.sqf | 2 +- addons/ai/functions/fnc_emptyFunction.sqf | 4 +- addons/ai/functions/fnc_fortify.sqf | 4 +- addons/ai/functions/fnc_garrison.sqf | 2 +- addons/ai/functions/fnc_garrisonQuantity.sqf | 4 +- addons/ai/functions/fnc_hunt.sqf | 2 +- addons/ai/functions/fnc_huntInit.sqf | 6 +- addons/ai/functions/fnc_huntLoop.sqf | 8 +- addons/ai/functions/fnc_rearm.sqf | 2 +- addons/ai/functions/fnc_rearmInit.sqf | 2 +- addons/ai/functions/fnc_removeWaveHandler.sqf | 2 +- addons/ai/functions/fnc_spawnWave.sqf | 2 +- addons/ai/functions/fnc_waveInit.sqf | 2 +- addons/assigngear/config.cpp | 4 +- addons/chat/config.cpp | 2 +- addons/main/script_mod.hpp | 38 +- addons/main/script_version.hpp | 4 + .../a3/3DEN/UI/Attributes/AmmoBox.sqf | 0 .../UI/Displays/Display3DENEditAttributes.sqf | 0 .../a3/3DEN/UI/Displays/display3DEN.sqf | 0 .../a3/3DEN/UI/Displays/display3DENCopy.sqf | 0 .../Displays/display3DENEditComposition.sqf | 0 .../UI/Displays/display3DENMissionStats.sqf | 0 .../a3/3DEN/UI/Displays/display3DENNew.sqf | 0 .../a3/3DEN/UI/Displays/display3DENPlace.sqf | 0 .../UI/Displays/display3DENRequiredAddons.sqf | 0 .../a3/3DEN/UI/Displays/display3DENSave.sqf | 0 .../3DEN/UI/Displays/display3DENTutorial.sqf | 0 .../3DEN/UI/Displays/display3DENUpdates.sqf | 0 .../UI/DisplaysTemp/RscDisplayInterrupt.sqf | 0 .../UI/DisplaysTemp/RscDisplayLoading.sqf | 0 {extras => include}/a3/3DEN/UI/dikCodes.inc | 0 {extras => include}/a3/3DEN/UI/macroExecs.inc | 2 +- include/a3/3DEN/UI/macroExecs.inc.old | 56 + {extras => include}/a3/3DEN/UI/macros.inc | 0 include/a3/3DEN/UI/macros.inc.old | 56 + {extras => include}/a3/3DEN/UI/resincl.inc | 0 .../a3/functions_f/Params/paramCountdown.hpp | 1 + .../a3/functions_f/Params/paramCountdown.inc | 78 + .../Params/paramCountdownNoDisabled.hpp | 1 + .../Params/paramCountdownNoDisabled.inc | 77 + .../functions_f/Params/paramDaytimeHour.hpp | 1 + .../functions_f/Params/paramDaytimeHour.inc | 25 + .../functions_f/Params/paramDaytimePeriod.hpp | 1 + .../functions_f/Params/paramDaytimePeriod.inc | 30 + .../functions_f/Params/paramDebugConsole.hpp | 1 + .../functions_f/Params/paramDebugConsole.inc | 24 + .../functions_f/Params/paramGuerFriendly.hpp | 1 + .../functions_f/Params/paramGuerFriendly.inc | 30 + .../Params/paramRespawnTickets.hpp | 1 + .../Params/paramRespawnTickets.inc | 78 + .../Params/paramRespawnTicketsNoDisabled.hpp | 1 + .../Params/paramRespawnTicketsNoDisabled.inc | 77 + include/a3/functions_f/Params/paramRevive.hpp | 1 + include/a3/functions_f/Params/paramRevive.inc | 208 ++ .../a3/functions_f/Params/paramWeather.hpp | 1 + .../a3/functions_f/Params/paramWeather.inc | 31 + .../Params/paramTimeAcceleration.hpp | 1 + .../Params/paramTimeAcceleration.inc | 31 + include/a3/ui_f/$PBOPREFIX$ | 1 + include/a3/ui_f/hpp/defineCommon.inc | 184 + include/a3/ui_f/hpp/defineCommon.inc.old | 184 + include/a3/ui_f/hpp/defineCommonColors.inc | 309 ++ include/a3/ui_f/hpp/defineCommonGrids.inc | 433 +++ include/a3/ui_f/hpp/defineDIKCodes.inc | 189 + include/a3/ui_f/hpp/defineResincl.inc | 3094 +++++++++++++++++ .../cba/addons/main/script_macros_common.hpp | 0 include/x/cba/main/$PBOPREFIX$ | 1 + include/x/cba/main/script_classes.hpp | 300 ++ include/x/cba/main/script_eventhandlers.hpp | 26 + include/x/cba/main/script_macros.hpp | 1 + include/x/cba/main/script_macros_common.hpp | 1831 ++++++++++ include/x/cba/main/script_macros_config.hpp | 5 + include/x/cba/main/script_macros_mission.hpp | 82 + include/x/cba/main/script_mod.hpp | 37 + include/x/cba/main/script_resources.hpp | 264 ++ include/x/cba/main/script_version.hpp | 4 + include/x/tmf/assigngear/$PBOPREFIX$ | 1 + include/x/tmf/assigngear/loadouts/macros.inc | 20 + mod.cpp | 4 +- 85 files changed, 7856 insertions(+), 42 deletions(-) create mode 100644 addons/main/script_version.hpp rename {extras => include}/a3/3DEN/UI/Attributes/AmmoBox.sqf (100%) rename {extras => include}/a3/3DEN/UI/Displays/Display3DENEditAttributes.sqf (100%) rename {extras => include}/a3/3DEN/UI/Displays/display3DEN.sqf (100%) rename {extras => include}/a3/3DEN/UI/Displays/display3DENCopy.sqf (100%) rename {extras => include}/a3/3DEN/UI/Displays/display3DENEditComposition.sqf (100%) rename {extras => include}/a3/3DEN/UI/Displays/display3DENMissionStats.sqf (100%) rename {extras => include}/a3/3DEN/UI/Displays/display3DENNew.sqf (100%) rename {extras => include}/a3/3DEN/UI/Displays/display3DENPlace.sqf (100%) rename {extras => include}/a3/3DEN/UI/Displays/display3DENRequiredAddons.sqf (100%) rename {extras => include}/a3/3DEN/UI/Displays/display3DENSave.sqf (100%) rename {extras => include}/a3/3DEN/UI/Displays/display3DENTutorial.sqf (100%) rename {extras => include}/a3/3DEN/UI/Displays/display3DENUpdates.sqf (100%) rename {extras => include}/a3/3DEN/UI/DisplaysTemp/RscDisplayInterrupt.sqf (100%) rename {extras => include}/a3/3DEN/UI/DisplaysTemp/RscDisplayLoading.sqf (100%) rename {extras => include}/a3/3DEN/UI/dikCodes.inc (100%) rename {extras => include}/a3/3DEN/UI/macroExecs.inc (99%) create mode 100644 include/a3/3DEN/UI/macroExecs.inc.old rename {extras => include}/a3/3DEN/UI/macros.inc (100%) create mode 100644 include/a3/3DEN/UI/macros.inc.old rename {extras => include}/a3/3DEN/UI/resincl.inc (100%) create mode 100644 include/a3/functions_f/Params/paramCountdown.hpp create mode 100644 include/a3/functions_f/Params/paramCountdown.inc create mode 100644 include/a3/functions_f/Params/paramCountdownNoDisabled.hpp create mode 100644 include/a3/functions_f/Params/paramCountdownNoDisabled.inc create mode 100644 include/a3/functions_f/Params/paramDaytimeHour.hpp create mode 100644 include/a3/functions_f/Params/paramDaytimeHour.inc create mode 100644 include/a3/functions_f/Params/paramDaytimePeriod.hpp create mode 100644 include/a3/functions_f/Params/paramDaytimePeriod.inc create mode 100644 include/a3/functions_f/Params/paramDebugConsole.hpp create mode 100644 include/a3/functions_f/Params/paramDebugConsole.inc create mode 100644 include/a3/functions_f/Params/paramGuerFriendly.hpp create mode 100644 include/a3/functions_f/Params/paramGuerFriendly.inc create mode 100644 include/a3/functions_f/Params/paramRespawnTickets.hpp create mode 100644 include/a3/functions_f/Params/paramRespawnTickets.inc create mode 100644 include/a3/functions_f/Params/paramRespawnTicketsNoDisabled.hpp create mode 100644 include/a3/functions_f/Params/paramRespawnTicketsNoDisabled.inc create mode 100644 include/a3/functions_f/Params/paramRevive.hpp create mode 100644 include/a3/functions_f/Params/paramRevive.inc create mode 100644 include/a3/functions_f/Params/paramWeather.hpp create mode 100644 include/a3/functions_f/Params/paramWeather.inc create mode 100644 include/a3/functions_f_mp_mark/Params/paramTimeAcceleration.hpp create mode 100644 include/a3/functions_f_mp_mark/Params/paramTimeAcceleration.inc create mode 100644 include/a3/ui_f/$PBOPREFIX$ create mode 100644 include/a3/ui_f/hpp/defineCommon.inc create mode 100644 include/a3/ui_f/hpp/defineCommon.inc.old create mode 100644 include/a3/ui_f/hpp/defineCommonColors.inc create mode 100644 include/a3/ui_f/hpp/defineCommonGrids.inc create mode 100644 include/a3/ui_f/hpp/defineDIKCodes.inc create mode 100644 include/a3/ui_f/hpp/defineResincl.inc rename {extras => include}/cba/addons/main/script_macros_common.hpp (100%) create mode 100644 include/x/cba/main/$PBOPREFIX$ create mode 100644 include/x/cba/main/script_classes.hpp create mode 100644 include/x/cba/main/script_eventhandlers.hpp create mode 100644 include/x/cba/main/script_macros.hpp create mode 100644 include/x/cba/main/script_macros_common.hpp create mode 100644 include/x/cba/main/script_macros_config.hpp create mode 100644 include/x/cba/main/script_macros_mission.hpp create mode 100644 include/x/cba/main/script_mod.hpp create mode 100644 include/x/cba/main/script_resources.hpp create mode 100644 include/x/cba/main/script_version.hpp create mode 100644 include/x/tmf/assigngear/$PBOPREFIX$ create mode 100644 include/x/tmf/assigngear/loadouts/macros.inc diff --git a/.gitignore b/.gitignore index 1676cfe8..f40b4a88 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,11 @@ /addons/*.pbo + +## Added by HEMTT +releases/* +*.biprivatekey +keys/* +.hemtt/local +#### + +## Added by HEMTT +#### diff --git a/addons/ai/CfgWaypoints.hpp b/addons/ai/CfgWaypoints.hpp index 5c9f3244..4a7caec3 100644 --- a/addons/ai/CfgWaypoints.hpp +++ b/addons/ai/CfgWaypoints.hpp @@ -5,16 +5,14 @@ class CfgWaypoints class Fortify { displayName = "Fortify"; - file = "\x\tmf\addons\AI\functions\fnc_fortify.sqf"; + file = QPATHTO_F(functions\fnc_fortify); /* 0: GROUP 1: ARRAY - Waypoint position 2: OBJECT - Target to which waypoint is attached to */ - icon = "a3\ui_f\data\igui\cfg\simpletasks\types\defend_ca.paa"; - class Attributes - { - }; + icon = "\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\defend_ca.paa"; + class Attributes {}; }; }; }; diff --git a/addons/ai/XEH_postInit.sqf b/addons/ai/XEH_postInit.sqf index d5b48ec8..373ff6f7 100644 --- a/addons/ai/XEH_postInit.sqf +++ b/addons/ai/XEH_postInit.sqf @@ -1,4 +1,4 @@ -#include "\x\tmf\addons\AI\script_component.hpp" +#include "\x\tmf\addons\ai\script_component.hpp" // Intended for Server and HCs. if (hasInterface) exitWith {}; diff --git a/addons/ai/functions/fnc_addWaveHandler.sqf b/addons/ai/functions/fnc_addWaveHandler.sqf index afd46bab..9f7b314a 100644 --- a/addons/ai/functions/fnc_addWaveHandler.sqf +++ b/addons/ai/functions/fnc_addWaveHandler.sqf @@ -1,4 +1,4 @@ -#include "\x\tmf\addons\AI\script_component.hpp" +#include "\x\tmf\addons\ai\script_component.hpp" /* * Name: TMF_ai_fnc_addWaveHandler * Author: Head diff --git a/addons/ai/functions/fnc_arty.sqf b/addons/ai/functions/fnc_arty.sqf index 90e36b55..beb6e25c 100644 --- a/addons/ai/functions/fnc_arty.sqf +++ b/addons/ai/functions/fnc_arty.sqf @@ -1,5 +1,5 @@ params ["_logic","_units","_activated"]; -#include "\x\tmf\addons\AI\script_component.hpp" +#include "\x\tmf\addons\ai\script_component.hpp" if(!_activated) exitwith {}; diff --git a/addons/ai/functions/fnc_doArty.sqf b/addons/ai/functions/fnc_doArty.sqf index 983a2384..ff62de56 100644 --- a/addons/ai/functions/fnc_doArty.sqf +++ b/addons/ai/functions/fnc_doArty.sqf @@ -1,4 +1,4 @@ -#include "\x\tmf\addons\AI\script_component.hpp" +#include "\x\tmf\addons\ai\script_component.hpp" params ["_logic","_areas","_vehicles"]; { diff --git a/addons/ai/functions/fnc_emptyFunction.sqf b/addons/ai/functions/fnc_emptyFunction.sqf index 77f89f7e..c3869854 100644 --- a/addons/ai/functions/fnc_emptyFunction.sqf +++ b/addons/ai/functions/fnc_emptyFunction.sqf @@ -1,3 +1,3 @@ -#include "\x\tmf\addons\AI\script_component.hpp" +#include "\x\tmf\addons\ai\script_component.hpp" -// Do Nothing. \ No newline at end of file +// Do Nothing. diff --git a/addons/ai/functions/fnc_fortify.sqf b/addons/ai/functions/fnc_fortify.sqf index 5ec01434..a34d0375 100644 --- a/addons/ai/functions/fnc_fortify.sqf +++ b/addons/ai/functions/fnc_fortify.sqf @@ -1,4 +1,4 @@ -#include "\x\tmf\addons\AI\script_component.hpp" +#include "\x\tmf\addons\ai\script_component.hpp" params ["_group","_pos","_attached"]; private _waypoint = currentWaypoint _group; @@ -15,4 +15,4 @@ if (_leader distance2D _pos > _radius) then { // CBA_fnc_taskDefend for now [_group,_pos,_radius] call CBA_fnc_taskDefend; -true \ No newline at end of file +true diff --git a/addons/ai/functions/fnc_garrison.sqf b/addons/ai/functions/fnc_garrison.sqf index b37812e3..c5b385a2 100644 --- a/addons/ai/functions/fnc_garrison.sqf +++ b/addons/ai/functions/fnc_garrison.sqf @@ -1,4 +1,4 @@ -#include "\x\tmf\addons\AI\script_component.hpp" +#include "\x\tmf\addons\ai\script_component.hpp" params ["_logic","_units","_activated"]; private _headless = (synchronizedObjects _logic) select {_x isKindOf "HeadlessClient_F" && !local _x}; diff --git a/addons/ai/functions/fnc_garrisonQuantity.sqf b/addons/ai/functions/fnc_garrisonQuantity.sqf index 8e189bb3..c5fde50f 100644 --- a/addons/ai/functions/fnc_garrisonQuantity.sqf +++ b/addons/ai/functions/fnc_garrisonQuantity.sqf @@ -1,5 +1,5 @@ if(is3DEN) exitWith {}; -#include "\x\tmf\addons\AI\script_component.hpp" +#include "\x\tmf\addons\ai\script_component.hpp" params ["_logic","_units","_activated"]; private _headless = (synchronizedObjects _logic) select {_x isKindOf "HeadlessClient_F" && !local _x}; @@ -149,5 +149,5 @@ if((_logic getVariable ["WakeUp", false])) then { // Ensure side is corrected -- https://feedback.bistudio.com/T70739. private _units = units _mainGroup; _units join _mainGroup; - + _logic setVariable ["spawned_units",_units,true]; // global set variable diff --git a/addons/ai/functions/fnc_hunt.sqf b/addons/ai/functions/fnc_hunt.sqf index 483b024f..0084d20d 100644 --- a/addons/ai/functions/fnc_hunt.sqf +++ b/addons/ai/functions/fnc_hunt.sqf @@ -1,4 +1,4 @@ -#include "\x\tmf\addons\AI\script_component.hpp" +#include "\x\tmf\addons\ai\script_component.hpp" params ["_logic","_units","_activated"]; if (!_activated) exitWith {}; diff --git a/addons/ai/functions/fnc_huntInit.sqf b/addons/ai/functions/fnc_huntInit.sqf index 20d363d0..82c998c0 100644 --- a/addons/ai/functions/fnc_huntInit.sqf +++ b/addons/ai/functions/fnc_huntInit.sqf @@ -1,4 +1,4 @@ -#include "\x\tmf\addons\AI\script_component.hpp" +#include "\x\tmf\addons\ai\script_component.hpp" params ["_logic"]; @@ -16,7 +16,7 @@ if (_hunterVal == -1) then { private _side = switch (_hunterVal) do { case 0: {east}; case 1: {west}; - case 2: {resistance}; + case 2: {resistance}; default {civilian}; }; _hunters = allUnits select {side _x == _side}; @@ -26,4 +26,4 @@ _hunters = ((_hunters - playableUnits) - switchableUnits) - [player]; { _x disableAI "AUTOCOMBAT"; -} forEach _hunters; \ No newline at end of file +} forEach _hunters; diff --git a/addons/ai/functions/fnc_huntLoop.sqf b/addons/ai/functions/fnc_huntLoop.sqf index bde841dc..587370da 100644 --- a/addons/ai/functions/fnc_huntLoop.sqf +++ b/addons/ai/functions/fnc_huntLoop.sqf @@ -1,7 +1,7 @@ -#include "\x\tmf\addons\AI\script_component.hpp" +#include "\x\tmf\addons\ai\script_component.hpp" // Must be scheduled enviorment (spawned) params ["_hunters", "_targetSide", "_position", "_range",["_targets",[]]]; - + private _continue = true; while {_continue} do { // CHEAT @@ -22,7 +22,7 @@ while {_continue} do { _closestFloat = _distanceToTarget; }; } forEach _targets; - + // SEARCH: If we still don't have a target search. if (isNull _closestTarget) then { if (_unit distance _position < _range) then { @@ -50,7 +50,7 @@ while {_continue} do { { _x reveal _closestTarget; } forEach _hunters; - + }; }; diff --git a/addons/ai/functions/fnc_rearm.sqf b/addons/ai/functions/fnc_rearm.sqf index 1d7769e8..3b08a050 100644 --- a/addons/ai/functions/fnc_rearm.sqf +++ b/addons/ai/functions/fnc_rearm.sqf @@ -1,4 +1,4 @@ -#include "\x\tmf\addons\AI\script_component.hpp" +#include "\x\tmf\addons\ai\script_component.hpp" params ["_self","_caller"]; _repairPerTick = 0.1; _fuelPerTick = 0.1; diff --git a/addons/ai/functions/fnc_rearmInit.sqf b/addons/ai/functions/fnc_rearmInit.sqf index 511187a7..1b52a063 100644 --- a/addons/ai/functions/fnc_rearmInit.sqf +++ b/addons/ai/functions/fnc_rearmInit.sqf @@ -1,4 +1,4 @@ -#include "\x\tmf\addons\AI\script_component.hpp" +#include "\x\tmf\addons\ai\script_component.hpp" params ["_logic","_units","_activated"]; sleep 1; if(_activated) then { diff --git a/addons/ai/functions/fnc_removeWaveHandler.sqf b/addons/ai/functions/fnc_removeWaveHandler.sqf index 40b7ee1c..2be10587 100644 --- a/addons/ai/functions/fnc_removeWaveHandler.sqf +++ b/addons/ai/functions/fnc_removeWaveHandler.sqf @@ -1,4 +1,4 @@ -#include "\x\tmf\addons\AI\script_component.hpp" +#include "\x\tmf\addons\ai\script_component.hpp" /* * Name: TMF_ai_fnc_removeWaveHandler * Author: Head diff --git a/addons/ai/functions/fnc_spawnWave.sqf b/addons/ai/functions/fnc_spawnWave.sqf index 5762a8b3..fdbfec0b 100644 --- a/addons/ai/functions/fnc_spawnWave.sqf +++ b/addons/ai/functions/fnc_spawnWave.sqf @@ -1,4 +1,4 @@ -#include "\x\tmf\addons\AI\script_component.hpp" +#include "\x\tmf\addons\ai\script_component.hpp" /* * Name: TMF_ai_fnc_spawnWave * Author: Head, Snippers diff --git a/addons/ai/functions/fnc_waveInit.sqf b/addons/ai/functions/fnc_waveInit.sqf index 08cbcfd9..c3ee1c24 100644 --- a/addons/ai/functions/fnc_waveInit.sqf +++ b/addons/ai/functions/fnc_waveInit.sqf @@ -14,7 +14,7 @@ * Handles creation of wavespawner structure */ if(is3DEN) exitWith {}; -#include "\x\tmf\addons\AI\script_component.hpp" +#include "\x\tmf\addons\ai\script_component.hpp" params ["_logic","_units","_activated"]; _headless = (synchronizedObjects _logic) select {_x isKindOf "HeadlessClient_F" && !local _x}; diff --git a/addons/assigngear/config.cpp b/addons/assigngear/config.cpp index 9feaf3da..3d068c23 100644 --- a/addons/assigngear/config.cpp +++ b/addons/assigngear/config.cpp @@ -1,6 +1,6 @@ #include "script_component.hpp" -#include "\a3\3den\UI\macros.inc" -#include "\a3\3DEN\UI\macroexecs.inc" +#include "\a3\3DEN\UI\macros.inc" +#include "\a3\3DEN\UI\macroExecs.inc" #include "\a3\ui_f\hpp\defineCommon.inc" class CfgPatches diff --git a/addons/chat/config.cpp b/addons/chat/config.cpp index ca1c6542..72913857 100644 --- a/addons/chat/config.cpp +++ b/addons/chat/config.cpp @@ -15,4 +15,4 @@ class cfgPatches }; }; -#include "CfgEventhandlers.hpp" +#include "CfgEventHandlers.hpp" diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 6b4cf2f2..a797c680 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -1,11 +1,35 @@ #define MAINPREFIX x -#define PREFIX TMF +#define PREFIX tmf -#define MAJOR 1 -#define MINOR 0 -#define PATCH 0 +#include "script_version.hpp" -#define VERSION MAJOR.MINOR.PATCH -#define VERSION_AR MAJOR,MINOR,PATCH +#define VERSION MAJOR.MINOR +#define VERSION_STR MAJOR.MINOR.PATCHLVL.BUILD +#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD -#define REQUIRED_VERSION 1.56 \ No newline at end of file +// MINIMAL required version for the Mod. Components can specify others.. +#define REQUIRED_VERSION 2.02 + +/* +// Defined DEBUG_MODE_NORMAL in a few CBA_fncs to prevent looped logging :) +#ifndef DEBUG_MODE_NORMAL + #define DEBUG_MODE_FULL +#endif +*/ + +// Set a default debug mode for the component here (See documentation on how to default to each of the modes). +/* + #define DEBUG_ENABLED_COMMON + #define DEBUG_ENABLED_DIAGNOSTIC + #define DEBUG_ENABLED_EVENTS + #define DEBUG_ENABLED_HASHES + #define DEBUG_ENABLED_MAIN + #define DEBUG_ENABLED_NETWORK + #define DEBUG_ENABLED_STRINGS + #define DEBUG_ENABLED_VERSIONING +*/ + +// Remove CfgFunction adding headers and disable SCRIPT macro (comment out to enable for debugging) +#define SKIP_FUNCTION_HEADER // [Enable for release] +#define SKIP_SCRIPT_NAME // [Enable for release] +// #define RECOMPILE // [Disable for release] diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp new file mode 100644 index 00000000..7187aaf8 --- /dev/null +++ b/addons/main/script_version.hpp @@ -0,0 +1,4 @@ +#define MAJOR 3 +#define MINOR 0 +#define PATCHLVL 0 +#define BUILD 210416 diff --git a/extras/a3/3DEN/UI/Attributes/AmmoBox.sqf b/include/a3/3DEN/UI/Attributes/AmmoBox.sqf similarity index 100% rename from extras/a3/3DEN/UI/Attributes/AmmoBox.sqf rename to include/a3/3DEN/UI/Attributes/AmmoBox.sqf diff --git a/extras/a3/3DEN/UI/Displays/Display3DENEditAttributes.sqf b/include/a3/3DEN/UI/Displays/Display3DENEditAttributes.sqf similarity index 100% rename from extras/a3/3DEN/UI/Displays/Display3DENEditAttributes.sqf rename to include/a3/3DEN/UI/Displays/Display3DENEditAttributes.sqf diff --git a/extras/a3/3DEN/UI/Displays/display3DEN.sqf b/include/a3/3DEN/UI/Displays/display3DEN.sqf similarity index 100% rename from extras/a3/3DEN/UI/Displays/display3DEN.sqf rename to include/a3/3DEN/UI/Displays/display3DEN.sqf diff --git a/extras/a3/3DEN/UI/Displays/display3DENCopy.sqf b/include/a3/3DEN/UI/Displays/display3DENCopy.sqf similarity index 100% rename from extras/a3/3DEN/UI/Displays/display3DENCopy.sqf rename to include/a3/3DEN/UI/Displays/display3DENCopy.sqf diff --git a/extras/a3/3DEN/UI/Displays/display3DENEditComposition.sqf b/include/a3/3DEN/UI/Displays/display3DENEditComposition.sqf similarity index 100% rename from extras/a3/3DEN/UI/Displays/display3DENEditComposition.sqf rename to include/a3/3DEN/UI/Displays/display3DENEditComposition.sqf diff --git a/extras/a3/3DEN/UI/Displays/display3DENMissionStats.sqf b/include/a3/3DEN/UI/Displays/display3DENMissionStats.sqf similarity index 100% rename from extras/a3/3DEN/UI/Displays/display3DENMissionStats.sqf rename to include/a3/3DEN/UI/Displays/display3DENMissionStats.sqf diff --git a/extras/a3/3DEN/UI/Displays/display3DENNew.sqf b/include/a3/3DEN/UI/Displays/display3DENNew.sqf similarity index 100% rename from extras/a3/3DEN/UI/Displays/display3DENNew.sqf rename to include/a3/3DEN/UI/Displays/display3DENNew.sqf diff --git a/extras/a3/3DEN/UI/Displays/display3DENPlace.sqf b/include/a3/3DEN/UI/Displays/display3DENPlace.sqf similarity index 100% rename from extras/a3/3DEN/UI/Displays/display3DENPlace.sqf rename to include/a3/3DEN/UI/Displays/display3DENPlace.sqf diff --git a/extras/a3/3DEN/UI/Displays/display3DENRequiredAddons.sqf b/include/a3/3DEN/UI/Displays/display3DENRequiredAddons.sqf similarity index 100% rename from extras/a3/3DEN/UI/Displays/display3DENRequiredAddons.sqf rename to include/a3/3DEN/UI/Displays/display3DENRequiredAddons.sqf diff --git a/extras/a3/3DEN/UI/Displays/display3DENSave.sqf b/include/a3/3DEN/UI/Displays/display3DENSave.sqf similarity index 100% rename from extras/a3/3DEN/UI/Displays/display3DENSave.sqf rename to include/a3/3DEN/UI/Displays/display3DENSave.sqf diff --git a/extras/a3/3DEN/UI/Displays/display3DENTutorial.sqf b/include/a3/3DEN/UI/Displays/display3DENTutorial.sqf similarity index 100% rename from extras/a3/3DEN/UI/Displays/display3DENTutorial.sqf rename to include/a3/3DEN/UI/Displays/display3DENTutorial.sqf diff --git a/extras/a3/3DEN/UI/Displays/display3DENUpdates.sqf b/include/a3/3DEN/UI/Displays/display3DENUpdates.sqf similarity index 100% rename from extras/a3/3DEN/UI/Displays/display3DENUpdates.sqf rename to include/a3/3DEN/UI/Displays/display3DENUpdates.sqf diff --git a/extras/a3/3DEN/UI/DisplaysTemp/RscDisplayInterrupt.sqf b/include/a3/3DEN/UI/DisplaysTemp/RscDisplayInterrupt.sqf similarity index 100% rename from extras/a3/3DEN/UI/DisplaysTemp/RscDisplayInterrupt.sqf rename to include/a3/3DEN/UI/DisplaysTemp/RscDisplayInterrupt.sqf diff --git a/extras/a3/3DEN/UI/DisplaysTemp/RscDisplayLoading.sqf b/include/a3/3DEN/UI/DisplaysTemp/RscDisplayLoading.sqf similarity index 100% rename from extras/a3/3DEN/UI/DisplaysTemp/RscDisplayLoading.sqf rename to include/a3/3DEN/UI/DisplaysTemp/RscDisplayLoading.sqf diff --git a/extras/a3/3DEN/UI/dikCodes.inc b/include/a3/3DEN/UI/dikCodes.inc similarity index 100% rename from extras/a3/3DEN/UI/dikCodes.inc rename to include/a3/3DEN/UI/dikCodes.inc diff --git a/extras/a3/3DEN/UI/macroExecs.inc b/include/a3/3DEN/UI/macroExecs.inc similarity index 99% rename from extras/a3/3DEN/UI/macroExecs.inc rename to include/a3/3DEN/UI/macroExecs.inc index f5a18b0a..2249791b 100644 --- a/extras/a3/3DEN/UI/macroExecs.inc +++ b/include/a3/3DEN/UI/macroExecs.inc @@ -53,4 +53,4 @@ __EXEC(\ _fnc_colorHEXtoRGBA_2 = {[_this,2] call _fnc_colorHEXtoRGBA};\ _fnc_colorHEXtoRGBA_4 = {[_this,4] call _fnc_colorHEXtoRGBA};\ _fnc_colorHEXtoRGBA_6 = {[_this,6] call _fnc_colorHEXtoRGBA};\ -) \ No newline at end of file +) diff --git a/include/a3/3DEN/UI/macroExecs.inc.old b/include/a3/3DEN/UI/macroExecs.inc.old new file mode 100644 index 00000000..2249791b --- /dev/null +++ b/include/a3/3DEN/UI/macroExecs.inc.old @@ -0,0 +1,56 @@ +__EXEC(\ + _fnc_sizeEx = {\ + _pixelScale = 20 * pixelScale;\ + _size = _this select 0;\ + _size = _size * _pixelScale;\ + _coef = _this select 1;\ + _sizes = _this select 2;\ + _sizeEx = _sizes select 0;\ + {\ + _xSize = _x * _coef;\ + _cond = _xSize < _size;\ + if _cond then {_sizeEx = _xSize;};\ + } foreach _sizes;\ + _sizeEx = _sizeEx / _pixelScale;\ + _bracketL = tostring [40];\ + _bracketR = tostring [41];\ + _pixelH = _bracketL + "1 / " + _bracketL + "getResolution select 3" + _bracketR + _bracketR;\ + str _sizeEx + " * " + _pixelH + " * pixelGrid * " + str pixelScale\ + };\ + _fnc_colorRGBAtoHEX = {\ + _colorRGB = _this;\ + _colorHEX = "";\ + _colorCount = count _colorRGB - 1;\ + for "_i" from 0 to _colorCount do {\ + _color = _colorRGB select _i;\ + _color = _color * 255;\ + _color = round _color;\ + _color2 = _color % 16;\ + _color1 = _color - _color2;\ + _color1 = _color1 / 16;\ + _colorHEX1 = ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"] select _color1;\ + _colorHEX2 = ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"] select _color2;\ + _colorHEX + _colorHEX1 + _colorHEX2;\ + _colorHEX = switch _i do {\ + case 3: {_colorHEX1 + _colorHEX2 + _colorHEX;};\ + default {_colorHEX + _colorHEX1 + _colorHEX2;};\ + };\ + };\ + _colorHEX = "#" + _colorHEX;\ + _colorHEX;\ + };\ + _fnc_colorHEXtoRGBA = {\ + _colorHEX = _this select 0;\ + _index = _this select 1;\ + _index2 = _index + 1;\ + _colorRGBA = [];\ + _colorHEXarray = toarray _colorHEX;\ + _color = "0x" + tostring [_colorHEXarray select _index,_colorHEXarray select _index2];\ + _color = call compile _color;\ + _color * 0.00392157\ + };\ + _fnc_colorHEXtoRGBA_0 = {[_this,0] call _fnc_colorHEXtoRGBA};\ + _fnc_colorHEXtoRGBA_2 = {[_this,2] call _fnc_colorHEXtoRGBA};\ + _fnc_colorHEXtoRGBA_4 = {[_this,4] call _fnc_colorHEXtoRGBA};\ + _fnc_colorHEXtoRGBA_6 = {[_this,6] call _fnc_colorHEXtoRGBA};\ +) diff --git a/extras/a3/3DEN/UI/macros.inc b/include/a3/3DEN/UI/macros.inc similarity index 100% rename from extras/a3/3DEN/UI/macros.inc rename to include/a3/3DEN/UI/macros.inc diff --git a/include/a3/3DEN/UI/macros.inc.old b/include/a3/3DEN/UI/macros.inc.old new file mode 100644 index 00000000..e22efc36 --- /dev/null +++ b/include/a3/3DEN/UI/macros.inc.old @@ -0,0 +1,56 @@ +//#define pixelW (1 / (getResolution select 2)) +//#define pixelH (1 / (getResolution select 3)) +#define pixelScale 0.50 + +#define GRID_W (pixelW * pixelGrid * pixelScale) +#define GRID_H (pixelH * pixelGrid * pixelScale) + +#define CENTER_X ((getResolution select 2) * 0.5 * pixelW) +#define CENTER_Y ((getResolution select 3) * 0.5 * pixelH) + +// 720px +#define WINDOW_W 120 +#define WINDOW_H 180 +#define WINDOW_HAbs (safezoneH min (WINDOW_H * GRID_H)) + +#define WINDOW_PREVIEW_W WINDOW_W +#define WINDOW_PREVIEW_H 65 +#define WINDOW_PREVIEW_HAbs (safezoneH min (WINDOW_PREVIEW_H * GRID_H)) + +#define ATTRIBUTE_TITLE_W 48 +#define ATTRIBUTE_CONTENT_W 82 +#define ATTRIBUTE_CONTENT_H 5 + + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Fonts +/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +#define FONT_NORMAL "RobotoCondensedLight" +#define FONT_SEMIBOLD "RobotoCondensed" +#define FONT_BOLD "RobotoCondensedBold" +#define FONT_THIN "RobotoCondensedLight" +#define FONT2_NORMAL "PuristaMedium" +#define FONT2_BOLD "PuristaSemiBold" +#define FONT2_THIN "PuristaLight" +#define FONT_MONO "EtelkaMonospacePro" +#define FONT_NARROW "EtelkaNarrowMediumPro" +#define FONT_CODE "LucidaConsoleB" +#define FONT_SYSTEM "TahomaB" + +#define SIZEEX_PURISTA(SIZEPX) __EVAL([SIZEPX,1.8,[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,34,35,37,46]] call _fnc_sizeEx) +#define SIZEEX_ETELKA(SIZEPX) __EVAL([SIZEPX,1.55,[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,34,35,37,46]] call _fnc_sizeEx) +#define SIZEEX_TAHOMA(SIZEPX) __EVAL([SIZEPX,1.6,[16]] call _fnc_sizeEx) +#define SIZEEX_LUCIDA(SIZEPX) __EVAL([SIZEPX,1.6,[8,11]] call _fnc_sizeEx) + +#define SIZEEX_XS 3.0 +#define SIZEEX_S 4.0 +#define SIZEEX_M 4.5 +#define SIZEEX_L 5.0 +#define SIZEEX_XL 6.0 + +#define SIZE_XS 3.5 +#define SIZE_S 4 +#define SIZE_M 5 +#define SIZE_L 5 +#define SIZE_XL 6 + diff --git a/extras/a3/3DEN/UI/resincl.inc b/include/a3/3DEN/UI/resincl.inc similarity index 100% rename from extras/a3/3DEN/UI/resincl.inc rename to include/a3/3DEN/UI/resincl.inc diff --git a/include/a3/functions_f/Params/paramCountdown.hpp b/include/a3/functions_f/Params/paramCountdown.hpp new file mode 100644 index 00000000..c5967c5f --- /dev/null +++ b/include/a3/functions_f/Params/paramCountdown.hpp @@ -0,0 +1 @@ +#include "\A3\Functions_F\Params\paramCountdown.inc" \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramCountdown.inc b/include/a3/functions_f/Params/paramCountdown.inc new file mode 100644 index 00000000..464b45bd --- /dev/null +++ b/include/a3/functions_f/Params/paramCountdown.inc @@ -0,0 +1,78 @@ +/* + Author: Karel Moricky + + Set mission countdown (in seconds) + You can optionally set minimum and maximum time (default is 600 and 3600): + #define COUNTDOWN_MIN 300 + #define COUNTDOWN_MAX 1800 + + Optionally, you can set default value: + #define COUNTDOWN_DEFAULT 450 + + Include this file in description.ext of your mission + + Example: + class Params + { + #include "\a3\Functions_F\Params\paramCountdown.inc" + }; +*/ + +#ifndef COUNTDOWN_MIN + #define COUNTDOWN_MIN 600 +#endif +#ifndef COUNTDOWN_MAX + #define COUNTDOWN_MAX 3600 +#endif +#ifndef COUNTDOWN_DEFAULT + #define COUNTDOWN_DEFAULT -1 +#endif + +__EXEC(_countdownStep = COUNTDOWN_MAX * 0.1 - COUNTDOWN_MIN * 0.1;) +__EXEC(_countdown0 = COUNTDOWN_MIN + 0 * _countdownStep;) +__EXEC(_countdown1 = COUNTDOWN_MIN + 1 * _countdownStep;) +__EXEC(_countdown2 = COUNTDOWN_MIN + 2 * _countdownStep;) +__EXEC(_countdown3 = COUNTDOWN_MIN + 3 * _countdownStep;) +__EXEC(_countdown4 = COUNTDOWN_MIN + 4 * _countdownStep;) +__EXEC(_countdown5 = COUNTDOWN_MIN + 5 * _countdownStep;) +__EXEC(_countdown6 = COUNTDOWN_MIN + 6 * _countdownStep;) +__EXEC(_countdown7 = COUNTDOWN_MIN + 7 * _countdownStep;) +__EXEC(_countdown8 = COUNTDOWN_MIN + 8 * _countdownStep;) +__EXEC(_countdown9 = COUNTDOWN_MIN + 9 * _countdownStep;) +__EXEC(_countdown10 = COUNTDOWN_MIN + 10 * _countdownStep;) +__EXEC(_countdownFunction = uinamespace getvariable "bis_fnc_timeToString";) + +class Countdown +{ + title = $STR_A3_paramCountdown_title; + values[] = { + -1, + __EVAL(_countdown0), + __EVAL(_countdown1), + __EVAL(_countdown2), + __EVAL(_countdown3), + __EVAL(_countdown4), + __EVAL(_countdown5), + __EVAL(_countdown6), + __EVAL(_countdown7), + __EVAL(_countdown8), + __EVAL(_countdown9), + __EVAL(_countdown10) + }; + texts[] = { + $STR_DISABLED, + __EVAL([_countdown0 / 3600] call _countdownFunction), + __EVAL([_countdown1 / 3600] call _countdownFunction), + __EVAL([_countdown2 / 3600] call _countdownFunction), + __EVAL([_countdown3 / 3600] call _countdownFunction), + __EVAL([_countdown4 / 3600] call _countdownFunction), + __EVAL([_countdown5 / 3600] call _countdownFunction), + __EVAL([_countdown6 / 3600] call _countdownFunction), + __EVAL([_countdown7 / 3600] call _countdownFunction), + __EVAL([_countdown8 / 3600] call _countdownFunction), + __EVAL([_countdown9 / 3600] call _countdownFunction), + __EVAL([_countdown10 / 3600] call _countdownFunction) + }; + default = COUNTDOWN_DEFAULT; + function = "BIS_fnc_paramCountdown"; +}; \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramCountdownNoDisabled.hpp b/include/a3/functions_f/Params/paramCountdownNoDisabled.hpp new file mode 100644 index 00000000..68facc23 --- /dev/null +++ b/include/a3/functions_f/Params/paramCountdownNoDisabled.hpp @@ -0,0 +1 @@ +#include "\A3\Functions_F\Params\paramCountdownNoDisabled.inc" \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramCountdownNoDisabled.inc b/include/a3/functions_f/Params/paramCountdownNoDisabled.inc new file mode 100644 index 00000000..4e948a0d --- /dev/null +++ b/include/a3/functions_f/Params/paramCountdownNoDisabled.inc @@ -0,0 +1,77 @@ +/* + Author: Karel Moricky + + Set mission countdown (in seconds) + You can optionally set minimum and maximum time (default is 600 and 3600): + #define COUNTDOWN_MIN 300 + #define COUNTDOWN_MAX 1800 + + Optionally, you can set default value: + #define COUNTDOWN_DEFAULT 450 + + Include this file in description.ext of your mission + + Example: + class Params + { + #include "\a3\Functions_F\Params\paramCountdownNoDisabled.inc" + }; +*/ + +#ifndef COUNTDOWN_MIN + #define COUNTDOWN_MIN 600 +#endif +#ifndef COUNTDOWN_MAX + #define COUNTDOWN_MAX 3600 +#endif + +__EXEC(_countdownStep = COUNTDOWN_MAX * 0.1 - COUNTDOWN_MIN * 0.1;) +__EXEC(_countdown0 = COUNTDOWN_MIN + 0 * _countdownStep;) +__EXEC(_countdown1 = COUNTDOWN_MIN + 1 * _countdownStep;) +__EXEC(_countdown2 = COUNTDOWN_MIN + 2 * _countdownStep;) +__EXEC(_countdown3 = COUNTDOWN_MIN + 3 * _countdownStep;) +__EXEC(_countdown4 = COUNTDOWN_MIN + 4 * _countdownStep;) +__EXEC(_countdown5 = COUNTDOWN_MIN + 5 * _countdownStep;) +__EXEC(_countdown6 = COUNTDOWN_MIN + 6 * _countdownStep;) +__EXEC(_countdown7 = COUNTDOWN_MIN + 7 * _countdownStep;) +__EXEC(_countdown8 = COUNTDOWN_MIN + 8 * _countdownStep;) +__EXEC(_countdown9 = COUNTDOWN_MIN + 9 * _countdownStep;) +__EXEC(_countdown10 = COUNTDOWN_MIN + 10 * _countdownStep;) +__EXEC(_countdownFunction = uinamespace getvariable "bis_fnc_timeToString";) + +#ifndef TICKETS_DEFAULT + #define TICKETS_DEFAULT __EVAL(_countdown5) +#endif + +class Countdown +{ + title = $STR_A3_paramCountdown_title; + values[] = { + __EVAL(_countdown0), + __EVAL(_countdown1), + __EVAL(_countdown2), + __EVAL(_countdown3), + __EVAL(_countdown4), + __EVAL(_countdown5), + __EVAL(_countdown6), + __EVAL(_countdown7), + __EVAL(_countdown8), + __EVAL(_countdown9), + __EVAL(_countdown10) + }; + texts[] = { + __EVAL([_countdown0 / 3600] call _countdownFunction), + __EVAL([_countdown1 / 3600] call _countdownFunction), + __EVAL([_countdown2 / 3600] call _countdownFunction), + __EVAL([_countdown3 / 3600] call _countdownFunction), + __EVAL([_countdown4 / 3600] call _countdownFunction), + __EVAL([_countdown5 / 3600] call _countdownFunction), + __EVAL([_countdown6 / 3600] call _countdownFunction), + __EVAL([_countdown7 / 3600] call _countdownFunction), + __EVAL([_countdown8 / 3600] call _countdownFunction), + __EVAL([_countdown9 / 3600] call _countdownFunction), + __EVAL([_countdown10 / 3600] call _countdownFunction) + }; + default = COUNTDOWN_DEFAULT; + function = "BIS_fnc_paramCountdown"; +}; \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramDaytimeHour.hpp b/include/a3/functions_f/Params/paramDaytimeHour.hpp new file mode 100644 index 00000000..7f9df652 --- /dev/null +++ b/include/a3/functions_f/Params/paramDaytimeHour.hpp @@ -0,0 +1 @@ +#include "\A3\Functions_F\Params\paramDaytimeHour.inc" \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramDaytimeHour.inc b/include/a3/functions_f/Params/paramDaytimeHour.inc new file mode 100644 index 00000000..07fd3e74 --- /dev/null +++ b/include/a3/functions_f/Params/paramDaytimeHour.inc @@ -0,0 +1,25 @@ +/* + Include this file in description.ext of your mission + + Optionally, you can set default value: + #define DAYTIMEHOUR_DEFAULT 19 + + Example: + class Params + { + #include "\a3\Functions_F\Params\paramDaytimeHour.inc" + }; +*/ + +#ifndef DAYTIMEHOUR_DEFAULT + #define DAYTIMEHOUR_DEFAULT 5 +#endif + +class Daytime +{ + title = $STR_a3_cfgvehicles_moduledate_f_arguments_hour_0; + values[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}; + texts[] = {"00:00","01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00","21:00","22:00","23:00"}; + default = DAYTIMEHOUR_DEFAULT; + function = "BIS_fnc_paramDaytime"; +}; \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramDaytimePeriod.hpp b/include/a3/functions_f/Params/paramDaytimePeriod.hpp new file mode 100644 index 00000000..c6f43347 --- /dev/null +++ b/include/a3/functions_f/Params/paramDaytimePeriod.hpp @@ -0,0 +1 @@ +#include "\A3\Functions_F\Params\paramDaytimePeriod.inc" \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramDaytimePeriod.inc b/include/a3/functions_f/Params/paramDaytimePeriod.inc new file mode 100644 index 00000000..34358fc5 --- /dev/null +++ b/include/a3/functions_f/Params/paramDaytimePeriod.inc @@ -0,0 +1,30 @@ +/* + Include this file in description.ext of your mission + + Optionally, you can set default value: + #define DAYTIMEPERIOD_DEFAULT 18 + + Example: + class Params + { + #include "\a3\Functions_F\Params\paramDaytimePeriod.inc" + }; +*/ + +#ifndef DAYTIMEPERIOD_DEFAULT + #define DAYTIMEPERIOD_DEFAULT 12 +#endif + +class Daytime +{ + title = $STR_A3_paramDaytimePeriod_title; + values[] = {6,12,18,0}; + texts[] = { + $STR_A3_paramDaytimePeriod_text1, + $STR_A3_paramDaytimePeriod_text2, + $STR_A3_paramDaytimePeriod_text3, + $STR_A3_paramDaytimePeriod_text4 + }; + default = DAYTIMEPERIOD_DEFAULT; + function = "BIS_fnc_paramDaytime"; +}; \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramDebugConsole.hpp b/include/a3/functions_f/Params/paramDebugConsole.hpp new file mode 100644 index 00000000..f03bd1bd --- /dev/null +++ b/include/a3/functions_f/Params/paramDebugConsole.hpp @@ -0,0 +1 @@ +#include "\A3\Functions_F\Params\paramDebugConsole.inc" \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramDebugConsole.inc b/include/a3/functions_f/Params/paramDebugConsole.inc new file mode 100644 index 00000000..7525689c --- /dev/null +++ b/include/a3/functions_f/Params/paramDebugConsole.inc @@ -0,0 +1,24 @@ +/* + Include this file to description.ext of your mission + + Optionally, you can set default value: + #define DEBUGCONSOLE_DEFAULT 1 + + Example: + class Params + { + #include "\a3\Functions_F\Params\paramDebugConsole.inc" + }; +*/ + +#ifndef DEBUGCONSOLE_DEFAULT + #define DEBUGCONSOLE_DEFAULT 0 +#endif + +class DebugConsole +{ + title = $STR_A3_paramDebugConsole_title; + values[] = {0,1}; + texts[] = {$STR_DISABLED,$STR_ENABLED}; + default = DEBUGCONSOLE_DEFAULT; +}; \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramGuerFriendly.hpp b/include/a3/functions_f/Params/paramGuerFriendly.hpp new file mode 100644 index 00000000..305409df --- /dev/null +++ b/include/a3/functions_f/Params/paramGuerFriendly.hpp @@ -0,0 +1 @@ +#include "\A3\Functions_F\Params\paramGuerFriendly.inc" \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramGuerFriendly.inc b/include/a3/functions_f/Params/paramGuerFriendly.inc new file mode 100644 index 00000000..0b9d9e9e --- /dev/null +++ b/include/a3/functions_f/Params/paramGuerFriendly.inc @@ -0,0 +1,30 @@ +/* + Include this file to description.ext of your mission + + Optionally, you can set default value: + #define GUERFRIENDLY_DEFAULT 1 + + Example: + class Params + { + #include "\a3\Functions_F\Params\paramGuerFriendly.inc" + }; +*/ + +#ifndef GUERFRIENDLY_DEFAULT + #define GUERFRIENDLY_DEFAULT -1 +#endif + +class GuerFriendly +{ + title = $STR_DISP_INTEL_EDIT_GUERILLA; + values[] = {-1,1,0,2}; + texts[] = { + $STR_DISP_INTEL_NONE_FRIENDLY, + $STR_DISP_INTEL_WEST_FRIENDLY, + $STR_DISP_INTEL_EAST_FRIENDLY, + $STR_DISP_INTEL_BOTH_FRIENDLY + }; + default = GUERFRIENDLY_DEFAULT; + function = "BIS_fnc_paramGuerFriendly"; +}; \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramRespawnTickets.hpp b/include/a3/functions_f/Params/paramRespawnTickets.hpp new file mode 100644 index 00000000..1f6dd126 --- /dev/null +++ b/include/a3/functions_f/Params/paramRespawnTickets.hpp @@ -0,0 +1 @@ +#include "\A3\Functions_F\Params\paramRespawnTickets.inc" \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramRespawnTickets.inc b/include/a3/functions_f/Params/paramRespawnTickets.inc new file mode 100644 index 00000000..2a781a63 --- /dev/null +++ b/include/a3/functions_f/Params/paramRespawnTickets.inc @@ -0,0 +1,78 @@ +/* + Author: Karel Moricky + + Set respawn tickets for all sides. + + You can optionally set minimum and maximum number of tickets (default is 100 and 1100): + #define TICKETS_MIN 500 + #define TICKETS_MAX 1500 + + Optionally, you can set default value: + #define TICKETS_DEFAULT 300 + + Include this file to description.ext of your mission + + Example: + class Params + { + #include "\a3\Functions_F\Params\paramRespawnTickets.inc" + }; +*/ + +#ifndef TICKETS_MIN + #define TICKETS_MIN 100 +#endif +#ifndef TICKETS_MAX + #define TICKETS_MAX 1100 +#endif +#ifndef TICKETS_DEFAULT + #define TICKETS_DEFAULT -1 +#endif + +__EXEC(_ticketsStep = TICKETS_MAX * 0.1 - TICKETS_MIN * 0.1;) +__EXEC(_tickets0 = TICKETS_MIN + 0 * _ticketsStep;) +__EXEC(_tickets1 = TICKETS_MIN + 1 * _ticketsStep;) +__EXEC(_tickets2 = TICKETS_MIN + 2 * _ticketsStep;) +__EXEC(_tickets3 = TICKETS_MIN + 3 * _ticketsStep;) +__EXEC(_tickets4 = TICKETS_MIN + 4 * _ticketsStep;) +__EXEC(_tickets5 = TICKETS_MIN + 5 * _ticketsStep;) +__EXEC(_tickets6 = TICKETS_MIN + 6 * _ticketsStep;) +__EXEC(_tickets7 = TICKETS_MIN + 7 * _ticketsStep;) +__EXEC(_tickets8 = TICKETS_MIN + 8 * _ticketsStep;) +__EXEC(_tickets9 = TICKETS_MIN + 9 * _ticketsStep;) +__EXEC(_tickets10 = TICKETS_MIN + 10 * _ticketsStep;) + +class RespawnTickets +{ + title = $STR_A3_paramRespawnTickets_title; + values[] = { + -1, + __EVAL(_tickets0), + __EVAL(_tickets1), + __EVAL(_tickets2), + __EVAL(_tickets3), + __EVAL(_tickets4), + __EVAL(_tickets5), + __EVAL(_tickets6), + __EVAL(_tickets7), + __EVAL(_tickets8), + __EVAL(_tickets9), + __EVAL(_tickets10) + }; + texts[] = { + $STR_DISABLED, + __EVAL(_tickets0), + __EVAL(_tickets1), + __EVAL(_tickets2), + __EVAL(_tickets3), + __EVAL(_tickets4), + __EVAL(_tickets5), + __EVAL(_tickets6), + __EVAL(_tickets7), + __EVAL(_tickets8), + __EVAL(_tickets9), + __EVAL(_tickets10) + }; + default = TICKETS_DEFAULT; + function = "BIS_fnc_paramRespawnTickets"; +}; \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramRespawnTicketsNoDisabled.hpp b/include/a3/functions_f/Params/paramRespawnTicketsNoDisabled.hpp new file mode 100644 index 00000000..f980295e --- /dev/null +++ b/include/a3/functions_f/Params/paramRespawnTicketsNoDisabled.hpp @@ -0,0 +1 @@ +#include "\a3\Functions_F\Params\paramRespawnTicketsNoDisabled.inc" \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramRespawnTicketsNoDisabled.inc b/include/a3/functions_f/Params/paramRespawnTicketsNoDisabled.inc new file mode 100644 index 00000000..dd4618be --- /dev/null +++ b/include/a3/functions_f/Params/paramRespawnTicketsNoDisabled.inc @@ -0,0 +1,77 @@ +/* + Author: Karel Moricky + + Set respawn tickets for all sides, but unlike 'paramRespawnTickets' there is no tickets 'Disabled' option. + + You can optionally set minimum and maximum number of tickets (default is 100 and 1100): + #define TICKETS_MIN 500 + #define TICKETS_MAX 1500 + + Optionally, you can set default value: + #define TICKETS_DEFAULT 300 + + Include this file to description.ext of your mission + + Example: + class Params + { + #include "\a3\Functions_F\Params\paramRespawnTicketsNoDisabled.inc" + }; +*/ + +#ifndef TICKETS_MIN + #define TICKETS_MIN 100 +#endif +#ifndef TICKETS_MAX + #define TICKETS_MAX 1100 +#endif + +__EXEC(_ticketsStep = TICKETS_MAX * 0.1 - TICKETS_MIN * 0.1;) +__EXEC(_tickets0 = TICKETS_MIN + 0 * _ticketsStep;) +__EXEC(_tickets1 = TICKETS_MIN + 1 * _ticketsStep;) +__EXEC(_tickets2 = TICKETS_MIN + 2 * _ticketsStep;) +__EXEC(_tickets3 = TICKETS_MIN + 3 * _ticketsStep;) +__EXEC(_tickets4 = TICKETS_MIN + 4 * _ticketsStep;) +__EXEC(_tickets5 = TICKETS_MIN + 5 * _ticketsStep;) +__EXEC(_tickets6 = TICKETS_MIN + 6 * _ticketsStep;) +__EXEC(_tickets7 = TICKETS_MIN + 7 * _ticketsStep;) +__EXEC(_tickets8 = TICKETS_MIN + 8 * _ticketsStep;) +__EXEC(_tickets9 = TICKETS_MIN + 9 * _ticketsStep;) +__EXEC(_tickets10 = TICKETS_MIN + 10 * _ticketsStep;) + +#ifndef TICKETS_DEFAULT + #define TICKETS_DEFAULT __EVAL(_tickets5) +#endif + +class RespawnTickets +{ + title = $STR_A3_paramRespawnTickets_title; + values[] = { + __EVAL(_tickets0), + __EVAL(_tickets1), + __EVAL(_tickets2), + __EVAL(_tickets3), + __EVAL(_tickets4), + __EVAL(_tickets5), + __EVAL(_tickets6), + __EVAL(_tickets7), + __EVAL(_tickets8), + __EVAL(_tickets9), + __EVAL(_tickets10) + }; + texts[] = { + __EVAL(_tickets0), + __EVAL(_tickets1), + __EVAL(_tickets2), + __EVAL(_tickets3), + __EVAL(_tickets4), + __EVAL(_tickets5), + __EVAL(_tickets6), + __EVAL(_tickets7), + __EVAL(_tickets8), + __EVAL(_tickets9), + __EVAL(_tickets10) + }; + default = TICKETS_DEFAULT; + function = "BIS_fnc_paramRespawnTickets"; +}; \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramRevive.hpp b/include/a3/functions_f/Params/paramRevive.hpp new file mode 100644 index 00000000..58286c4e --- /dev/null +++ b/include/a3/functions_f/Params/paramRevive.hpp @@ -0,0 +1 @@ +#include "\A3\Functions_F\Params\paramRevive.inc" \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramRevive.inc b/include/a3/functions_f/Params/paramRevive.inc new file mode 100644 index 00000000..085d4012 --- /dev/null +++ b/include/a3/functions_f/Params/paramRevive.inc @@ -0,0 +1,208 @@ +/* + Adds server parameters related to revive. + + How to install: + Include this file to description.ext of your mission. + + Example: + class Params + { + #include "\a3\Functions_F\Params\paramRevive.inc" + }; +*/ + +class ReviveMode +{ + title = $STR_A3_ReviveMode; + isGlobal = 1; + + values[] = { + -100, + 0, + 1 + }; + texts[] = { + $STR_A3_MissionDefault, + $STR_A3_Disabled, + $STR_A3_EnabledForAllPlayers + }; + default = -100; + function = "bis_fnc_paramReviveMode"; +}; + +class ReviveDuration +{ + title = $STR_A3_ReviveDuration; + isGlobal = 1; + + values[] = { + -100, + 6, + 8, + 10, + 12, + 15, + 20, + 25, + 30 + }; + texts[] = { + $STR_A3_MissionDefault, + 6, + 8, + 10, + 12, + 15, + 20, + 25, + 30 + }; + default = -100; + function = "bis_fnc_paramReviveDuration"; +}; + +class ReviveRequiredTrait +{ + title = $STR_A3_RequiredTrait; + isGlobal = 1; + + values[] = { + -100, + 0, + 1 + }; + texts[] = { + $STR_A3_MissionDefault, + $STR_A3_None, + $STR_A3_Medic + }; + default = -100; + function = "bis_fnc_paramReviveRequiredTrait"; +}; + +class ReviveMedicSpeedMultiplier +{ + title = $STR_A3_RequiredTrait_MedicSpeedMultiplier; + isGlobal = 1; + + values[] = { + -100, + 1, + 1.5, + 2, + 2.5, + 3 + }; + texts[] = { + $STR_A3_MissionDefault, + "1x", + "1.5x", + "2x", + "2.5x", + "3x" + }; + default = -100; + function = "bis_fnc_paramReviveMedicSpeedMultiplier"; +}; + +class ReviveRequiredItems +{ + title = $STR_A3_RequiredItems; + isGlobal = 1; + + values[] = { + -100, + 0, + 1, + 2 + }; + texts[] = { + $STR_A3_MissionDefault, + $STR_A3_None, + $STR_A3_Medikit, + $STR_A3_FirstAidKitOrMedikit + }; + default = -100; + function = "bis_fnc_paramReviveRequiredItems"; +}; + +class UnconsciousStateMode +{ + title = $STR_A3_IncapacitationMode; + isGlobal = 1; + + values[] = { + -100, + 0, + 1 + }; + texts[] = { + $STR_A3_MissionDefault, + $STR_A3_Basic, + $STR_A3_Advanced + }; + default = -100; + function = "bis_fnc_paramReviveUnconsciousStateMode"; +}; + +class ReviveBleedOutDuration +{ + title = $STR_A3_BleedOutDuration; + isGlobal = 1; + + values[] = { + -100, + 10, + 15, + 20, + 30, + 45, + 60, + 90, + 180 + }; + texts[] = { + $STR_A3_MissionDefault, + 10, + 15, + 20, + 30, + 45, + 60, + 90, + 180 + }; + default = -100; + function = "bis_fnc_paramReviveBleedOutDuration"; +}; + +class ReviveForceRespawnDuration +{ + title = $STR_A3_ForceRespawnDuration; + isGlobal = 1; + + values[] = { + -100, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10 + }; + texts[] = { + $STR_A3_MissionDefault, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10 + }; + default = -100; + function = "bis_fnc_paramReviveForceRespawnDuration"; +}; \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramWeather.hpp b/include/a3/functions_f/Params/paramWeather.hpp new file mode 100644 index 00000000..80e9ea6c --- /dev/null +++ b/include/a3/functions_f/Params/paramWeather.hpp @@ -0,0 +1 @@ +#include "\A3\Functions_F\Params\paramWeather.inc" \ No newline at end of file diff --git a/include/a3/functions_f/Params/paramWeather.inc b/include/a3/functions_f/Params/paramWeather.inc new file mode 100644 index 00000000..6ac51573 --- /dev/null +++ b/include/a3/functions_f/Params/paramWeather.inc @@ -0,0 +1,31 @@ +/* + Include this file to description.ext of your mission + + Optionally, you can set default value: + #define WEATHER_DEFAULT 0.8 + + Example: + class Params + { + #include "\a3\Functions_F\Params\paramWeather.inc" + }; +*/ + +#ifndef WEATHER_DEFAULT + #define WEATHER_DEFAULT 25 +#endif + +class Weather +{ + title = $STR_A3_rscattributeovercast_title; + values[] = {0,25,50,75,100}; + texts[] = { + $STR_A3_rscattributeovercast_value000_tooltip, + $STR_A3_rscattributeovercast_value025_tooltip, + $STR_A3_rscattributeovercast_value050_tooltip, + $STR_A3_rscattributeovercast_value075_tooltip, + $STR_A3_rscattributeovercast_value100_tooltip + }; + default = WEATHER_DEFAULT; + function = "BIS_fnc_paramWeather"; +}; \ No newline at end of file diff --git a/include/a3/functions_f_mp_mark/Params/paramTimeAcceleration.hpp b/include/a3/functions_f_mp_mark/Params/paramTimeAcceleration.hpp new file mode 100644 index 00000000..4a20108d --- /dev/null +++ b/include/a3/functions_f_mp_mark/Params/paramTimeAcceleration.hpp @@ -0,0 +1 @@ +#include "\A3\Functions_F_MP_Mark\Params\paramTimeAcceleration.inc" \ No newline at end of file diff --git a/include/a3/functions_f_mp_mark/Params/paramTimeAcceleration.inc b/include/a3/functions_f_mp_mark/Params/paramTimeAcceleration.inc new file mode 100644 index 00000000..57622e3d --- /dev/null +++ b/include/a3/functions_f_mp_mark/Params/paramTimeAcceleration.inc @@ -0,0 +1,31 @@ +/* + Include this file to description.ext of your mission + + Optionally, you can set default value: + #define TIMEACCELERATION_DEFAULT 1 + + Example: + class Params + { + #include "\a3\Functions_F_MP_Mark\Params\paramTimeAcceleration.inc" + }; +*/ + +#ifndef TIMEACCELERATION_DEFAULT + #define TIMEACCELERATION_DEFAULT 1 +#endif + +class TimeAcceleration +{ + title = $STR_usract_time_inc; + values[] = {1,2,5,10,20}; + texts[] = { + "x1", + "x2", + "x5", + "x10", + "x20" + }; + default = TIMEACCELERATION_DEFAULT; + function = "BIS_fnc_paramTimeAcceleration"; +}; \ No newline at end of file diff --git a/include/a3/ui_f/$PBOPREFIX$ b/include/a3/ui_f/$PBOPREFIX$ new file mode 100644 index 00000000..93870d7e --- /dev/null +++ b/include/a3/ui_f/$PBOPREFIX$ @@ -0,0 +1 @@ +a3\ui_f diff --git a/include/a3/ui_f/hpp/defineCommon.inc b/include/a3/ui_f/hpp/defineCommon.inc new file mode 100644 index 00000000..fd54d25f --- /dev/null +++ b/include/a3/ui_f/hpp/defineCommon.inc @@ -0,0 +1,184 @@ +#define true 1 +#define false 0 + +// type scope +#define private 0 +#define protected 1 +#define public 2 + +#define ReadAndWrite 0 //! any modifications enabled +#define ReadAndCreate 1 //! only adding new class members is allowed +#define ReadOnly 2 //! no modifications enabled +#define ReadOnlyVerified 3 //! no modifications enabled, CRC test applied + +#define LockNo 0 +#define LockCadet 1 +#define LockYes 2 + +#define SPEED_STATIC 1e10 + +#define NEVER_DESTROY 1000 // for MP - destroying dead bodies + + +#include "defineCommonGrids.inc" +#include "defineCommonColors.inc" + + +/////////////////////////////////////////////////////////////////////////// +/// Text Sizes +/////////////////////////////////////////////////////////////////////////// +//MUF - text sizes are using new grid (40/25) +#define GUI_TEXT_SIZE_SMALL (GUI_GRID_H * 0.8) +#define GUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 1) +#define GUI_TEXT_SIZE_LARGE (GUI_GRID_H * 1.2) + +#define IGUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 0.8) + + +/////////////////////////////////////////////////////////////////////////// +/// Fonts +/////////////////////////////////////////////////////////////////////////// + +//Changed by MUF - TODO: set proper fonts when available - PREPARED FOR FONT CHANGE (was Zeppelin32Mono, changed to Purista/Etelka) + +//GUI_FONT_MONO - used for optics active parts +//GUI_FONT_BOLD - used for titles +#define GUI_FONT_NORMAL RobotoCondensed +#define GUI_FONT_BOLD RobotoCondensedBold +#define GUI_FONT_THIN RobotoCondensedLight +#define GUI_FONT_MONO EtelkaMonospacePro +#define GUI_FONT_NARROW EtelkaNarrowMediumPro + +#define GUI_FONT_CODE LucidaConsoleB//Deprecated - for engine debug only (has only two sizes, which causes errors). +#define GUI_FONT_SYSTEM TahomaB//Deprecated - for engine debug only (has only one size, which causes errors). + +//Font used by the engine as default when defined font (e.g. in description.ext) is not found +class DefaultFont +{ + font = GUI_FONT_NORMAL; +}; + + +/////////////////////////////////////////////////////////////////////////// +/// Sizes +/////////////////////////////////////////////////////////////////////////// + +//--------------------------------------------------MUF-made a bit bigger for Purista font - TODO: find out precise values +// #define TextSize_xsmall 0.014 +// #define TextSize_IGUI_normal 0.0234375 +// #define TextSize_small 0.02674 +// #define TextSize_normal 0.02674 +// #define TextSize_medium 0.0286458 +// #define TextSize_big 0.0325521 + +// #define TextSize_xsmall 0.02 //new values used in A3 with Purista font - won't be used when TKOH GUI merged +// #define TextSize_IGUI_normal 0.024 +// #define TextSize_small 0.03 +// #define TextSize_normal 0.03 +// #define TextSize_medium 0.032 +// #define TextSize_big 0.033 +//--------------------------------------------------MUF-made a bit bigger for Purista font + + + +#define SizeMapMarker 32 + +#define blinkPeriod 1 + +//dimension of bitmaps to be mapped 1:1 in 720p +#define w16 0.0196078 +#define h16 0.0261438 + +#define w32 0.0392157 +#define h32 0.0522876 + +#define w64 0.0784314 +#define h64 0.1045752 + +#define w128 0.1568627 +#define h128 0.2091503 + +#define w256 0.3137255 +#define h256 0.4183007 + +#define w512 0.6274510 +#define h512 0.8366013 + +#define w1024 1.2549020 +#define h1024 1.6732026 + +#define w2048 2.5098039 +#define h2048 3.3464052 + +/////////////////////////////////////////////////////////////////////////// +/// Scripts +/////////////////////////////////////////////////////////////////////////// + +#define INIT_DISPLAY_FUNCTION (uinamespace getvariable 'BIS_fnc_initDisplay') +#define INIT_DISPLAY_INTERNAL scriptIsInternal = 1; + +//--- Code executed on each display where the macro is used. Scripts are pre-compiled at the game start by BIS_fnc_initDisplays +#define INIT_DISPLAY(NAME,PATH) \ + scriptName = ##NAME##;\ + scriptPath = ##PATH##;\ + onLoad = ["onLoad",_this,#NAME,'##PATH##'] call INIT_DISPLAY_FUNCTION; \ + onUnload = ["onUnload",_this,#NAME,'##PATH##'] call INIT_DISPLAY_FUNCTION; + +//--- Special version of the macro for initial loading screen which initializes Functions +#define INIT_DISPLAY_START(NAME,PATH) \ + scriptName = ##NAME##;\ + scriptPath = ##PATH##;\ + onLoad = "[2] call compile preprocessfilelinenumbers gettext (configfile >> 'CfgFunctions' >> 'init'); ['onLoad',_this,'RscDisplayLoading','Loading'] call (uinamespace getvariable 'BIS_fnc_initDisplay')";\ + onUnload = ["onUnload",_this,#NAME,'##PATH##'] call INIT_DISPLAY_FUNCTION; + +//--- Code executed on each control where the macro is used +#define INIT_CONTROL(NAME,PATH) \ + scriptName = ##NAME##;\ + scriptPath = ##PATH##;\ + onLoad = ["onLoad",_this,#NAME,'##PATH##',false] call INIT_DISPLAY_FUNCTION; \ + onUnload = ["onUnload",_this,#NAME,'##PATH##',false] call INIT_DISPLAY_FUNCTION; + + +/////////////////////////////////////////////////////////////////////////// +/// IGUI fading times +/////////////////////////////////////////////////////////////////////////// +#define DIMM_START 0 +#define DIMM_END 0.3 + + +/////////////////////////////////////////////////////////////////////////// +/// Other +/////////////////////////////////////////////////////////////////////////// +#define TOSTRING(TEXT) #TEXT + +#define flag_west "A3\ui_f\data\gui\rsc\RscDisplayMultiplayerSetup\flag_bluefor_ca.paa" +#define flag_east "A3\ui_f\data\gui\rsc\RscDisplayMultiplayerSetup\flag_opfor_ca.paa" +#define flag_guer "A3\ui_f\data\gui\rsc\RscDisplayMultiplayerSetup\flag_indep_ca.paa" +#define flag_civl "A3\ui_f\data\gui\rsc\RscDisplayMultiplayerSetup\flag_civil_ca.paa" + +#define KEY_HINT(name, dik, text) class name {key = dik; hint = "";} + +//__EXEC( _xSpacing = 0.007353; _ySpacing = 0.009804;) +//__EXEC( _HintsX = [1,34,67,100]; _HintsY = [87,92]; ) +//__EXEC( _HintsW = 25; _HintsH = 4;) + +//ScrollBar used in various UI elements (ListBox, ComboBox etc.) +class ScrollBar +{ + color[] = {1,1,1,0.6}; + colorActive[] = {1,1,1,1}; + colorDisabled[] = {1,1,1,0.3}; + thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; + arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; + arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; + border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; + shadow = 0; + scrollSpeed = 0.06; //Multiplier of the deltaZ value coming from the mouse's wheel + //Doesn't have effect on ListBox and ComboBox. + width = 0; + height = 0; + autoScrollEnabled = 0; + autoScrollSpeed = -1; + autoScrollDelay = 5; + autoScrollRewind = 0; +}; diff --git a/include/a3/ui_f/hpp/defineCommon.inc.old b/include/a3/ui_f/hpp/defineCommon.inc.old new file mode 100644 index 00000000..79638637 --- /dev/null +++ b/include/a3/ui_f/hpp/defineCommon.inc.old @@ -0,0 +1,184 @@ +#define true 1 +#define false 0 + +// type scope +#define private 0 +#define protected 1 +#define public 2 + +#define ReadAndWrite 0 //! any modifications enabled +#define ReadAndCreate 1 //! only adding new class members is allowed +#define ReadOnly 2 //! no modifications enabled +#define ReadOnlyVerified 3 //! no modifications enabled, CRC test applied + +#define LockNo 0 +#define LockCadet 1 +#define LockYes 2 + +#define SPEED_STATIC 1e10 + +#define NEVER_DESTROY 1000 // for MP - destroying dead bodies + + +#include "defineCommonGrids.inc" +#include "defineCommonColors.inc" + + +/////////////////////////////////////////////////////////////////////////// +/// Text Sizes +/////////////////////////////////////////////////////////////////////////// +//MUF - text sizes are using new grid (40/25) +#define GUI_TEXT_SIZE_SMALL (GUI_GRID_H * 0.8) +#define GUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 1) +#define GUI_TEXT_SIZE_LARGE (GUI_GRID_H * 1.2) + +#define IGUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 0.8) + + +/////////////////////////////////////////////////////////////////////////// +/// Fonts +/////////////////////////////////////////////////////////////////////////// + +//Changed by MUF - TODO: set proper fonts when available - PREPARED FOR FONT CHANGE (was Zeppelin32Mono, changed to Purista/Etelka) + +//GUI_FONT_MONO - used for optics active parts +//GUI_FONT_BOLD - used for titles +#define GUI_FONT_NORMAL RobotoCondensed +#define GUI_FONT_BOLD RobotoCondensedBold +#define GUI_FONT_THIN RobotoCondensedLight +#define GUI_FONT_MONO EtelkaMonospacePro +#define GUI_FONT_NARROW EtelkaNarrowMediumPro + +#define GUI_FONT_CODE LucidaConsoleB//Deprecated - for engine debug only (has only two sizes, which causes errors). +#define GUI_FONT_SYSTEM TahomaB//Deprecated - for engine debug only (has only one size, which causes errors). + +//Font used by the engine as default when defined font (e.g. in description.ext) is not found +class DefaultFont +{ + font = GUI_FONT_NORMAL; +}; + + +/////////////////////////////////////////////////////////////////////////// +/// Sizes +/////////////////////////////////////////////////////////////////////////// + +//--------------------------------------------------MUF-made a bit bigger for Purista font - TODO: find out precise values +// #define TextSize_xsmall 0.014 +// #define TextSize_IGUI_normal 0.0234375 +// #define TextSize_small 0.02674 +// #define TextSize_normal 0.02674 +// #define TextSize_medium 0.0286458 +// #define TextSize_big 0.0325521 + +// #define TextSize_xsmall 0.02 //new values used in A3 with Purista font - won't be used when TKOH GUI merged +// #define TextSize_IGUI_normal 0.024 +// #define TextSize_small 0.03 +// #define TextSize_normal 0.03 +// #define TextSize_medium 0.032 +// #define TextSize_big 0.033 +//--------------------------------------------------MUF-made a bit bigger for Purista font + + + +#define SizeMapMarker 32 + +#define blinkPeriod 1 + +//dimension of bitmaps to be mapped 1:1 in 720p +#define w16 0.0196078 +#define h16 0.0261438 + +#define w32 0.0392157 +#define h32 0.0522876 + +#define w64 0.0784314 +#define h64 0.1045752 + +#define w128 0.1568627 +#define h128 0.2091503 + +#define w256 0.3137255 +#define h256 0.4183007 + +#define w512 0.6274510 +#define h512 0.8366013 + +#define w1024 1.2549020 +#define h1024 1.6732026 + +#define w2048 2.5098039 +#define h2048 3.3464052 + +/////////////////////////////////////////////////////////////////////////// +/// Scripts +/////////////////////////////////////////////////////////////////////////// + +#define INIT_DISPLAY_FUNCTION (uinamespace getvariable 'BIS_fnc_initDisplay') +#define INIT_DISPLAY_INTERNAL scriptIsInternal = 1; + +//--- Code executed on each display where the macro is used. Scripts are pre-compiled at the game start by BIS_fnc_initDisplays +#define INIT_DISPLAY(NAME,PATH) \ + scriptName = ##NAME##;\ + scriptPath = ##PATH##;\ + onLoad = ["onLoad",_this,#NAME,'##PATH##'] call INIT_DISPLAY_FUNCTION; \ + onUnload = ["onUnload",_this,#NAME,'##PATH##'] call INIT_DISPLAY_FUNCTION; + +//--- Special version of the macro for initial loading screen which initializes Functions +#define INIT_DISPLAY_START(NAME,PATH) \ + scriptName = ##NAME##;\ + scriptPath = ##PATH##;\ + onLoad = "[2] call compile preprocessfilelinenumbers gettext (configfile >> 'CfgFunctions' >> 'init'); ['onLoad',_this,'RscDisplayLoading','Loading'] call (uinamespace getvariable 'BIS_fnc_initDisplay')";\ + onUnload = ["onUnload",_this,#NAME,'##PATH##'] call INIT_DISPLAY_FUNCTION; + +//--- Code executed on each control where the macro is used +#define INIT_CONTROL(NAME,PATH) \ + scriptName = ##NAME##;\ + scriptPath = ##PATH##;\ + onLoad = ["onLoad",_this,#NAME,'##PATH##',false] call INIT_DISPLAY_FUNCTION; \ + onUnload = ["onUnload",_this,#NAME,'##PATH##',false] call INIT_DISPLAY_FUNCTION; + + +/////////////////////////////////////////////////////////////////////////// +/// IGUI fading times +/////////////////////////////////////////////////////////////////////////// +#define DIMM_START 0 +#define DIMM_END 0.3 + + +/////////////////////////////////////////////////////////////////////////// +/// Other +/////////////////////////////////////////////////////////////////////////// +#define TOSTRING(TEXT) #TEXT + +#define flag_west "A3\ui_f\data\gui\rsc\RscDisplayMultiplayerSetup\flag_bluefor_ca.paa" +#define flag_east "A3\ui_f\data\gui\rsc\RscDisplayMultiplayerSetup\flag_opfor_ca.paa" +#define flag_guer "A3\ui_f\data\gui\rsc\RscDisplayMultiplayerSetup\flag_indep_ca.paa" +#define flag_civl "A3\ui_f\data\gui\rsc\RscDisplayMultiplayerSetup\flag_civil_ca.paa" + +#define KEY_HINT(name, dik, text) class name {key = dik; hint = "";} + +__EXEC( _xSpacing = 0.007353; _ySpacing = 0.009804;) +__EXEC( _HintsX = [1,34,67,100]; _HintsY = [87,92]; ) +__EXEC( _HintsW = 25; _HintsH = 4;) + +//ScrollBar used in various UI elements (ListBox, ComboBox etc.) +class ScrollBar +{ + color[] = {1,1,1,0.6}; + colorActive[] = {1,1,1,1}; + colorDisabled[] = {1,1,1,0.3}; + thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; + arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; + arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; + border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; + shadow = 0; + scrollSpeed = 0.06; //Multiplier of the deltaZ value coming from the mouse's wheel + //Doesn't have effect on ListBox and ComboBox. + width = 0; + height = 0; + autoScrollEnabled = 0; + autoScrollSpeed = -1; + autoScrollDelay = 5; + autoScrollRewind = 0; +}; diff --git a/include/a3/ui_f/hpp/defineCommonColors.inc b/include/a3/ui_f/hpp/defineCommonColors.inc new file mode 100644 index 00000000..474b732f --- /dev/null +++ b/include/a3/ui_f/hpp/defineCommonColors.inc @@ -0,0 +1,309 @@ +/////////////////////////////////////////////////////////////////////////// +/// GUI +/////////////////////////////////////////////////////////////////////////// + +//--- Background color with defaults (not multipliable) +#define GUI_BCG_RGB_R "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])" +#define GUI_BCG_RGB_G "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])" +#define GUI_BCG_RGB_B "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])" +#define GUI_BCG_ALPHA "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.8])" + +#define GUI_BCG_RGB GUI_BCG_RGB_R, GUI_BCG_RGB_G, GUI_BCG_RGB_B +#define GUI_BCG_COLOR {GUI_BCG_RGB,GUI_BCG_ALPHA} +#define GUI_BCG_COLOR_SELECTED {GUI_BCG_RGB,0.5} + +//--- TitleBar text color +#define GUI_TITLETEXT_RGB_R "(profilenamespace getvariable ['GUI_TITLETEXT_RGB_R',1.0])" +#define GUI_TITLETEXT_RGB_G "(profilenamespace getvariable ['GUI_TITLETEXT_RGB_G',1.0])" +#define GUI_TITLETEXT_RGB_B "(profilenamespace getvariable ['GUI_TITLETEXT_RGB_B',1.0])" +#define GUI_TITLETEXT_ALPHA "(profilenamespace getvariable ['GUI_TITLETEXT_RGB_A',0.6])" +#define GUI_TITLETEXT_COLOR {GUI_TITLETEXT_RGB_R, GUI_TITLETEXT_RGB_G, GUI_TITLETEXT_RGB_B, GUI_TITLETEXT_ALPHA} + +//--- Background for wGUI displays +#define GUI_BCG_MENU_RGB 0, 0, 0 +#define GUI_BCG_MENU {GUI_BCG_MENU_RGB, 0.7} + +//--- Background for editor +#define GUI_BCG_EDITOR_RGB 0.1, 0.1, 0.1 +#define GUI_BCG_EDITOR {GUI_BCG_EDITOR_RGB, 1} + +//--- Medium background (obsolete; Dwarden's displays) +#define GUI_BCG_MEDIUM_RGB GUI_BCG_RGB +#define GUI_BCG_MEDIUM_ALPHA GUI_BCG_ALPHA +#define GUI_BCG_MEDIUM_COLOR {GUI_BCG_MEDIUM_RGB,GUI_BCG_MEDIUM_ALPHA} + +//--- Dark background (HUD) +#define GUI_BCG_DARK_RGB GUI_BCG_RGB +#define GUI_BCG_DARK_ALPHA 0.85 +#define GUI_BCG_DARK_COLOR {GUI_BCG_DARK_RGB,GUI_BCG_DARK_ALPHA} +#define GUI_BCG_DARK_TRANSPARENT {GUI_BCG_DARK_RGB,GUI_BCG_DARK_ALPHA / 2} + +//--- Active color (inversed to selected color) +#define GUI_BCG_ACTIVE_RGB 1, 1, 1 + +//--- Warning color (exit buttons) +#define GUI_BCG_ERROR_RGB 0.7, 0, 0 + +//--- Text color +#define GUI_TEXT_RGB 1, 1, 1 +#define GUI_TEXT_ALPHA 1.0 +#define GUI_TEXT_COLOR {GUI_TEXT_RGB,GUI_TEXT_ALPHA} +#define GUI_TEXT_SHADOW {0,0,0,0.5} +#define GUI_TEXT_HTML_COLOR "#ffffff" +#define GUI_TEXT_HTML_SHADOW "#80000000" + +//--- List: text colors and background highlight +#define GUI_LIST_TEXT_COLOR {GUI_TEXT_RGB,0.8} +#define GUI_LIST_TEXT_COLOR_SELECTED {GUI_TEXT_RGB,1.0} +#define GUI_LIST_BCG_SELECTED {0,0,0,0.2} + +//--- Tooltip colours +#define GUI_TOOLTIP_TEXT_COLOR {1, 1, 1, 1} +#define GUI_TOOLTIP_BOX_COLOR {1, 1, 1, 1} +#define GUI_TOOLTIP_SHADE_COLOR {0, 0, 0, 0.65} + + +/////////////////////////////////////////////////////////////////////////// +/// iGUI +/////////////////////////////////////////////////////////////////////////// +//--- IGUI Background color +#define IGUI_BCG_RGB_R "(profilenamespace getvariable ['IGUI_BCG_RGB_R',0])" +#define IGUI_BCG_RGB_G "(profilenamespace getvariable ['IGUI_BCG_RGB_G',1])" +#define IGUI_BCG_RGB_B "(profilenamespace getvariable ['IGUI_BCG_RGB_B',1])" +#define IGUI_BCG_RGB_A "(profilenamespace getvariable ['IGUI_BCG_RGB_A',0.8])" +#define IGUI_BCG_RGB IGUI_BCG_RGB_R, IGUI_BCG_RGB_G, IGUI_BCG_RGB_B +#define IGUI_BCG_COLOR {IGUI_BCG_RGB,IGUI_BCG_RGB_A} + +//--- IGUI Text color +#define IGUI_TEXT_RGB_R "(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])" +#define IGUI_TEXT_RGB_G "(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])" +#define IGUI_TEXT_RGB_B "(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])" +#define IGUI_TEXT_RGB_A "(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])" +#define IGUI_TEXT_RGB IGUI_TEXT_RGB_R, IGUI_TEXT_RGB_G, IGUI_TEXT_RGB_B +#define IGUI_TEXT_COLOR {IGUI_TEXT_RGB,IGUI_TEXT_RGB_A} + +//--- IGUI Warning color +#define IGUI_WARNING_RGB_R "(profilenamespace getvariable ['IGUI_WARNING_RGB_R',0.8])" +#define IGUI_WARNING_RGB_G "(profilenamespace getvariable ['IGUI_WARNING_RGB_G',0.5])" +#define IGUI_WARNING_RGB_B "(profilenamespace getvariable ['IGUI_WARNING_RGB_B',0.0])" +#define IGUI_WARNING_RGB_A "(profilenamespace getvariable ['IGUI_WARNING_RGB_A',0.8])" +#define IGUI_WARNING_RGB IGUI_WARNING_RGB_R, IGUI_WARNING_RGB_G, IGUI_WARNING_RGB_B +#define IGUI_WARNING_COLOR {IGUI_WARNING_RGB,IGUI_WARNING_RGB_A} + +//--- IGUI Error color +#define IGUI_ERROR_RGB_R "(profilenamespace getvariable ['IGUI_ERROR_RGB_R',0.8])" +#define IGUI_ERROR_RGB_G "(profilenamespace getvariable ['IGUI_ERROR_RGB_G',0.0])" +#define IGUI_ERROR_RGB_B "(profilenamespace getvariable ['IGUI_ERROR_RGB_B',0.0])" +#define IGUI_ERROR_RGB_A "(profilenamespace getvariable ['IGUI_ERROR_RGB_A',1.0])" +#define IGUI_ERROR_RGB IGUI_ERROR_RGB_R, IGUI_ERROR_RGB_G, IGUI_ERROR_RGB_B +#define IGUI_ERROR_COLOR {IGUI_ERROR_RGB,IGUI_ERROR_RGB_A} + +//--- HUD Text color (obsolete defines; ToDo: Replace with IGUI_TEXT_COLOR and IGUI_BCG_COLOR) +#define CA_UI_HUD IGUI_TEXT_COLOR + + + +/////////////////////////////////////////////////////////////////////////// +/// Sides +/////////////////////////////////////////////////////////////////////////// + +//--- BLUFOR +#define Map_BLUFOR_R "(profilenamespace getvariable ['Map_BLUFOR_R',0])" +#define Map_BLUFOR_G "(profilenamespace getvariable ['Map_BLUFOR_G',1])" +#define Map_BLUFOR_B "(profilenamespace getvariable ['Map_BLUFOR_B',1])" +#define Map_BLUFOR_A "(profilenamespace getvariable ['Map_BLUFOR_A',0.8])" +#define Map_BLUFOR_RGB Map_BLUFOR_R, Map_BLUFOR_G, Map_BLUFOR_B +#define Map_BLUFOR_RGBA {Map_BLUFOR_RGB,Map_BLUFOR_A} + +//--- OPFOR +#define Map_OPFOR_R "(profilenamespace getvariable ['Map_OPFOR_R',0])" +#define Map_OPFOR_G "(profilenamespace getvariable ['Map_OPFOR_G',1])" +#define Map_OPFOR_B "(profilenamespace getvariable ['Map_OPFOR_B',1])" +#define Map_OPFOR_A "(profilenamespace getvariable ['Map_OPFOR_A',0.8])" +#define Map_OPFOR_RGB Map_OPFOR_R, Map_OPFOR_G, Map_OPFOR_B +#define Map_OPFOR_RGBA {Map_OPFOR_RGB,Map_OPFOR_A} + +//--- Independent +#define Map_Independent_R "(profilenamespace getvariable ['Map_Independent_R',0])" +#define Map_Independent_G "(profilenamespace getvariable ['Map_Independent_G',1])" +#define Map_Independent_B "(profilenamespace getvariable ['Map_Independent_B',1])" +#define Map_Independent_A "(profilenamespace getvariable ['Map_Independent_A',0.8])" +#define Map_Independent_RGB Map_Independent_R, Map_Independent_G, Map_Independent_B +#define Map_Independent_RGBA {Map_Independent_RGB,Map_Independent_A} + +//--- Civilian +#define Map_Civilian_R "(profilenamespace getvariable ['Map_Civilian_R',0])" +#define Map_Civilian_G "(profilenamespace getvariable ['Map_Civilian_G',1])" +#define Map_Civilian_B "(profilenamespace getvariable ['Map_Civilian_B',1])" +#define Map_Civilian_A "(profilenamespace getvariable ['Map_Civilian_A',0.8])" +#define Map_Civilian_RGB Map_Civilian_R, Map_Civilian_G, Map_Civilian_B +#define Map_Civilian_RGBA {Map_Civilian_RGB,Map_Civilian_A} + +//--- Unknown +#define Map_Unknown_R "(profilenamespace getvariable ['Map_Unknown_R',0])" +#define Map_Unknown_G "(profilenamespace getvariable ['Map_Unknown_G',1])" +#define Map_Unknown_B "(profilenamespace getvariable ['Map_Unknown_B',1])" +#define Map_Unknown_A "(profilenamespace getvariable ['Map_Unknown_A',0.8])" +#define Map_Unknown_RGB Map_Unknown_R, Map_Unknown_G, Map_Unknown_B +#define Map_Unknown_RGBA {Map_Unknown_RGB,Map_Unknown_A} + + + +/////////////////////////////////////////////////////////////////////////// +/// Misc +/////////////////////////////////////////////////////////////////////////// +//overwritten by Warka +#define CA_UI_ACTION {0.9,0.9,0.9,0.4} +#define CA_UI_ACTION_AVAILABLE IGUI_TEXT_COLOR +#define CA_UI_ACTION_ACTIVE {0.24,0.87,0,0.8} +#define CA_IGUI_Green {0.709,0.972,0.384,1} +#define CA_IGUI_GreenDark {0.259,0.463,0.149, 1} //MUF-added from A3 //{0.659,0.863,0.549,0.6} +#define CA_IGUI_Background IGUI_BCG_COLOR + +#define Color_Orange {GUI_BCG_RGB, 1} +#define Color_DarkOrange {GUI_BCG_MEDIUM_RGB, 0.7} + +#define CA_colordark {0, 0, 0, 1} +#define CA_UI_element_background Color_White +#define CA_UI_background {0.6, 0.6, 0.6, 0.4} +#define CA_UI_title_background {0.1961,0.1451,0.0941,1.0} +#define CA_UI_green {0.709,0.972,0.384,1} +#define CA_UI_red {0.58, 0.1147, 0.1108, 1} + +#define CA_UI_grey {0.4,0.4,0.4,1} +#define CA_UI_transparent {1,1,1,0} + +#define CA_IGUI_Red {0.706,0.0745,0.0196,1} +#define CA_IGUI_Orange {0.863,0.584,0.0,1} +#define CA_IGUI_YellowGreen {0.8275,0.8196,0.1961,1.0} +#define CA_IGUI_Blue {0.196,0.592,0.706, 1} +#define CA_IGUI_Grey {0.606,0.606,0.606,1} + +#define Color_White {0.95, 0.95, 0.95, 1} +//#define Color_Black {0.023529, 0, 0.0313725, 1} +#define Color_Black {0, 0, 0, 1} +#define Color_Gray {1, 1, 1, 0.5} +#define Color_Empty {0, 0, 0, 0} + +#define Color_Back {0.1, 0.1, 0.1, 0.4} +#define Color_BackList {0.2, 0.2, 0.2, 0.2} + +#define ProcTextWhite "#(argb,8,8,3)color(1,1,1,1)" +#define ProcTextBlack "#(argb,8,8,3)color(0,0,0,1)" +#define ProcTextGray "#(argb,8,8,3)color(0.3,0.3,0.3,1)" +#define ProcTextRed "#(argb,8,8,3)color(1,0,0,1)" +#define ProcTextGreen "#(argb,8,8,3)color(0,1,0,1)" +#define ProcTextBlue "#(argb,8,8,3)color(0,0,1,1)" +#define ProcTextOrange "#(argb,8,8,3)color(1,0.5,0,1)" +#define ProcTextTransparent "#(argb,8,8,3)color(0,0,0,0)" +#define ProcTextHUD "#(argb,8,8,3)color(0.600,0.8392,0.4706,1.0)" +#define ProcTextPurple "#(argb,8,8,3)color(0.75,0,0.75,1)" + + +/////////////////////////////////////////////////////////////////////////// +/// Task colors: 3D task marker +/////////////////////////////////////////////////////////////////////////// +#define COLOR_TASK_ICON_UNASSIGNED_RGB 1,1,1 +#define COLOR_TASK_ICON_UNASSIGNED_A 0.5 +#define COLOR_TASK_ICON_UNASSIGNED_RGBA COLOR_TASK_ICON_UNASSIGNED_RGB,COLOR_TASK_ICON_UNASSIGNED_A +#define COLOR_TASK_ICON_ASSIGNED_RGB 1,0.72,0.3 +#define COLOR_TASK_ICON_ASSIGNED_A 0.5 +#define COLOR_TASK_ICON_ASSIGNED_RGBA COLOR_TASK_ICON_ASSIGNED_RGB,COLOR_TASK_ICON_ASSIGNED_A +#define COLOR_TASK_ICON_CUSTOM_RGB 0.3,0.72,1 +#define COLOR_TASK_ICON_CUSTOM_A 0.5 +#define COLOR_TASK_ICON_CUSTOM_RGBA COLOR_TASK_ICON_CUSTOM_RGB,COLOR_TASK_ICON_CUSTOM_A + + +#define COLOR_TASK_BACKGROUND_UNASSIGNED_RGB 1,1,1 +#define COLOR_TASK_BACKGROUND_UNASSIGNED_A 1 +#define COLOR_TASK_BACKGROUND_UNASSIGNED_RGBA COLOR_TASK_BACKGROUND_UNASSIGNED_RGB,COLOR_TASK_BACKGROUND_UNASSIGNED_A +#define COLOR_TASK_BACKGROUND_ASSIGNED_RGB 1,0.72,0.3 +#define COLOR_TASK_BACKGROUND_ASSIGNED_A 1 +#define COLOR_TASK_BACKGROUND_ASSIGNED_RGBA COLOR_TASK_BACKGROUND_ASSIGNED_RGB,COLOR_TASK_BACKGROUND_ASSIGNED_A +#define COLOR_TASK_BACKGROUND_CUSTOM_RGB 0.3,0.72,1 +#define COLOR_TASK_BACKGROUND_CUSTOM_A 1 +#define COLOR_TASK_BACKGROUND_CUSTOM_RGBA COLOR_TASK_BACKGROUND_CUSTOM_RGB,COLOR_TASK_BACKGROUND_CUSTOM_A + + +#define COLOR_TASK_TEXT_UNASSIGNED_RGB 0.91,0.91,0.91 +#define COLOR_TASK_TEXT_UNASSIGNED_A 0.55 +#define COLOR_TASK_TEXT_UNASSIGNED_RGBA COLOR_TASK_TEXT_UNASSIGNED_RGB,COLOR_TASK_TEXT_UNASSIGNED_A +#define COLOR_TASK_TEXT_ASSIGNED_RGB 0.91,0.65,0.27 +#define COLOR_TASK_TEXT_ASSIGNED_A 0.55 +#define COLOR_TASK_TEXT_ASSIGNED_RGBA COLOR_TASK_TEXT_ASSIGNED_RGB,COLOR_TASK_TEXT_ASSIGNED_A +#define COLOR_TASK_TEXT_CUSTOM_RGB 0.27,0.65,0.91 +#define COLOR_TASK_TEXT_CUSTOM_A 0.55 +#define COLOR_TASK_TEXT_CUSTOM_RGBA COLOR_TASK_TEXT_CUSTOM_RGB,COLOR_TASK_TEXT_CUSTOM_A + + +/////////////////////////////////////////////////////////////////////////// +/// Task colors: generic +/////////////////////////////////////////////////////////////////////////// +#define COLOR_TASK_UNASSIGNED_RGB COLOR_TASK_BACKGROUND_UNASSIGNED_RGB +#define COLOR_TASK_UNASSIGNED_RGBA COLOR_TASK_UNASSIGNED_RGB,1 + +#define COLOR_TASK_ASSIGNED_RGB COLOR_TASK_BACKGROUND_ASSIGNED_RGB +#define COLOR_TASK_ASSIGNED_RGBA COLOR_TASK_ASSIGNED_RGB,1 + +#define COLOR_TASK_CUSTOM_RGB COLOR_TASK_BACKGROUND_CUSTOM_RGB +#define COLOR_TASK_CUSTOM_RGBA COLOR_TASK_CUSTOM_RGB,1 + +//navigation elements +#define IGUI_CURSOR_COLOR {COLOR_TASK_TEXT_UNASSIGNED_RGBA} + +/////////////////////////////////////////////////////////////////////////// +/// Custom info / Sensors (duplicated in \A3\cfgSensors.hpp !!!) +/////////////////////////////////////////////////////////////////////////// + +#define COLOR_SENSORS_RADAR_RGB 0.0,1.0,1.0 +#define COLOR_SENSORS_RADAR_A 1.0 +#define COLOR_SENSORS_RADAR_RGBA {COLOR_SENSORS_RADAR_RGB,COLOR_SENSORS_RADAR_A} + +#define COLOR_SENSORS_IR_RGB 1.0,0.0,0.0 +#define COLOR_SENSORS_IR_A 1.0 +#define COLOR_SENSORS_IR_RGBA {COLOR_SENSORS_IR_RGB,COLOR_SENSORS_IR_A} + +#define COLOR_SENSORS_RWR_RGB 0.5, 1, 0.5 +#define COLOR_SENSORS_RWR_A 0.5 +#define COLOR_SENSORS_RWR_RGBA {COLOR_SENSORS_RWR_RGB,COLOR_SENSORS_RWR_A} + +#define COLOR_SENSORS_NV_RGB 1,1,1 +#define COLOR_SENSORS_NV_A 0 +#define COLOR_SENSORS_NV_RGBA {COLOR_SENSORS_NV_RGB,COLOR_SENSORS_NV_A} + +#define COLOR_SENSORS_LAS_RGB 1,1,1 +#define COLOR_SENSORS_LAS_A 0 +#define COLOR_SENSORS_LAS_RGBA {COLOR_SENSORS_LAS_RGB,COLOR_SENSORS_LAS_A} + +#define COLOR_SENSORS_VIS_RGB 1.0,1.0,0.5 +#define COLOR_SENSORS_VIS_A 0.8 +#define COLOR_SENSORS_VIS_RGBA {COLOR_SENSORS_VIS_RGB,COLOR_SENSORS_VIS_A} + +#define COLOR_SENSORS_MAN_RGB 1.0, 0.5, 1.0 +#define COLOR_SENSORS_MAN_A 1.0 +#define COLOR_SENSORS_MAN_RGBA {COLOR_SENSORS_MAN_RGB,COLOR_SENSORS_MAN_A} + + +#define COLOR_SENSORS_ENEMY_RGB 1.0, 0.0, 0.0 +#define COLOR_SENSORS_ENEMY_A 1.0 +#define COLOR_SENSORS_ENEMY_RGBA {COLOR_SENSORS_ENEMY_RGB,COLOR_SENSORS_ENEMY_A} + +#define COLOR_SENSORS_FRIENDLY_RGB 0.0, 1.0, 0.0 +#define COLOR_SENSORS_FRIENDLY_A 1.0 +#define COLOR_SENSORS_FRIENDLY_RGBA {COLOR_SENSORS_FRIENDLY_RGB,COLOR_SENSORS_FRIENDLY_A} + +#define COLOR_SENSORS_GROUP_RGB 0.7, 1.0, 0.4 +#define COLOR_SENSORS_GROUP_A 1.0 +#define COLOR_SENSORS_GROUP_RGBA {COLOR_SENSORS_GROUP_RGB,COLOR_SENSORS_GROUP_A} + +#define COLOR_SENSORS_WARNING_RGB 1.0, 1.0, 0.0 +#define COLOR_SENSORS_WARNING_A 1.0 +#define COLOR_SENSORS_WARNING_RGBA {COLOR_SENSORS_WARNING_RGB,COLOR_SENSORS_WARNING_A} + +#define COLOR_SENSORS_THREAT_RGB 1.0, 0.5, 0.0 +#define COLOR_SENSORS_THREAT_A 1.0 +#define COLOR_SENSORS_THREAT_RGBA {COLOR_SENSORS_THREAT_RGB,COLOR_SENSORS_THREAT_A} + +#define COLOR_SENSORS_DEFAULT_RGB 1.0, 1.0, 1.0 +#define COLOR_SENSORS_DEFAULT_A 1.0 +#define COLOR_SENSORS_DEFAULT_RGBA {COLOR_SENSORS_DEFAULT_RGB,COLOR_SENSORS_DEFAULT_A} \ No newline at end of file diff --git a/include/a3/ui_f/hpp/defineCommonGrids.inc b/include/a3/ui_f/hpp/defineCommonGrids.inc new file mode 100644 index 00000000..42b2c29b --- /dev/null +++ b/include/a3/ui_f/hpp/defineCommonGrids.inc @@ -0,0 +1,433 @@ +/////////////////////////////////////////////////////////////////////////// +/// GUI +/////////////////////////////////////////////////////////////////////////// + +//--- Hack to avoid too large display upon first startup (fixed in engine) +//#define GUI_GRID_OLD_WAbs ((safezoneW / ((floor (safezoneW / safezoneH)) max 1)) min 1.2) + +//--- New grid for new A3 displays +#define GUI_GRID_WAbs ((safezoneW / safezoneH) min 1.2) +#define GUI_GRID_HAbs (GUI_GRID_WAbs / 1.2) +#define GUI_GRID_W (GUI_GRID_WAbs / 40) +#define GUI_GRID_H (GUI_GRID_HAbs / 25) +#define GUI_GRID_X (safezoneX) +#define GUI_GRID_Y (safezoneY + safezoneH - GUI_GRID_HAbs) + +//--- MUF - Test grid used in MP +#define GUI_GRID_MP_WAbs GUI_GRID_WAbs +#define GUI_GRID_MP_HAbs GUI_GRID_HAbs +#define GUI_GRID_MP_W GUI_GRID_W +#define GUI_GRID_MP_H GUI_GRID_H +#define GUI_GRID_MP_X (SafezoneX) +#define GUI_GRID_MP_Y (safezoneY) + +//--- Screen Center +#define GUI_GRID_CENTER_WAbs GUI_GRID_WAbs +#define GUI_GRID_CENTER_HAbs GUI_GRID_HAbs +#define GUI_GRID_CENTER_W GUI_GRID_W +#define GUI_GRID_CENTER_H GUI_GRID_H +#define GUI_GRID_CENTER_X (safezoneX + (safezoneW - GUI_GRID_CENTER_WAbs)/2) +#define GUI_GRID_CENTER_Y (safezoneY + (safezoneH - GUI_GRID_CENTER_HAbs)/2) + +//--- Bottom center position (used by Revive UI) +#define GUI_GRID_CENTER_BOTTOM_WAbs GUI_GRID_WAbs +#define GUI_GRID_CENTER_BOTTOM_HAbs GUI_GRID_HAbs +#define GUI_GRID_CENTER_BOTTOM_W GUI_GRID_W +#define GUI_GRID_CENTER_BOTTOM_H GUI_GRID_H +#define GUI_GRID_CENTER_BOTTOM_X (safezoneX + (safezoneW - GUI_GRID_CENTER_WAbs)/2) +#define GUI_GRID_CENTER_BOTTOM_Y (safezoneY + safezoneH - GUI_GRID_CENTER_HAbs) + +//--- Screen Top Center +#define GUI_GRID_TOPCENTER_WAbs GUI_GRID_WAbs +#define GUI_GRID_TOPCENTER_HAbs GUI_GRID_HAbs +#define GUI_GRID_TOPCENTER_W GUI_GRID_W +#define GUI_GRID_TOPCENTER_H GUI_GRID_H +#define GUI_GRID_TOPCENTER_X GUI_GRID_CENTER_X +#define GUI_GRID_TOPCENTER_Y safezoneY + +//--- Screen Bottom Center +#define GUI_GRID_BOTTOMCENTER_WAbs GUI_GRID_WAbs +#define GUI_GRID_BOTTOMCENTER_HAbs GUI_GRID_HAbs +#define GUI_GRID_BOTTOMCENTER_W GUI_GRID_W +#define GUI_GRID_BOTTOMCENTER_H GUI_GRID_H +#define GUI_GRID_BOTTOMCENTER_X GUI_GRID_CENTER_X +#define GUI_GRID_BOTTOMCENTER_Y GUI_GRID_Y + +//--- 2D Editor - TEST A3 +#define GUI_GRID_EDITOR_WAbs GUI_GRID_CENTER_WAbs +#define GUI_GRID_EDITOR_HAbs GUI_GRID_CENTER_HAbs +#define GUI_GRID_EDITOR_W GUI_GRID_CENTER_W +#define GUI_GRID_EDITOR_H GUI_GRID_CENTER_H +#define GUI_GRID_EDITOR_X (safezoneX) +#define GUI_GRID_EDITOR_Y (safezoneY) + +//--- Diary +#define GUI_GRID_DIARY_WAbs GUI_GRID_WAbs +#define GUI_GRID_DIARY_HAbs GUI_GRID_HAbs +#define GUI_GRID_DIARY_W GUI_GRID_W +#define GUI_GRID_DIARY_H GUI_GRID_H +#define GUI_GRID_DIARY_X (safezoneX) +#define GUI_GRID_DIARY_Y (safezoneY) + +//--- Top left +#define GUI_GRID_TOPLEFT_WAbs GUI_GRID_WAbs +#define GUI_GRID_TOPLEFT_HAbs GUI_GRID_HAbs +#define GUI_GRID_TOPLEFT_W GUI_GRID_W +#define GUI_GRID_TOPLEFT_H GUI_GRID_H +#define GUI_GRID_TOPLEFT_X (safezoneX) +#define GUI_GRID_TOPLEFT_Y (safezoneY) + + +/////////////////////////////////////////////////////////////////////////// +/// iGUI +/////////////////////////////////////////////////////////////////////////// + +//--- IGUI Vehicle +#define IGUI_GRID_VEHICLE_WAbs (10 * GUI_GRID_W) +#define IGUI_GRID_VEHICLE_HAbs (4.5 * GUI_GRID_H) +#define IGUI_GRID_VEHICLE_XDef (safezoneX + 0.5 * GUI_GRID_W) +#define IGUI_GRID_VEHICLE_YDef (safezoneY + 0.5 * GUI_GRID_H) +#define IGUI_GRID_VEHICLE_X (profilenamespace getvariable ["IGUI_GRID_VEHICLE_X",IGUI_GRID_VEHICLE_XDef]) +#define IGUI_GRID_VEHICLE_Y (profilenamespace getvariable ["IGUI_GRID_VEHICLE_Y",IGUI_GRID_VEHICLE_YDef]) +#define IGUI_GRID_VEHICLE_W GUI_GRID_W +#define IGUI_GRID_VEHICLE_H GUI_GRID_H + +//--- IGUI Radar +#define IGUI_GRID_RADAR_WAbs (5.6 * GUI_GRID_W) +#define IGUI_GRID_RADAR_HAbs (5.6 * GUI_GRID_H) +#define IGUI_GRID_RADAR_XDef (safezoneX + safezoneW / 2 - 2.8 * GUI_GRID_W) +#define IGUI_GRID_RADAR_YDef (safezoneY + 0.5 * GUI_GRID_H) +#define IGUI_GRID_RADAR_X (profilenamespace getvariable ["IGUI_GRID_RADAR_X",IGUI_GRID_RADAR_XDef]) +#define IGUI_GRID_RADAR_Y (profilenamespace getvariable ["IGUI_GRID_RADAR_Y",IGUI_GRID_RADAR_YDef]) +#define IGUI_GRID_RADAR_W GUI_GRID_W +#define IGUI_GRID_RADAR_H GUI_GRID_H + +//--- IGUI Weapon +#define IGUI_GRID_WEAPON_WAbs (10 * GUI_GRID_W) +#define IGUI_GRID_WEAPON_HAbs (4.5 * GUI_GRID_H) +#define IGUI_GRID_WEAPON_XDef ((safezoneX + safezoneW) - IGUI_GRID_WEAPON_WAbs - 4.3 * GUI_GRID_W) +#define IGUI_GRID_WEAPON_YDef (safezoneY + 0.5 * GUI_GRID_H) +#define IGUI_GRID_WEAPON_X (profilenamespace getvariable ["IGUI_GRID_WEAPON_X",IGUI_GRID_WEAPON_XDef]) +#define IGUI_GRID_WEAPON_Y (profilenamespace getvariable ["IGUI_GRID_WEAPON_Y",IGUI_GRID_WEAPON_YDef]) +#define IGUI_GRID_WEAPON_W GUI_GRID_W +#define IGUI_GRID_WEAPON_H GUI_GRID_H + +//--- IGUI Stance indicator +#define IGUI_GRID_STANCE_WAbs (3.7 * GUI_GRID_W) +#define IGUI_GRID_STANCE_HAbs (3.7 * GUI_GRID_H) +#define IGUI_GRID_STANCE_XDef ((safezoneX + safezoneW) - IGUI_GRID_STANCE_WAbs - 0.5 * GUI_GRID_W) +#define IGUI_GRID_STANCE_YDef (safezoneY + 0.5 * GUI_GRID_H) +#define IGUI_GRID_STANCE_X (profilenamespace getvariable ["IGUI_GRID_STANCE_X",IGUI_GRID_STANCE_XDef]) +#define IGUI_GRID_STANCE_Y (profilenamespace getvariable ["IGUI_GRID_STANCE_Y",IGUI_GRID_STANCE_YDef]) +#define IGUI_GRID_STANCE_W GUI_GRID_W +#define IGUI_GRID_STANCE_H GUI_GRID_H + +//--- IGUI Stamina Bar +#define IGUI_GRID_STAMINA_WAbs (10 * GUI_GRID_W) +#define IGUI_GRID_STAMINA_HAbs (1 * GUI_GRID_H) +#define IGUI_GRID_STAMINA_XDef IGUI_GRID_WEAPON_XDef +#define IGUI_GRID_STAMINA_YDef (safezoneY + 4.05 * GUI_GRID_H) +#define IGUI_GRID_STAMINA_X (profilenamespace getvariable ["IGUI_GRID_STAMINA_X",IGUI_GRID_STAMINA_XDef]) +#define IGUI_GRID_STAMINA_Y (profilenamespace getvariable ["IGUI_GRID_STAMINA_Y",IGUI_GRID_STAMINA_YDef]) +#define IGUI_GRID_STAMINA_W GUI_GRID_W +#define IGUI_GRID_STAMINA_H GUI_GRID_H + +//--- IGUI Notification +#define IGUI_GRID_NOTIFICATION_WAbs (12 * GUI_GRID_W) +#define IGUI_GRID_NOTIFICATION_HAbs (6 * GUI_GRID_H) +#define IGUI_GRID_NOTIFICATION_XDef (0.5 - 6 * GUI_GRID_W) +#define IGUI_GRID_NOTIFICATION_YDef (safezoneY + 6.5 * GUI_GRID_H) +#define IGUI_GRID_NOTIFICATION_X (profilenamespace getvariable ["IGUI_GRID_NOTIFICATION_X",IGUI_GRID_NOTIFICATION_XDef]) +#define IGUI_GRID_NOTIFICATION_Y (profilenamespace getvariable ["IGUI_GRID_NOTIFICATION_Y",IGUI_GRID_NOTIFICATION_YDef]) +#define IGUI_GRID_NOTIFICATION_W GUI_GRID_W +#define IGUI_GRID_NOTIFICATION_H GUI_GRID_H + +//--- IGUI Action / Command Menu +#define IGUI_GRID_MENU_WAbs (4.5 * GUI_GRID_W) +#define IGUI_GRID_MENU_HAbs (13.5 * IGUI_TEXT_SIZE_MEDIUM) +#define IGUI_GRID_MENU_XDef (1.5 * GUI_GRID_W + safezoneX) +#define IGUI_GRID_MENU_YDef (5 * GUI_GRID_H + safezoneY) +#define IGUI_GRID_MENU_X (profilenamespace getvariable ["IGUI_GRID_MENU_X",IGUI_GRID_MENU_XDef]) +#define IGUI_GRID_MENU_Y (profilenamespace getvariable ["IGUI_GRID_MENU_Y",IGUI_GRID_MENU_YDef]) +#define IGUI_GRID_MENU_W GUI_GRID_W +#define IGUI_GRID_MENU_H GUI_GRID_H + +//--- IGUI Communication menu icons +#define IGUI_GRID_COMM_WAbs (1.5 * GUI_GRID_W) +#define IGUI_GRID_COMM_HAbs (15 * GUI_GRID_H) +#define IGUI_GRID_COMM_XDef (0 * GUI_GRID_W + safezoneX) +#define IGUI_GRID_COMM_YDef (5 * GUI_GRID_H + safezoneY) +#define IGUI_GRID_COMM_X (profilenamespace getvariable ["IGUI_GRID_COMM_X",IGUI_GRID_COMM_XDef]) +#define IGUI_GRID_COMM_Y (profilenamespace getvariable ["IGUI_GRID_COMM_Y",IGUI_GRID_COMM_YDef]) +#define IGUI_GRID_COMM_W GUI_GRID_W +#define IGUI_GRID_COMM_H GUI_GRID_H + +//--- IGUI Hint +#define IGUI_GRID_HINT_WAbs (12 * GUI_GRID_W) +#define IGUI_GRID_HINT_HAbs (8 * GUI_GRID_H) +#define IGUI_GRID_HINT_XDef ((safezoneX + safezoneW) - IGUI_GRID_HINT_WAbs - 1 * GUI_GRID_W) +#define IGUI_GRID_HINT_YDef (safezoneY + 6 * GUI_GRID_H) +#define IGUI_GRID_HINT_X (profilenamespace getvariable ["IGUI_GRID_HINT_X",IGUI_GRID_HINT_XDef]) +#define IGUI_GRID_HINT_Y (profilenamespace getvariable ["IGUI_GRID_HINT_Y",IGUI_GRID_HINT_YDef]) +#define IGUI_GRID_HINT_W GUI_GRID_W +#define IGUI_GRID_HINT_H GUI_GRID_H + +//--- IGUI GPS +#define IGUI_GRID_GPS_XDef (safezoneX + safezoneW - 11 * GUI_GRID_W) +#define IGUI_GRID_GPS_YDef (safezoneY + safezoneH - 20.5 * GUI_GRID_H) +#define IGUI_GRID_GPS_WDef (10 * GUI_GRID_W) +#define IGUI_GRID_GPS_HDef (10 * GUI_GRID_H) +#define IGUI_GRID_GPS_X (profilenamespace getvariable ['IGUI_GRID_GPS_X',IGUI_GRID_GPS_XDef]) +#define IGUI_GRID_GPS_Y (profilenamespace getvariable ['IGUI_GRID_GPS_Y',IGUI_GRID_GPS_YDef]) +#define IGUI_GRID_GPS_WAbs (profilenamespace getvariable ['IGUI_GRID_GPS_W',IGUI_GRID_GPS_WDef]) +#define IGUI_GRID_GPS_HAbs (profilenamespace getvariable ['IGUI_GRID_GPS_H',IGUI_GRID_GPS_HDef]) + +//--- IGUI AV Camera +#define IGUI_GRID_AVCAMERA_XDef (safezoneX + safezoneW - 11.6 * GUI_GRID_W) +#define IGUI_GRID_AVCAMERA_YDef (safezoneY + safezoneH - 17.2 * GUI_GRID_H) +#define IGUI_GRID_AVCAMERA_WDef (10.6 * GUI_GRID_W) +#define IGUI_GRID_AVCAMERA_HDef (6.7 * GUI_GRID_H) +#define IGUI_GRID_AVCAMERA_X (profilenamespace getvariable ['IGUI_GRID_AVCAMERA_X',IGUI_GRID_AVCAMERA_XDef]) +#define IGUI_GRID_AVCAMERA_Y (profilenamespace getvariable ['IGUI_GRID_AVCAMERA_Y',IGUI_GRID_AVCAMERA_YDef]) +#define IGUI_GRID_AVCAMERA_WAbs (profilenamespace getvariable ['IGUI_GRID_AVCAMERA_W',IGUI_GRID_AVCAMERA_WDef]) +#define IGUI_GRID_AVCAMERA_HAbs (profilenamespace getvariable ['IGUI_GRID_AVCAMERA_H',IGUI_GRID_AVCAMERA_HDef]) + +//--- IGUI IGUI Chat Log +#define IGUI_GRID_CHAT_XDef (safezoneX + 1 * GUI_GRID_W) +#define IGUI_GRID_CHAT_YDef (safezoneY + safezoneH - 10.5 * GUI_GRID_H) +#define IGUI_GRID_CHAT_WDef (20 * GUI_GRID_W) +#define IGUI_GRID_CHAT_HDef (5 * GUI_GRID_H) +#define IGUI_GRID_CHAT_X (profilenamespace getvariable ["IGUI_GRID_CHAT_X",IGUI_GRID_CHAT_XDef]) +#define IGUI_GRID_CHAT_Y (profilenamespace getvariable ["IGUI_GRID_CHAT_Y",IGUI_GRID_CHAT_YDef]) +#define IGUI_GRID_CHAT_WAbs (profilenamespace getvariable ["IGUI_GRID_CHAT_W",IGUI_GRID_CHAT_WDef]) +#define IGUI_GRID_CHAT_HAbs (profilenamespace getvariable ["IGUI_GRID_CHAT_H",IGUI_GRID_CHAT_HDef]) + +//--- IGUI Command Bar +#define IGUI_GRID_BAR_WAbs (36 * GUI_GRID_W) +#define IGUI_GRID_BAR_HAbs (4 * GUI_GRID_H) +#define IGUI_GRID_BAR_XDef (safezoneX + 1 * GUI_GRID_W) +#define IGUI_GRID_BAR_YDef (safezoneY + safezoneH - 4.5 * GUI_GRID_H) +#define IGUI_GRID_BAR_X (profilenamespace getvariable ["IGUI_GRID_BAR_X",IGUI_GRID_BAR_XDef]) +#define IGUI_GRID_BAR_Y (profilenamespace getvariable ["IGUI_GRID_BAR_Y",IGUI_GRID_BAR_YDef]) +#define IGUI_GRID_BAR_W GUI_GRID_W +#define IGUI_GRID_BAR_H GUI_GRID_H + +//--- IGUI MP Progress +#define IGUI_GRID_MP_WAbs (2.5 * GUI_GRID_W) +#define IGUI_GRID_MP_HAbs (15 * GUI_GRID_H) +#define IGUI_GRID_MP_XDef (safezoneX + safezoneW - 2 * GUI_GRID_W) +#define IGUI_GRID_MP_YDef (5 * GUI_GRID_H + safezoneY) +#define IGUI_GRID_MP_X (profilenamespace getvariable ["IGUI_GRID_MP_X",IGUI_GRID_MP_XDef]) +#define IGUI_GRID_MP_Y (profilenamespace getvariable ["IGUI_GRID_MP_Y",IGUI_GRID_MP_YDef]) +#define IGUI_GRID_MP_W GUI_GRID_W +#define IGUI_GRID_MP_H GUI_GRID_H + +//--- IGUI Custom Mission Display +#define IGUI_GRID_MISSION_WAbs (20 * GUI_GRID_W) +#define IGUI_GRID_MISSION_HAbs (5 * GUI_GRID_H) +#define IGUI_GRID_MISSION_XDef (safezoneX + safezoneW - 21 * GUI_GRID_W) +#define IGUI_GRID_MISSION_YDef (safezoneY + safezoneH - 10.5 * GUI_GRID_H) +#define IGUI_GRID_MISSION_X (profilenamespace getvariable ["IGUI_GRID_MISSION_X",IGUI_GRID_MISSION_XDef]) +#define IGUI_GRID_MISSION_Y (profilenamespace getvariable ["IGUI_GRID_MISSION_Y",IGUI_GRID_MISSION_YDef]) +#define IGUI_GRID_MISSION_W GUI_GRID_W +#define IGUI_GRID_MISSION_H GUI_GRID_H + + +/////////////////////////////////////////////////////////////////////////// +/// Old +/////////////////////////////////////////////////////////////////////////// + +//--- Old grid, that is used for old A3 and TKOH displays +#define GUI_GRID_OLD_WAbs ((safezoneW / safezoneH) min 1.2) +#define GUI_GRID_OLD_HAbs (GUI_GRID_OLD_WAbs / 1.2) +#define GUI_GRID_OLD_W (GUI_GRID_OLD_WAbs / 32) +#define GUI_GRID_OLD_H (GUI_GRID_OLD_HAbs / 20) +#define GUI_GRID_OLD_X (safezoneX) +#define GUI_GRID_OLD_Y (safezoneY + safezoneH - GUI_GRID_OLD_HAbs) + +//--- Centered +//#define GUI_GRID_OLD_X (safezoneX + (safezoneW - GUI_GRID_OLD_CENTER_WAbs)/2) +//--- Dark magic +//#define GUI_GRID_OLD_X (profilenamespace getvariable ['GUI_GRID_OLD_X',(safezoneX + (safezoneW - GUI_GRID_OLD_CENTER_WAbs)/2)]) +//#define GUI_GRID_OLD_Y (profilenamespace getvariable ['GUI_GRID_OLD_Y',(safezoneY + safezoneH - GUI_GRID_OLD_HAbs)]) + +//MUF-TEST: Anchor near the right edge of the screen - when changing Interface size, this point doesn't change its X position +#define GUI_ANCHOR_RIGHT (0.983 * safezoneW + safezoneX) +#define GUI_ANCHOR_LEFT 0 + +//--- Screen Center +#define GUI_GRID_OLD_CENTER_WAbs GUI_GRID_OLD_WAbs +#define GUI_GRID_OLD_CENTER_HAbs GUI_GRID_OLD_HAbs +#define GUI_GRID_OLD_CENTER_W GUI_GRID_OLD_W +#define GUI_GRID_OLD_CENTER_H GUI_GRID_OLD_H +#define GUI_GRID_OLD_CENTER_X (safezoneX + (safezoneW - GUI_GRID_OLD_CENTER_WAbs)/2) +#define GUI_GRID_OLD_CENTER_Y (safezoneY + (safezoneH - GUI_GRID_OLD_CENTER_HAbs)/2) + +//--- 2D Editor +#define GUI_GRID_OLD_EDITOR_WAbs GUI_GRID_OLD_CENTER_WAbs +#define GUI_GRID_OLD_EDITOR_HAbs GUI_GRID_OLD_CENTER_HAbs +#define GUI_GRID_OLD_EDITOR_W GUI_GRID_OLD_CENTER_W +#define GUI_GRID_OLD_EDITOR_H GUI_GRID_OLD_CENTER_H +#define GUI_GRID_OLD_EDITOR_X GUI_GRID_OLD_CENTER_X +#define GUI_GRID_OLD_EDITOR_Y (safezoneY) + +//--- Debug console (center down) +#define GUI_GRID_OLD_DEBUG_WAbs GUI_GRID_OLD_WAbs +#define GUI_GRID_OLD_DEBUG_HAbs GUI_GRID_OLD_HAbs +#define GUI_GRID_OLD_DEBUG_W GUI_GRID_OLD_W +#define GUI_GRID_OLD_DEBUG_H GUI_GRID_OLD_H +#define GUI_GRID_OLD_DEBUG_X (safezoneX + (safezoneW - GUI_GRID_OLD_DEBUG_WAbs)/2) +#define GUI_GRID_OLD_DEBUG_Y (safezoneY + safezoneH - GUI_GRID_OLD_DEBUG_HAbs) + +//--- IGUI Common +#define IGUI_GRID_OLD_WAbs GUI_GRID_OLD_WAbs +#define IGUI_GRID_OLD_HAbs GUI_GRID_OLD_HAbs +#define IGUI_GRID_OLD_W GUI_GRID_OLD_W +#define IGUI_GRID_OLD_H GUI_GRID_OLD_H +#define IGUI_GRID_OLD_X (safezoneX + (safezoneW - IGUI_GRID_OLD_WAbs) / 2) +#define IGUI_GRID_OLD_Y (safezoneY + safezoneH - IGUI_GRID_OLD_HAbs) + +//--- IGUI Bottom +#define IGUI_GRID_OLD_BOTTOM_WAbs IGUI_GRID_OLD_WAbs +#define IGUI_GRID_OLD_BOTTOM_HAbs IGUI_GRID_OLD_HAbs +#define IGUI_GRID_OLD_BOTTOM_W IGUI_GRID_OLD_W +#define IGUI_GRID_OLD_BOTTOM_H IGUI_GRID_OLD_H +#define IGUI_GRID_OLD_BOTTOM_X (safezoneX + (safezoneW - IGUI_GRID_OLD_BOTTOM_WAbs) / 2) +#define IGUI_GRID_OLD_BOTTOM_Y (safezoneY + safezoneH - IGUI_GRID_OLD_BOTTOM_HAbs) + +//--- IGUI Analogue Gauges ----------------------------------------------------------------------------------------------------- +//--- Analogue gauge - Speed +#define IGUI_GRID_GAUGESPEED_XDef (safezoneX + (safezoneW / 2) - 19.75 * GUI_GRID_W) +#define IGUI_GRID_GAUGESPEED_YDef (safezoneY + safezoneH - 11.7 * GUI_GRID_H) +#define IGUI_GRID_GAUGESPEED_X (profilenamespace getvariable ['IGUI_GRID_GAUGESPEED_X',IGUI_GRID_GAUGESPEED_XDef]) +#define IGUI_GRID_GAUGESPEED_Y (profilenamespace getvariable ['IGUI_GRID_GAUGESPEED_Y',IGUI_GRID_GAUGESPEED_YDef]) +#define IGUI_GRID_GAUGESPEED_WAbs (7.5 * GUI_GRID_W) +#define IGUI_GRID_GAUGESPEED_HAbs (7.5 * GUI_GRID_H) + +//--- Analogue gauge - Alt +#define IGUI_GRID_GAUGEALT_XDef (safezoneX + (safezoneW / 2) - 11.75 * GUI_GRID_W) +#define IGUI_GRID_GAUGEALT_YDef (safezoneY + safezoneH - 11.7 * GUI_GRID_H) +#define IGUI_GRID_GAUGEALT_X (profilenamespace getvariable ['IGUI_GRID_GAUGEALT_X',IGUI_GRID_GAUGEALT_XDef]) +#define IGUI_GRID_GAUGEALT_Y (profilenamespace getvariable ['IGUI_GRID_GAUGEALT_Y',IGUI_GRID_GAUGEALT_YDef]) +#define IGUI_GRID_GAUGEALT_WAbs (7.5 * GUI_GRID_W) +#define IGUI_GRID_GAUGEALT_HAbs (7.5 * GUI_GRID_H) + +//--- Analogue gauge - Horizon +#define IGUI_GRID_GAUGEHORIZON_XDef (safezoneX + ((safezoneW - 7.5 * GUI_GRID_W) / 2)) +#define IGUI_GRID_GAUGEHORIZON_YDef (safezoneY + safezoneH - 11.7 * GUI_GRID_H) +#define IGUI_GRID_GAUGEHORIZON_X (profilenamespace getvariable ['IGUI_GRID_GAUGEHORIZON_X',IGUI_GRID_GAUGEHORIZON_XDef]) +#define IGUI_GRID_GAUGEHORIZON_Y (profilenamespace getvariable ['IGUI_GRID_GAUGEHORIZON_Y',IGUI_GRID_GAUGEHORIZON_YDef]) +#define IGUI_GRID_GAUGEHORIZON_WAbs (7.5 * GUI_GRID_W) +#define IGUI_GRID_GAUGEHORIZON_HAbs (7.5 * GUI_GRID_H) + +//--- Analogue gauge - Stability +#define IGUI_GRID_GAUGESTABILITY_XDef (safezoneX + (safezoneW / 2) + 4.25 * GUI_GRID_W) +#define IGUI_GRID_GAUGESTABILITY_YDef (safezoneY + safezoneH - 11.7 * GUI_GRID_H) +#define IGUI_GRID_GAUGESTABILITY_X (profilenamespace getvariable ['IGUI_GRID_GAUGESTABILITY_X',IGUI_GRID_GAUGESTABILITY_XDef]) +#define IGUI_GRID_GAUGESTABILITY_Y (profilenamespace getvariable ['IGUI_GRID_GAUGESTABILITY_Y',IGUI_GRID_GAUGESTABILITY_YDef]) +#define IGUI_GRID_GAUGESTABILITY_WAbs (7.5 * GUI_GRID_W) +#define IGUI_GRID_GAUGESTABILITY_HAbs (7.5 * GUI_GRID_H) + +//--- Analogue gauge - Compass +#define IGUI_GRID_GAUGECOMPASS_XDef (safezoneX + (safezoneW / 2) + 12.25 * GUI_GRID_W) +#define IGUI_GRID_GAUGECOMPASS_YDef (safezoneY + safezoneH - 11.7 * GUI_GRID_H) +#define IGUI_GRID_GAUGECOMPASS_X (profilenamespace getvariable ['IGUI_GRID_GAUGECOMPASS_X',IGUI_GRID_GAUGECOMPASS_XDef]) +#define IGUI_GRID_GAUGECOMPASS_Y (profilenamespace getvariable ['IGUI_GRID_GAUGECOMPASS_Y',IGUI_GRID_GAUGECOMPASS_YDef]) +#define IGUI_GRID_GAUGECOMPASS_WAbs (7.5 * GUI_GRID_W) +#define IGUI_GRID_GAUGECOMPASS_HAbs (7.5 * GUI_GRID_H) + +//--- Analogue gauge - Damage indicators +// #define IGUI_GRID_GAUGEDAMAGE_XDef (safezoneX + (safezoneW / 2) - 19 * GUI_GRID_W) +// #define IGUI_GRID_GAUGEDAMAGE_YDef (safezoneY + safezoneH - 7 * GUI_GRID_H) +// #define IGUI_GRID_GAUGEDAMAGE_X (profilenamespace getvariable ['IGUI_GRID_GAUGEDAMAGE_X',IGUI_GRID_GAUGEDAMAGE_XDef]) +// #define IGUI_GRID_GAUGEDAMAGE_Y (profilenamespace getvariable ['IGUI_GRID_GAUGEDAMAGE_Y',IGUI_GRID_GAUGEDAMAGE_YDef]) +// #define IGUI_GRID_GAUGEDAMAGE_WAbs (9.6 * GUI_GRID_W) +// #define IGUI_GRID_GAUGEDAMAGE_HAbs (2.4 * GUI_GRID_H) +//--- IGUI Analogue Gauges ----------------------------------------------------------------------------------------------------- + +//--- Sling Load Assistant +#define IGUI_GRID_SLINGLOADASSISTANT_XDef (safezoneX + safezoneW - 8 * GUI_GRID_W) +#define IGUI_GRID_SLINGLOADASSISTANT_YDef (safezoneY + safezoneH - 19.5 * GUI_GRID_H) +#define IGUI_GRID_SLINGLOADASSISTANT_WDef (7 * GUI_GRID_W) +#define IGUI_GRID_SLINGLOADASSISTANT_HDef (9.5 * GUI_GRID_H) +#define IGUI_GRID_SLINGLOADASSISTANT_X (profilenamespace getvariable ['IGUI_GRID_SLINGLOADASSISTANT_X',IGUI_GRID_SLINGLOADASSISTANT_XDef]) +#define IGUI_GRID_SLINGLOADASSISTANT_Y (profilenamespace getvariable ['IGUI_GRID_SLINGLOADASSISTANT_Y',IGUI_GRID_SLINGLOADASSISTANT_YDef]) +#define IGUI_GRID_SLINGLOADASSISTANT_WAbs (profilenamespace getvariable ['IGUI_GRID_SLINGLOADASSISTANT_W',IGUI_GRID_SLINGLOADASSISTANT_WDef]) +#define IGUI_GRID_SLINGLOADASSISTANT_HAbs (profilenamespace getvariable ['IGUI_GRID_SLINGLOADASSISTANT_H',IGUI_GRID_SLINGLOADASSISTANT_HDef]) + +//--- Squad Radar +// #define IGUI_GRID_SQUADRADAR_XDef (safezoneX + (safezoneW / 2) - 3 * GUI_GRID_W) +// #define IGUI_GRID_SQUADRADAR_YDef (safezoneY + safezoneH - 10.9 * GUI_GRID_H) +// #define IGUI_GRID_SQUADRADAR_X (profilenamespace getvariable ['IGUI_GRID_SQUADRADAR_X',IGUI_GRID_SQUADRADAR_XDef]) +// #define IGUI_GRID_SQUADRADAR_Y (profilenamespace getvariable ['IGUI_GRID_SQUADRADAR_Y',IGUI_GRID_SQUADRADAR_YDef]) +// #define IGUI_GRID_SQUADRADAR_WAbs (19 * GUI_GRID_W) +// #define IGUI_GRID_SQUADRADAR_HAbs (6 * GUI_GRID_H) + +//--- IGUI Action / Command Menu +#define IGUI_GRID_OLD_MENU_WAbs (4.5 * IGUI_GRID_OLD_W) +#define IGUI_GRID_OLD_MENU_HAbs (10 * (IGUI_TEXT_SIZE_MEDIUM * 1.3)) +#define IGUI_GRID_OLD_MENU_XDef (1 * IGUI_GRID_OLD_W + safezoneX) +#define IGUI_GRID_OLD_MENU_YDef (5 * IGUI_GRID_OLD_H + safezoneY) +#define IGUI_GRID_OLD_MENU_X (profilenamespace getvariable ["IGUI_GRID_OLD_MENU_X",IGUI_GRID_OLD_MENU_XDef]) +#define IGUI_GRID_OLD_MENU_Y (profilenamespace getvariable ["IGUI_GRID_OLD_MENU_Y",IGUI_GRID_OLD_MENU_YDef]) +#define IGUI_GRID_OLD_MENU_W IGUI_GRID_OLD_W +#define IGUI_GRID_OLD_MENU_H IGUI_GRID_OLD_H + +//--- E3 +/* +#define IGUI_GRID_OLD_MENU_WAbs (4.5 * IGUI_GRID_OLD_W) +#define IGUI_GRID_OLD_MENU_HAbs (10 * (IGUI_TEXT_SIZE_MEDIUM * 1.3)) +#define IGUI_GRID_OLD_MENU_XDef (0.6) +#define IGUI_GRID_OLD_MENU_YDef (0.55) +#define IGUI_GRID_OLD_MENU_X (profilenamespace getvariable ["IGUI_GRID_OLD_MENU_X",IGUI_GRID_OLD_MENU_XDef]) +#define IGUI_GRID_OLD_MENU_Y (profilenamespace getvariable ["IGUI_GRID_OLD_MENU_Y",IGUI_GRID_OLD_MENU_YDef]) +#define IGUI_GRID_OLD_MENU_W IGUI_GRID_OLD_W +#define IGUI_GRID_OLD_MENU_H IGUI_GRID_OLD_H +*/ + +//--- IGUI Task +#define IGUI_GRID_OLD_TASK_WAbs (12 * IGUI_GRID_OLD_W) +#define IGUI_GRID_OLD_TASK_HAbs (2 * IGUI_GRID_OLD_H) +#define IGUI_GRID_OLD_TASK_XDef (10 * IGUI_GRID_OLD_W + IGUI_GRID_OLD_X) +#define IGUI_GRID_OLD_TASK_YDef (1 * IGUI_GRID_OLD_H + safezoneY) +#define IGUI_GRID_OLD_TASK_X IGUI_GRID_OLD_TASK_XDef +#define IGUI_GRID_OLD_TASK_Y IGUI_GRID_OLD_TASK_YDef +#define IGUI_GRID_OLD_TASK_W IGUI_GRID_OLD_W +#define IGUI_GRID_OLD_TASK_H IGUI_GRID_OLD_H + +//--- IGUI PIP +#define IGUI_GRID_OLD_PIP_XDef (safezoneX + safezoneW - 6.8 * IGUI_GRID_OLD_W) +#define IGUI_GRID_OLD_PIP_YDef (7 * IGUI_GRID_OLD_H + IGUI_GRID_OLD_Y) +#define IGUI_GRID_OLD_PIP_WDef (6 * IGUI_GRID_OLD_W) +#define IGUI_GRID_OLD_PIP_HDef (IGUI_GRID_OLD_PIP_WDef) +//#define IGUI_GRID_OLD_PIP_X (profilenamespace getvariable ['IGUI_GRID_OLD_PIP_X',IGUI_GRID_OLD_PIP_XDef]) +//#define IGUI_GRID_OLD_PIP_Y (profilenamespace getvariable ['IGUI_GRID_OLD_PIP_Y',IGUI_GRID_OLD_PIP_YDef]) +//#define IGUI_GRID_OLD_PIP_WAbs (profilenamespace getvariable ['IGUI_GRID_OLD_PIP_W',IGUI_GRID_OLD_PIP_WDef]) +#define IGUI_GRID_OLD_PIP_X IGUI_GRID_OLD_PIP_XDef +#define IGUI_GRID_OLD_PIP_Y IGUI_GRID_OLD_PIP_YDef +#define IGUI_GRID_OLD_PIP_WAbs IGUI_GRID_OLD_PIP_WDef +#define IGUI_GRID_OLD_PIP_HAbs (IGUI_GRID_OLD_PIP_WAbs) + + +//--- MUF - experimental optics grid +// #define GUI_GRID_OLD_OPTICS_X (SafezoneX + ((SafezoneW - SafezoneH) / 2)) +// #define GUI_GRID_OLD_OPTICS_Y (SafezoneY) +// #define GUI_GRID_OLD_OPTICS_W (0.01875) +// #define GUI_GRID_OLD_OPTICS_H (0.025) +// #define GUI_GRID_OLD_OPTICS_WAbs ((SafezoneX + ((SafezoneW - SafezoneH) / 2)) / 0.01875) +// #define GUI_GRID_OLD_OPTICS_HAbs (SafezoneH / 0.01875) + +#define GUI_GRID_OLD_OPTICS_X (SafezoneX + ((SafezoneW - SafezoneH) / 2)) +#define GUI_GRID_OLD_OPTICS_Y (SafezoneY) +#define GUI_GRID_OLD_OPTICS_W (0.01875 * SafezoneH) +#define GUI_GRID_OLD_OPTICS_H (0.025 * SafezoneH) +#define GUI_GRID_OLD_OPTICS_WAbs (SafezoneH) +#define GUI_GRID_OLD_OPTICS_HAbs (SafezoneH) + +//--- MUF - experimental AV Terminal grid +#define GUI_GRID_OLD_AV_TERMINAL_X (safezoneX) +#define GUI_GRID_OLD_AV_TERMINAL_Y (safezoneY) +#define GUI_GRID_OLD_AV_TERMINAL_W (safezoneW / 64) +#define GUI_GRID_OLD_AV_TERMINAL_H (safezoneH / 40) +#define GUI_GRID_OLD_AV_TERMINAL_WAbs (safezoneW) +#define GUI_GRID_OLD_AV_TERMINAL_HAbs (safezoneH) \ No newline at end of file diff --git a/include/a3/ui_f/hpp/defineDIKCodes.inc b/include/a3/ui_f/hpp/defineDIKCodes.inc new file mode 100644 index 00000000..fa0d9225 --- /dev/null +++ b/include/a3/ui_f/hpp/defineDIKCodes.inc @@ -0,0 +1,189 @@ +#ifndef DIK_ESCAPE + +/**************************************************************************** + * + * DirectInput keyboard scan codes + * + ****************************************************************************/ + +#define DIK_ESCAPE 0x01 +#define DIK_1 0x02 +#define DIK_2 0x03 +#define DIK_3 0x04 +#define DIK_4 0x05 +#define DIK_5 0x06 +#define DIK_6 0x07 +#define DIK_7 0x08 +#define DIK_8 0x09 +#define DIK_9 0x0A +#define DIK_0 0x0B +#define DIK_MINUS 0x0C /* - on main keyboard */ +#define DIK_EQUALS 0x0D +#define DIK_BACK 0x0E /* backspace */ +#define DIK_TAB 0x0F +#define DIK_Q 0x10 +#define DIK_W 0x11 +#define DIK_E 0x12 +#define DIK_R 0x13 +#define DIK_T 0x14 +#define DIK_Y 0x15 +#define DIK_U 0x16 +#define DIK_I 0x17 +#define DIK_O 0x18 +#define DIK_P 0x19 +#define DIK_LBRACKET 0x1A +#define DIK_RBRACKET 0x1B +#define DIK_RETURN 0x1C /* Enter on main keyboard */ +#define DIK_LCONTROL 0x1D +#define DIK_A 0x1E +#define DIK_S 0x1F +#define DIK_D 0x20 +#define DIK_F 0x21 +#define DIK_G 0x22 +#define DIK_H 0x23 +#define DIK_J 0x24 +#define DIK_K 0x25 +#define DIK_L 0x26 +#define DIK_SEMICOLON 0x27 +#define DIK_APOSTROPHE 0x28 +#define DIK_GRAVE 0x29 /* accent grave */ +#define DIK_LSHIFT 0x2A +#define DIK_BACKSLASH 0x2B +#define DIK_Z 0x2C +#define DIK_X 0x2D +#define DIK_C 0x2E +#define DIK_V 0x2F +#define DIK_B 0x30 +#define DIK_N 0x31 +#define DIK_M 0x32 +#define DIK_COMMA 0x33 +#define DIK_PERIOD 0x34 /* . on main keyboard */ +#define DIK_SLASH 0x35 /* / on main keyboard */ +#define DIK_RSHIFT 0x36 +#define DIK_MULTIPLY 0x37 /* * on numeric keypad */ +#define DIK_LMENU 0x38 /* left Alt */ +#define DIK_SPACE 0x39 +#define DIK_CAPITAL 0x3A +#define DIK_F1 0x3B +#define DIK_F2 0x3C +#define DIK_F3 0x3D +#define DIK_F4 0x3E +#define DIK_F5 0x3F +#define DIK_F6 0x40 +#define DIK_F7 0x41 +#define DIK_F8 0x42 +#define DIK_F9 0x43 +#define DIK_F10 0x44 +#define DIK_NUMLOCK 0x45 +#define DIK_SCROLL 0x46 /* Scroll Lock */ +#define DIK_NUMPAD7 0x47 +#define DIK_NUMPAD8 0x48 +#define DIK_NUMPAD9 0x49 +#define DIK_SUBTRACT 0x4A /* - on numeric keypad */ +#define DIK_NUMPAD4 0x4B +#define DIK_NUMPAD5 0x4C +#define DIK_NUMPAD6 0x4D +#define DIK_ADD 0x4E /* + on numeric keypad */ +#define DIK_NUMPAD1 0x4F +#define DIK_NUMPAD2 0x50 +#define DIK_NUMPAD3 0x51 +#define DIK_NUMPAD0 0x52 +#define DIK_DECIMAL 0x53 /* . on numeric keypad */ +#define DIK_OEM_102 0x56 /* < > | on UK/Germany keyboards */ +#define DIK_F11 0x57 +#define DIK_F12 0x58 + +#define DIK_F13 0x64 /* (NEC PC98) */ +#define DIK_F14 0x65 /* (NEC PC98) */ +#define DIK_F15 0x66 /* (NEC PC98) */ + +#define DIK_KANA 0x70 /* (Japanese keyboard) */ +#define DIK_ABNT_C1 0x73 /* / ? on Portugese (Brazilian) keyboards */ +#define DIK_CONVERT 0x79 /* (Japanese keyboard) */ +#define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */ +#define DIK_YEN 0x7D /* (Japanese keyboard) */ +#define DIK_ABNT_C2 0x7E /* Numpad . on Portugese (Brazilian) keyboards */ +#define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */ +#define DIK_PREVTRACK 0x90 /* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */ +#define DIK_AT 0x91 /* (NEC PC98) */ +#define DIK_COLON 0x92 /* (NEC PC98) */ +#define DIK_UNDERLINE 0x93 /* (NEC PC98) */ +#define DIK_KANJI 0x94 /* (Japanese keyboard) */ +#define DIK_STOP 0x95 /* (NEC PC98) */ +#define DIK_AX 0x96 /* (Japan AX) */ +#define DIK_UNLABELED 0x97 /* (J3100) */ +#define DIK_NEXTTRACK 0x99 /* Next Track */ +#define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */ +#define DIK_RCONTROL 0x9D +#define DIK_MUTE 0xA0 /* Mute */ +#define DIK_CALCULATOR 0xA1 /* Calculator */ +#define DIK_PLAYPAUSE 0xA2 /* Play / Pause */ +#define DIK_MEDIASTOP 0xA4 /* Media Stop */ +#define DIK_VOLUMEDOWN 0xAE /* Volume - */ +#define DIK_VOLUMEUP 0xB0 /* Volume + */ +#define DIK_WEBHOME 0xB2 /* Web home */ +#define DIK_NUMPADCOMMA 0xB3 /* , on numeric keypad (NEC PC98) */ +#define DIK_DIVIDE 0xB5 /* / on numeric keypad */ +#define DIK_SYSRQ 0xB7 +#define DIK_RMENU 0xB8 /* right Alt */ +#define DIK_PAUSE 0xC5 /* Pause */ +#define DIK_HOME 0xC7 /* Home on arrow keypad */ +#define DIK_UP 0xC8 /* UpArrow on arrow keypad */ +#define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */ +#define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */ +#define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */ +#define DIK_END 0xCF /* End on arrow keypad */ +#define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */ +#define DIK_NEXT 0xD1 /* PgDn on arrow keypad */ +#define DIK_INSERT 0xD2 /* Insert on arrow keypad */ +#define DIK_DELETE 0xD3 /* Delete on arrow keypad */ +#define DIK_LWIN 0xDB /* Left Windows key */ +#define DIK_RWIN 0xDC /* Right Windows key */ +#define DIK_APPS 0xDD /* AppMenu key */ +#define DIK_POWER 0xDE /* System Power */ +#define DIK_SLEEP 0xDF /* System Sleep */ +#define DIK_WAKE 0xE3 /* System Wake */ +#define DIK_WEBSEARCH 0xE5 /* Web Search */ +#define DIK_WEBFAVORITES 0xE6 /* Web Favorites */ +#define DIK_WEBREFRESH 0xE7 /* Web Refresh */ +#define DIK_WEBSTOP 0xE8 /* Web Stop */ +#define DIK_WEBFORWARD 0xE9 /* Web Forward */ +#define DIK_WEBBACK 0xEA /* Web Back */ +#define DIK_MYCOMPUTER 0xEB /* My Computer */ +#define DIK_MAIL 0xEC /* Mail */ +#define DIK_MEDIASELECT 0xED /* Media Select */ + +/* + * Alternate names for keys, to facilitate transition from DOS. + */ +#define DIK_BACKSPACE DIK_BACK /* backspace */ +#define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */ +#define DIK_LALT DIK_LMENU /* left Alt */ +#define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */ +#define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */ +#define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */ +#define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */ +#define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */ +#define DIK_RALT DIK_RMENU /* right Alt */ +#define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */ +#define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */ +#define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */ +#define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */ +#define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */ +#define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */ + +/* + * Alternate names for keys originally not used on US keyboards. + */ +#define DIK_CIRCUMFLEX DIK_PREVTRACK /* Japanese keyboard */ + + +/* + * Combination keys + */ +#define INPUT_CTRL_OFFSET 512 +#define INPUT_SHIFT_OFFSET 1024 +#define INPUT_ALT_OFFSET 2048 + + +#endif diff --git a/include/a3/ui_f/hpp/defineResincl.inc b/include/a3/ui_f/hpp/defineResincl.inc new file mode 100644 index 00000000..0debf081 --- /dev/null +++ b/include/a3/ui_f/hpp/defineResincl.inc @@ -0,0 +1,3094 @@ +#ifndef _RESINCL_HPP +#define _RESINCL_HPP + +/*******************/ +/* Tactical menu */ +/*******************/ + +// Menu commands + // main menu +#define CMD_SEPARATOR -1 +#define CMD_NOTHING -2 +#define CMD_HIDE_MENU -3 +#define CMD_BACK -4 +// Custom menu command +#define CMD_EXECUTE -5 + +#ifdef _CONFIG +enum +{ +// note: this CMD should be if possible organized as is menu +// (items from the same menu together) +// this makes searching much easier + +//main menu level +CMD_GETIN, +CMD_GETOUT, +CMD_ACTION, + +// move submenu + +// other commands +CMD_ADVANCE, +CMD_STAY_BACK, +CMD_FLANK_LEFT, +CMD_FLANK_RIGHT, +CMD_NEXT_WAYPOINT, +CMD_HIDE, +CMD_JOIN, +CMD_STOP, +CMD_EXPECT, +CMD_MOVE, + + // formations +CMD_FORM_COLUMN, +CMD_FORM_STAGCOL, +CMD_FORM_WEDGE, +CMD_FORM_ECHLEFT, +CMD_FORM_ECHRIGHT, +CMD_FORM_VEE, +CMD_FORM_LINE, +CMD_FORM_DIAMOND, +CMD_FORM_FILE, + +// engage +CMD_ENGAGE, +CMD_LOOSE_FORM, +CMD_KEEP_FORM, + +CMD_HOLD_FIRE, +CMD_OPEN_FIRE, +CMD_FIRE, + +// status +CMD_WATCH, +CMD_WATCH_AROUND, +CMD_WATCH_AUTO, +CMD_WATCH_DIR, + +// combat modes +CMD_STEALTH, +CMD_COMBAT, +CMD_AWARE, +CMD_SAFE, + +// heal +CMD_HEALBLEEDING, +CMD_HEAL, +CMD_HEAL_SELF, +CMD_REPAIR_VEHICLE, +CMD_CARRY, +CMD_DROP_CARRIED, +CMD_PUTIN, +CMD_UNLOADFROM, + +// swiming and diving +CMD_KEEP_DEPTH_RELATIVE_UP, +CMD_KEEP_DEPTH_RELATIVE_DOWN, +CMD_KEEP_DEPTH_LEADER, +CMD_KEEP_DEPTH_UNDERSURFACE, +CMD_KEEP_DEPTH_ABOVESURFACE, +CMD_KEEP_DEPTH_BOTTOM, + +//suppress fire +CMD_SUPPRESS, + +CMD_POS_UP, +CMD_POS_MIDDLE, +CMD_POS_DOWN, +CMD_POS_AUTO, + // teams +CMD_TEAM_MAIN, +CMD_TEAM_RED, +CMD_TEAM_GREEN, +CMD_TEAM_BLUE, +CMD_TEAM_YELLOW, +CMD_ASSIGN_MAIN, +CMD_ASSIGN_RED, +CMD_ASSIGN_GREEN, +CMD_ASSIGN_BLUE, +CMD_ASSIGN_YELLOW, +CMD_TEAM_DISSOLVE, + +// radio +CMD_RADIO_ALPHA, +CMD_RADIO_BRAVO, +CMD_RADIO_CHARLIE, +CMD_RADIO_DELTA, +CMD_RADIO_ECHO, +CMD_RADIO_FOXTROT, +CMD_RADIO_GOLF, +CMD_RADIO_HOTEL, +CMD_RADIO_INDIA, +CMD_RADIO_JULIET, + +// reply commands + +CMD_REPLY_DONE, +CMD_REPLY_FAIL, +CMD_REPLY_COPY, +CMD_REPLY_REPEAT, +CMD_REPLY_WHERE_ARE_YOU, +CMD_REPORT, +CMD_REPLY_ENGAGING, +CMD_REPLY_UNDER_FIRE, +CMD_REPLY_HIT, +CMD_REPLY_ONE_LESS, +CMD_REPLY_FIREREADY, +CMD_REPLY_FIRENOTREADY, +CMD_REPLY_KILLED, +CMD_REPLY_AMMO_LOW, +CMD_REPLY_FUEL_LOW, +CMD_REPLY_INJURED, +CMD_REPLY_OUT_OF_FAKs, + +CMD_SUPPORT_MEDIC, +CMD_SUPPORT_AMBULANCE, +CMD_SUPPORT_REPAIR, +CMD_SUPPORT_REARM, +CMD_SUPPORT_REFUEL, +CMD_SUPPORT_DONE, + +CMD_RADIO_CUSTOM, +CMD_RADIO_CUSTOM_1, +CMD_RADIO_CUSTOM_2, +CMD_RADIO_CUSTOM_3, +CMD_RADIO_CUSTOM_4, +CMD_RADIO_CUSTOM_5, +CMD_RADIO_CUSTOM_6, +CMD_RADIO_CUSTOM_7, +CMD_RADIO_CUSTOM_8, +CMD_RADIO_CUSTOM_9, +CMD_RADIO_CUSTOM_0, + +CMD_UNIT_1, +CMD_UNIT_2, +CMD_UNIT_3, +CMD_UNIT_4, +CMD_UNIT_5, +CMD_UNIT_6, +CMD_UNIT_7, +CMD_UNIT_8, +CMD_UNIT_9, +CMD_UNIT_10, +CMD_UNIT_11, +CMD_UNIT_12, +CMD_UNITS_ALL, + +CMD_MY_VEHICLE, + +CMD_SELECT_MAIN, +CMD_SELECT_RED, +CMD_SELECT_GREEN, +CMD_SELECT_BLUE, +CMD_SELECT_YELLOW, + +CMD_VEHICLE_1, +CMD_VEHICLE_2, +CMD_VEHICLE_3, +CMD_VEHICLE_4, +CMD_VEHICLE_5, +CMD_VEHICLE_6, +CMD_VEHICLE_7, +CMD_VEHICLE_8, +CMD_VEHICLE_9, +CMD_VEHICLE_10, +CMD_VEHICLE_11, +CMD_VEHICLE_12, + +CMD_SINGLE_UNITS, + +CMD_MP_CHANNEL_GLOBAL, +CMD_MP_CHANNEL_SIDE, +CMD_MP_CHANNEL_COMMAND, +CMD_MP_CHANNEL_GROUP, +CMD_MP_CHANNEL_VEHICLE, + +CMD_CONVERSATION, + +// Context sensitive commands +CMD_MOVE_AUTO, +CMD_STOP_AUTO, +CMD_WATCH_CTX, +CMD_GETIN_AUTO, +CMD_REARM_AUTO, +CMD_ATTACK_AUTO, +CMD_FIRE_AT_POSITION_AUTO, +CMD_SELECT_AUTO, +CMD_SELECT_AUTO_ADD, +CMD_DESELECT_AUTO, +CMD_JOIN_AUTO, +CMD_OPEN_FIRE_AUTO, +CMD_HOLD_FIRE_AUTO, +CMD_COMPLEX_COMMAND, +CMD_DISABLE_MINE, + +CMD_SELECT_UNIT_FROM_BAR, +CMD_DESELECT_UNIT_FROM_BAR, +CMD_SELECT_VEHICLE_FROM_BAR, +CMD_DESELECT_VEHICLE_FROM_BAR, +CMD_SELECT_TEAM_FROM_BAR, +CMD_DESELECT_TEAM_FROM_BAR, + +CMD_JOIN_ALL, + +CMD_SWITCH_TO_LEADER, +CMD_SWITCH_TO_SELECTED, + +CMD_NOTARGET, + +CMD_HC_SELECT_AUTO, +CMD_HC_SELECT_AUTO_ADD, +CMD_HC_DESELECT_AUTO, +CMD_HC_SELECT_UNIT_FROM_BAR, +CMD_HC_DESELECT_UNIT_FROM_BAR, +CMD_HC_SELECT_TEAM_FROM_BAR, +CMD_HC_DESELECT_TEAM_FROM_BAR, +CMD_OPENPARACHUTE, +CMD_TAKE_BACKPACK, +CMD_ASSEMBLE_WEAPON, +CMD_DISASSEMBLE_WEAPON, +CMD_ENGAGE_AUTO, +CMD_FIRE_AUTO, +CMD_FIRE_AT_POSITION_AMMO // same as CMD_FIRE_AT_POSITION_AUTO but with custom magazine +}; + +/// In-game UI hiding animation type +enum HideType +{ + HTNone, // no animation + HTFade, // fade in / fade out + HTMoveLeft, // move from / to the left + HTMoveRight // move from / to the right +}; + +enum +{ + SPTPlain, + SPTPercents +}; + +#endif + + +/*******************/ +/* Controls */ +/*******************/ + +// Control types +#define CT_STATIC 0 +#define CT_BUTTON 1 +#define CT_EDIT 2 +#define CT_SLIDER 3 +#define CT_COMBO 4 +#define CT_LISTBOX 5 +#define CT_TOOLBOX 6 +#define CT_CHECKBOXES 7 +#define CT_PROGRESS 8 +#define CT_HTML 9 +#define CT_STATIC_SKEW 10 +#define CT_ACTIVETEXT 11 +#define CT_TREE 12 +#define CT_STRUCTURED_TEXT 13 +#define CT_CONTEXT_MENU 14 +#define CT_CONTROLS_GROUP 15 +#define CT_SHORTCUTBUTTON 16 +#define CT_HITZONES 17 +#define CT_XKEYDESC 40 +#define CT_XBUTTON 41 +#define CT_XLISTBOX 42 +#define CT_XSLIDER 43 +#define CT_XCOMBO 44 +#define CT_ANIMATED_TEXTURE 45 +#define CT_OBJECT 80 +#define CT_OBJECT_ZOOM 81 +#define CT_OBJECT_CONTAINER 82 +#define CT_OBJECT_CONT_ANIM 83 +#define CT_LINEBREAK 98 +#define CT_USER 99 +#define CT_MAP 100 +#define CT_MAP_MAIN 101 +#define CT_LISTNBOX 102 +#define CT_ITEMSLOT 103 +#define CT_CHECKBOX 77 + +// Static styles +#define ST_POS 0x0F +#define ST_HPOS 0x03 +#define ST_VPOS 0x0C +#define ST_LEFT 0x00 +#define ST_RIGHT 0x01 +#define ST_CENTER 0x02 +#define ST_DOWN 0x04 +#define ST_UP 0x08 +#define ST_VCENTER 0x0C + +#define ST_TYPE 0xF0 +#define ST_SINGLE 0x00 +#define ST_MULTI 0x10 +#define ST_TITLE_BAR 0x20 +#define ST_PICTURE 0x30 +#define ST_FRAME 0x40 +#define ST_BACKGROUND 0x50 +#define ST_GROUP_BOX 0x60 +#define ST_GROUP_BOX2 0x70 +#define ST_HUD_BACKGROUND 0x80 +#define ST_TILE_PICTURE 0x90 +#define ST_WITH_RECT 0xA0 +#define ST_LINE 0xB0 +#define ST_UPPERCASE 0xC0 +#define ST_LOWERCASE 0xD0 + +#define ST_SHADOW 0x100 +#define ST_NO_RECT 0x200 +#define ST_KEEP_ASPECT_RATIO 0x800 + +#define ST_TITLE ST_TITLE_BAR + ST_CENTER + +// Slider styles +#define SL_DIR 0x400 +#define SL_VERT 0 +#define SL_HORZ 0x400 + +#define SL_TEXTURES 0x10 + +// progress bar +#define ST_VERTICAL 0x01 +#define ST_HORIZONTAL 0 + +// Listbox styles +#define LB_TEXTURES 0x10 +#define LB_MULTI 0x20 + +// Tree styles +#define TR_SHOWROOT 1 +#define TR_AUTOCOLLAPSE 2 + +// MessageBox styles +#define MB_BUTTON_OK 1 +#define MB_BUTTON_CANCEL 2 +#define MB_BUTTON_USER 4 +#define MB_ERROR_DIALOG 8 + +// Xbox buttons +#define KEY_XINPUT 0x00050000 + +#define KEY_XBOX_A KEY_XINPUT + 0 +#define KEY_XBOX_B KEY_XINPUT + 1 +#define KEY_XBOX_X KEY_XINPUT + 2 +#define KEY_XBOX_Y KEY_XINPUT + 3 +#define KEY_XBOX_Up KEY_XINPUT + 4 +#define KEY_XBOX_Down KEY_XINPUT + 5 +#define KEY_XBOX_Left KEY_XINPUT + 6 +#define KEY_XBOX_Right KEY_XINPUT + 7 +#define KEY_XBOX_Start KEY_XINPUT + 8 +#define KEY_XBOX_Back KEY_XINPUT + 9 +#define KEY_XBOX_LeftBumper KEY_XINPUT + 10 +#define KEY_XBOX_RightBumper KEY_XINPUT + 11 +#define KEY_XBOX_LeftTrigger KEY_XINPUT + 12 +#define KEY_XBOX_RightTrigger KEY_XINPUT + 13 +#define KEY_XBOX_LeftThumb KEY_XINPUT + 14 +#define KEY_XBOX_RightThumb KEY_XINPUT + 15 +#define KEY_XBOX_LeftThumbXRight KEY_XINPUT + 16 +#define KEY_XBOX_LeftThumbYUp KEY_XINPUT + 17 +#define KEY_XBOX_RightThumbXRight KEY_XINPUT + 18 +#define KEY_XBOX_RightThumbYUp KEY_XINPUT + 19 +#define KEY_XBOX_LeftThumbXLeft KEY_XINPUT + 20 +#define KEY_XBOX_LeftThumbYDown KEY_XINPUT + 21 +#define KEY_XBOX_RightThumbXLeft KEY_XINPUT + 22 +#define KEY_XBOX_RightThumbYDown KEY_XINPUT + 23 + +// Predefined controls +#define IDC_OK 1 +#define IDC_CANCEL 2 +#define IDC_AUTOCANCEL 3 +#define IDC_ABORT 4 +#define IDC_RESTART 5 +#define IDC_USER_BUTTON 6 +#define IDC_EXIT_TO_MAIN 7 + +// my own control window for tests +#define IDC_MY_FIRST_LISTBOX 110 +#define IDC_MY_FIRST_BUTTON 111 +#define IDC_MY_FIRST_SLIDER 112 + +#define IDC_MAP 51 +#define IDC_WEATHER 52 +#define IDC_POSITION 53 +#define IDC_TIME 54 +#define IDC_DATE 55 +#define IDC_BRIEFING 56 +#define IDC_MAP_NOTES 57 +#define IDC_MAP_PLAN 58 +#define IDC_MAP_TEAM_SWITCH 59 +#define IDC_MAP_GROUP 60 +//#define IDC_MAP_BRIEFING 61 +//#define IDC_MAP_DEBRIEFING 62 +#define IDC_RADIO_ALPHA 63 +#define IDC_RADIO_BRAVO 64 +#define IDC_RADIO_CHARLIE 65 +#define IDC_RADIO_DELTA 66 +#define IDC_RADIO_ECHO 67 +#define IDC_RADIO_FOXTROT 68 +#define IDC_RADIO_GOLF 69 +#define IDC_RADIO_HOTEL 70 +#define IDC_RADIO_INDIA 71 +#define IDC_RADIO_JULIET 72 +#define IDC_MAP_NAME 73 +#define IDC_WARRANT 74 +#define IDC_GPS 75 + +#define IDC_NOTEPAD_PICTURE 76 + +#define IDC_GPS_ALT 77 +#define IDC_GPS_HEADING 78 + +// - diary topics (used in multiple displays - diary, map, briefing, debriefing) +#define IDC_DIARY_TOPIC_MAP 80 +#define IDC_DIARY_TOPIC_1 81 +#define IDC_DIARY_TOPIC_2 82 +#define IDC_DIARY_TOPIC_3 83 +#define IDC_DIARY_TOPIC_4 84 +#define IDC_DIARY_TOPIC_5 85 +#define IDC_DIARY_TOPIC_6 86 +#define IDC_DIARY_TOPIC_7 87 +#define IDC_DIARY_TOPIC_8 88 +#define IDC_DIARY_TOPIC_9 89 + +#define IDC_HSLIDER 98 +#define IDC_VSLIDER 99 + +#define IDC_ARTILLERY_MAP 500 +#define IDC_ARTILLERY_MAP_FIRE 501 + +#define IDC_ARTILLERY_MAP_NAME 502 +#define IDC_ARTILLERY_MAP_ID 503 +#define IDC_ARTILLERY_MAP_GRID 504 +#define IDC_ARTILLERY_MAP_DIST 505 +#define IDC_ARTILLERY_MAP_MIN 506 +#define IDC_ARTILLERY_MAP_MAX 507 +#define IDC_ARTILLERY_MAP_DIR 508 +#define IDC_ARTILLERY_MAP_ALT 509 +#define IDC_ARTILLERY_MAP_MODE 510 +#define IDC_ARTILLERY_MAP_AMMO 511 +#define IDC_ARTILLERY_MAP_SHELLS 512 +#define IDC_ARTILLERY_MAP_SPREAD 513 +#define IDC_ARTILLERY_MAP_ETA 514 +#define IDC_ARTILLERY_MAP_AMMOCOUNT 515 +#define IDC_ARTILLERY_MAP_WARNING 516 +#define IDC_ARTILLERY_MAP_AIMABOVE 517 + +#define IDC_DIARY_TOPIC_LIST 1001 +#define IDC_DIARY_TOPIC_LISTINDEX 1002 +#define IDC_DIARY_TOPIC_HTML 1003 +#define IDC_DIARY_TOPIC_ADD_RECORD 1004 +#define IDC_DIARY_TOPIC_HTML_GROUP 1013 + +#define IDC_DIARY_PLAYER_NAME 111 +#define IDC_DIARY_MISSION_NAME 112 +#define IDC_DIARY_CURRENT_TASK 113 +#define IDC_DIARY_PLAYER_RANK 116 + +#define IDC_DIARY_TOPIC_BACKGROUND 1021 +#define IDC_DIARY_SUBTOPIC_BACKGROUND 1022 +#define IDC_DIARY_CONTENT_BACKGROUND 1023 + +//IDCs for marker color and icon. +//Are directly connected to RscMapControl, namely its idcMarkerColor and idcMarkerIcon parameters. +//Engine searches for the parameters in any display where RscMapControl is used, that's why they got more uncommon IDCs. +#define IDC_DIARY_MARKER_COLOR 1090 +#define IDC_DIARY_MARKER_ICON 1091 + + +// Instances of display +#define IDD_MAIN 0 +#define IDD_GAME 1 +#define IDD_SINGLE_MISSION 2 +#define IDD_OPTIONS 3 +#define IDD_CONFIGURE 4 +#define IDD_OPTIONS_VIDEO 5 +#define IDD_OPTIONS_AUDIO 6 +#define IDD_MULTIPLAYER 8 +#define IDD_LOAD_AAR 9 +#define IDD_MAIN_MAP 12 +#define IDD_SAVE 13 +#define IDD_END 14 +#define IDD_SERVER 17 +#define IDD_CLIENT 18 +#define IDD_IP_ADDRESS 19 +#define IDD_SERVER_SETUP 20 +#define IDD_CLIENT_SETUP 21 +#define IDD_CLIENT_WAIT 22 +#define IDD_CHAT 24 +#define IDD_CUSTOM_ARCADE 25 +#define IDD_ARCADE_MAP 26 +#define IDD_ARCADE_UNIT 27 +#define IDD_ARCADE_WAYPOINT 28 +#define IDD_TEMPLATE_SAVE 29 +#define IDD_TEMPLATE_LOAD 30 +#define IDD_LOGIN 31 +#define IDD_INTEL 32 +#define IDD_CAMPAIGN 33 +#define IDD_CREDITS 34 +#define IDD_INTEL_GETREADY 37 +#define IDD_ARCADE_GROUP 40 +#define IDD_ARCADE_SENSOR 41 +#define IDD_NEW_USER 42 +#define IDD_CAMPAIGN_LOAD 43 +#define IDD_ARCADE_EFFECTS 44 +#define IDD_ARCADE_MARKER 45 +#define IDD_MISSION 46 +#define IDD_INTRO 47 +#define IDD_OUTRO 48 +#define IDD_INTERRUPT 49 +#define IDD_DEBRIEFING 50 +#define IDD_SELECT_ISLAND 51 +#define IDD_SERVER_GET_READY 52 +#define IDD_CLIENT_GET_READY 53 +#define IDD_INSERT_MARKER 54 +#define IDD_VOICE_CHAT 55 +#define IDD_DEBUG 56 +#define IDD_HINTC 57 +#define IDD_MISSION_END 58 +#define IDD_SERVER_SIDE 59 +#define IDD_CLIENT_SIDE 60 +#define IDD_MULTIPLAYER_ROLE 61 +#define IDD_AWARD 62 +#define IDD_CHANNEL 63 +#define IDD_PASSWORD 64 +#define IDD_MP_PLAYERS 65 +#define IDD_REVERT 66 +#define IDD_PORT 69 +#define IDD_MP_SETUP 70 +#define IDD_FILTER 71 +#define IDD_HINTC_EX 72 +#define IDD_SELECT_PROFILE 73 +#define IDD_CAMPAIGN_SELECT 74 +#define IDD_PROFILE 75 +#define IDD_PROFILE_NAME 76 +#define IDD_PROFILE_FACE 77 +#define IDD_PROFILE_VOICE 78 +#define IDD_PROFILE_CONTROLLER 79 +#define IDD_PROFILE_AUDIO 80 +#define IDD_PROFILE_VIDEO 81 +#define IDD_PROFILE_LIVE 82 +#define IDD_MP_TYPE 83 +#define IDD_MP_PASSCODE 84 +#define IDD_OPTIMATCH_FILTER 86 +#define IDD_QUICKMATCH 87 +#define IDD_FRIENDS 88 +#define IDD_FRIENDS_OPTIONS 89 +#define IDD_XWIZARD_TEMPLATE 90 +#define IDD_XWIZARD_INTEL 91 +#define IDD_XWIZARD_NAME 92 +#define IDD_XWIZARD_ISLAND 93 +#define IDD_XWIZARD_WEATHER 94 +#define IDD_XWIZARD_TIME 95 +#define IDD_XWIZARD_UNIT 96 +#define IDD_XWIZARD_MAP 97 +#define IDD_XWIZARD_UNIT_SELECT 98 +#define IDD_XWIZARD_UNIT_SELECT_CUSTOM 99 +#define IDD_XWIZARD_WAYPOINT 100 +#define IDD_DOWNLOAD_CONTENT 101 +#define IDD_DOWNLOAD_CONTENT_DETAILS 102 +#define IDD_XPLAYERS 103 +#define IDD_XPLAYERS_ACTIONS 104 +#define IDD_XPLAYERS_FEEDBACK 105 +#define IDD_GEAR 106 +#define IDD_EQUIP 555 +#define IDD_DOWNLOAD_CONTENT_INSTALL 108 +#define IDD_SERVER_SETTINGS 109 +#define IDD_SERVER_ADVANCED 110 +#define IDD_SERVER_SELECT_PLAYER 112 +#define IDD_DEDICATED_SERVER 114 +#define IDD_FRIEND_MISSIONS 115 +#define IDD_LIVE_STATS 116 +#define IDD_LIVE_STATS_BOARD 117 +#define IDD_NETWORK_CONDITIONS 118 +#define IDD_SEND_VOICE_MAIL 119 +#define IDD_RECEIVE_VOICE_MAIL 120 +#define IDD_SELECT_ISLAND_NEW 351 + +#define IDD_EDIT_OBJECT 121 +#define IDD_MISSION_LOAD 122 +#define IDD_MISSION_SAVE 123 + +#define IDD_EDIT_DIARY_RECORD 125 + +#define IDD_SERVER_VOTED 126 +#define IDD_DEDICATED_SERVER_SETTINGS 127 + +#define IDD_MISSION_EDITOR 128 + +#define IDD_DIARY 129 + +#define IDD_TEAM_SWITCH 130 + +#define IDD_CONFIGURE_ACTION 131 + +#define IDD_HOST_SETTINGS 132 + +#define IDD_MINIMAP 133 +#define IDD_OVERLAY_CREATE 134 +#define IDD_OVERLAY_LOAD 135 + +#define IDD_ESRB 136 + +#define IDD_MISSION_EDITOR_REALTIME 137 + +//TODO: Has to be checked by Pete! +#define IDD_EDIT_BRIEFING 138 +#define IDD_LIVE 139 + +#define IDD_LASE 141 + +#define IDD_LAYER_LOAD 142 + +#define IDD_CONTROLS 143 +#define IDD_INTERRUPT_REVERT 144 + +#define IDD_PERFORMANCE 145 +#define IDD_XWIZARD_PARAMS 146 +#define IDD_XWIZARD_PARAMETER 147 + +#define IDD_CONFIGURE_JOYSTICKS 148 +#define IDD_CAPTURE 149 +#define IDD_CUSTOMIZE_CONTROLLER 150 +#define IDD_GAMEOPTIONS 151 + +//new editor dialog +#define IDD_ARCADE_MODULES 153 +#define IDD_SELECT_SAVE 154 +#define IDD_DSINTERFACE 155 +#define IDD_ADDON_ACTIONS 156 + +// PhysX debug window +#define IDD_PHYSX_DEBUG 157 + +// mod launcher dialog +#define IDD_MOD_LAUNCHER 157 +#define IDD_NEW_MOD 158 + +// joystick schemes mapping dialog +#define IDD_JOYSTICK_SCHEMES 159 + +//AV Terminal dialog - MUF +#define IDD_AV_TERMINAL 160 +//Field Manual +#define IDD_FIELD_MANUAL 162 +//Dialogue for controls scheme selection +#define IDD_CONTROLS_SCHEME 163 +//Dialogue for choosing layout of mission editor. NOTE: 161-163 are already in use, see A3\Ui_f\hpp\defineResincl.inc +#define IDD_EDITOR_LAYOUT 164 +//Dialogue for publishing mission on Steam. +#define IDD_PUBLISH_MISSION 165 +//Dialogue for selecting tags for mission on Steam. +#define IDD_PUBLISH_MISSION_TAGS 166 +//Dialogue for selecting file from the hard drive +#define IDD_FILE_SELECT_DIALOG 167 +//Idd reserved for debriefing 168 +#define IDD_DLC_VEHICLEMSGBOX 169 +#define IDD_DLC_PURCHASENOTIFICATION 170 +#define IDD_BOOTCAMPMSGBOX 171 +#define IDD_COMMUNITY_GUIDE 172 +#define IDD_SLING_LOAD_ASSISTANT 173 +#define IDD_DLC_CONTENTBROWSER 174 +#define IDD_MP_SCORE_TABLE 175 +#define IDD_CAMPAIGN_MP 176 +#define IDD_MP_QUICK_PLAY 177 +#define IDD_MP_SERVER_SEARCH 178 + +// MessageBoxes +#define IDD_MSG_DELETEPLAYER 200 +#define IDD_MSG_DELETEGAME 201 +#define IDD_MSG_CLEARTEMPLATE 202 +#define IDD_MSG_EXITTEMPLATE 203 +#define IDD_MSG_LAUNCHGAME 204 // ADDED IN PATCH 1.04 + +#define IDD_MSG_NEWACCOUNT 205 + +#define IDD_MSG_FRIENDS_REMOVE 206 +#define IDD_MSG_FRIENDS_BLOCK 207 +#define IDD_MSG_FRIENDS_INVITE 208 + +#define IDD_MSG_DELETEMISSION 209 + +#define IDD_MSG_XONLINE_CONNECTION_FAILED 210 +#define IDD_MSG_XONLINE_UPDATE_REQUIRED 211 +#define IDD_MSG_XONLINE_SERVER_BUSY 212 +#define IDD_MSG_XONLINE_REQUIRED_MSG 213 +#define IDD_MSG_XONLINE_RECOMMENDED_MSG 214 +#define IDD_MSG_XONLINE_INVALID_USER 215 +#define IDD_MSG_XONLINE_WRONG_PASSCODE 216 + +#define IDD_MSG_CANCEL_SUBSCRIPTION 217 +#define IDD_MSG_SUBSCRIBE 218 +#define IDD_MSG_PURCHASE 219 +#define IDD_MSG_INSTALL_ABORT 220 +#define IDD_MSG_INSTALL_RESULT 221 + +#define IDD_MSG_DECLINE_INVITATION 222 +#define IDD_MSG_REVOKE_INVITATION 223 +#define IDD_MSG_BLOCK_REQUEST 224 +#define IDD_MSG_DECLINE_REQUEST 225 +#define IDD_MSG_CANCEL_REQUEST 226 +#define IDD_MSG_KICK_OFF 227 +#define IDD_MSG_TERMINATE_SESSION 228 +#define IDD_MSG_NETWORK_CONDITIONS 229 + +#define IDD_MSG_STATS_NOT_UPLOADED 230 + +#define IDD_MSG_LOAD_FAILED 231 +#define IDD_MSG_DELETESAVE 232 + +#define IDD_MSG_DISK_FULL 233 + +#define IDD_MSG_RESTART_MISSION 234 +#define IDD_MSG_SAVE_MISSION 235 +#define IDD_MSG_SIGN_OUT 236 +#define IDD_MSG_LOAD_MISSION 237 +#define IDD_MSG_NEGATIVE_FEEDBACK 238 +#define IDD_MSG_PENDING_INVITATION 239 +#define IDD_MSG_HOST_SESSION 240 +#define IDD_MSG_ROLES_LOST 241 +#define IDD_MSG_ACCEPT_INVITATION 242 +#define IDD_MSG_MP_PLAYER_COUNT 243 +#define IDD_MSG_GAME_JOIN 244 +#define IDD_MSG_EDITOR_WIZARD_NONAME_MISSION 245 + +#define IDD_MSG_RESTART_NEEDED 246 + +// new editor +#define IDD_MSG_COMMIT_OVERLAY 247 +#define IDD_MSG_CLEAR_OVERLAY 248 +#define IDD_MSG_LOAD_OVERLAY 249 +#define IDD_MSG_EXIT_OVERLAY 250 +#define IDD_MSG_CREATE_OVERLAY 251 +#define IDD_MSG_CLOSE_OVERLAY 252 +#define IDD_MSG_LOAD_AAR 253 +#define IDD_MSG_CLEAR_MISSION 254 +#define IDD_MSG_RETRY_MISSION 255 +#define IDD_MSG_DELETE_DIARY_RECORD 256 + +// XBOX 360 profile and save messages +#define IDD_MSG_XBOX_NO_SIGN_IN 257 +#define IDD_MSG_XBOX_NO_STORAGE 258 +#define IDD_MSG_XBOX_STORAGE_CHANGED 259 +#define IDD_MSG_XBOX_SAVE_FAILED 260 +#define IDD_MSG_XBOX_NO_STORAGE_ON_INVITE 261 + +#define IDD_OPTIONS_AUDIO_ADJUST_MIC 262 + +//MUF-MessageBox for restarting mission editor during layout change +#define IDD_MSG_RESTART_EDITOR 263 + +#define IDD_PROGRESS_MESSAGE 264 + +//Message box for confirming deleting published mission +#define IDD_MSG_DELETE_STEAM_MISSION 265 +//Message box for confirming updating published mission +#define IDD_MSG_UPDATE_STEAM_MISSION 266 +//Message box for confirming saving current mission before the publish dialog is opened +#define IDD_MSG_SAVE_MISSION_BEFORE_PUBLISH 267 +//Message box for asking user to agree with Battleye licence. +#define IDD_MSG_BATTLEYE_LICENCE 268 + +// InGameUI +#define IDD_UNITINFO 300 +#define IDD_HINT 301 +#define IDD_TASKHINT 302 +#define IDD_STANCEINFO 303 +#define IDD_AVCAMERA 304 +#define IDD_STAMINA_BAR 305 + +// Futura ui +#define IDD_FUTURAGEAR 602 +// FUTURA GEAR controls +#define IDC_FG_PRIMARY 610 +#define IDC_FG_SECONDARY 611 +#define IDC_FG_HANDGUN 612 + +// prefix 620 means slot items +//--- +#define IDC_FG_MAP 6211 +#define IDC_FG_COMPASS 6212 +#define IDC_FG_WATCH 6213 +#define IDC_FG_RADIO 6214 +#define IDC_FG_GPS 6215 + +#define IDC_FG_GOGGLES 6216 +#define IDC_FG_HMD 6217 +#define IDC_FG_BINOC 6238 + +#define IDC_FG_BACKPACK2 6239 +#define IDC_FG_HEADGEAR 6240 + +// prefix 630 means slot container items(uniform, vest, backpack) +#define IDC_FG_UNIFORM_SLOT 6301 +#define IDC_FG_VEST_SLOT 6302 +#define IDC_FG_BACKPACK_SLOT 6303 +/// containers load +#define IDC_FG_UNIFORM_LOAD 6304 +#define IDC_FG_VEST_LOAD 6305 +#define IDC_FG_BACKPACK_LOAD 6306 +#define IDC_FG_GROUND_LOAD 6307 +#define IDC_FG_TOTAL_LOAD 6308 +//--- +#define IDC_FG_MAGAZINES 618 +// primary +#define IDC_FG_PW_MUZZLE 620 +#define IDC_FG_PW_OPTICS 621 +#define IDC_FG_PW_FLASHLIGHT 622 +#define IDC_FG_PW_MAGAZINE 623 +// secondary +#define IDC_FG_SW_MUZZLE 624 +#define IDC_FG_SW_OPTICS 625 +#define IDC_FG_SW_FLASHLIGHT 626 +#define IDC_FG_SW_MAGAZINE 627 +// handgun +#define IDC_FG_HG_MUZZLE 628 +#define IDC_FG_HG_OPTICS 629 +#define IDC_FG_HG_FLASHLIGHT 630 +#define IDC_FG_HG_MAGAZINE 631 + +#define IDC_FG_GROUND_ITEMS 632 +#define IDC_FG_CHOSEN_CONTAINER 640 +#define IDC_FG_PW_UNDERBARREL 641 +#define IDC_FG_SW_UNDERBARREL 642 +#define IDC_FG_HG_UNDERBARREL 643 +#define IDC_FG_PW_MAGAZINE_GL 644 +// #define IDC_FG_BACKPACK_ITEMS 633 +// #define IDC_FG_ITEMS 619 + +// new inventory + +// filter +#define IDC_FG_GROUND_FILTER 6554 + +// images which will painted over containers during DnD state +#define IDC_FG_GROUND_MARKER 6385 +#define IDC_FG_CONTAINER_MARKER 6325 +#define IDC_FG_CHOSEN_MARKER 6405 + +#define IDC_FG_VEST_CONTAINER 638 +#define IDC_FG_UNIFORM_CONTAINER 633 +#define IDC_FG_BACKPACK_CONTAINER 619 + +#define IDC_FG_VEST_TAB 6381 +#define IDC_FG_VEST_TEXT 6382 +#define IDC_FG_UNIFORM_TAB 6331 +#define IDC_FG_UNIFORM_TEXT 6332 +#define IDC_FG_BACKPACK_TAB 6191 +#define IDC_FG_BACKPACK_TEXT 6192 + +#define IDC_FG_CHOSEN_TAB 6401 +#define IDC_FG_CHOSEN_TEXT 6402 +#define IDC_FG_GROUND_TAB 6321 +#define IDC_FG_GROUND_TEXT 6322 +#define IDC_DLC_TEMPLATE_LOGO 100 +#define IDC_DLC_TEMPLATE_BACKGROUND 101 +/////////////// + +/// weight info +#define IDC_FG_GROUND_WEIGHT 634 +#define IDC_FG_BACKPACK_WEIGHT 635 +#define IDC_FG_ITEMS_WEIGHT 636 + +/// player info +#define IDC_FG_TOTAL_WEIGHT 637 +////// + +// Arcade Sites +#define IDD_ARCADE_SITE 700 + +#define IDC_AS_AZIMUT 701 +#define IDC_AS_AZIMUT_PICTURE 702 + +// ---- combos +#define IDC_AS_SIDE 703 +#define IDC_AS_FACTION 704 +#define IDC_AS_CLASS 705 +#define IDC_AS_SITETYPE 706 +#define IDC_AS_REPAIRABLE 707 +#define IDC_AS_FASTTRAVEL 708 +#define IDC_AS_STORAGE 709 +// ---- flags +#define IDC_AS_FLGEQUIP 710 +#define IDC_AS_FLGFOOD 711 +#define IDC_AS_FLGARMORED 712 +#define IDC_AS_FLGFUEL 713 +#define IDC_AS_FLGWEAPON 714 +// ---- strings +#define IDC_AS_NAME 715 +#define IDC_AS_DESC 716 +#define IDC_AS_INIT 717 +#define IDC_AS_CONDITION 718 +#define IDC_AS_RADIUS 719 +// ---- sliders +#define IDC_AS_HEALTH 720 +#define IDC_AS_MOOD 721 +#define IDC_AS_PRESENCE 722 + +#define IDC_AS_ARGUMENTS 733 +//////////////////////////////////////// + +// Virtual keyboard +#define IDC_VK_SHIFT 1001 +#define IDC_VK_CAPSLOCK 1002 +#define IDC_VK_SYMBOLS 1003 +#define IDC_VK_ACCENTS 1004 +#define IDC_VK_BACKSPACE 1005 +#define IDC_VK_LEFT 1006 +#define IDC_VK_RIGHT 1007 +#define IDC_VK_BASE 1010 + +// Main display controls +#define IDC_MAIN_GAME 101 +#define IDC_MAIN_OPTIONS 102 +#define IDC_MAIN_TRAINING 103 +#define IDC_MAIN_CUSTOM 104 +#define IDC_MAIN_MULTIPLAYER 105 +#define IDC_MAIN_QUIT 106 +#define IDC_MAIN_CREDITS 107 +#define IDC_MAIN_ARCADE 108 +#define IDC_MAIN_PLAYER 109 +#define IDC_MAIN_RANK 110 +#define IDC_MAIN_ISLAND 111 +#define IDC_MAIN_DATE 112 +#define IDC_MAIN_MISSION 113 +#define IDC_MAIN_CONTINUE 114 +#define IDC_MAIN_EDITOR 115 +#define IDC_MAIN_BOOK 116 +#define IDC_MAIN_SINGLE 117 +#define IDC_MAIN_VERSION 118 +#define IDC_MAIN_SINGLE_PROFILES 119 +#define IDC_MAIN_CAMPAIGN_PROFILES 120 +#define IDC_MAIN_MP_PROFILES 121 +#define IDC_MAIN_SETTINGS_PROFILES 122 +#define IDC_MAIN_SYSTEM_LINK 123 +#define IDC_MAIN_CUSTOM_PROFILES 124 +#define IDC_MAIN_SIGN_IN_STATUS 125 +#define IDC_MAIN_PLAYER_LABEL 126 +#define IDC_MAIN_PLAYER_NAME 127 +#define IDC_MAIN_CONTROLS 128 +#define IDC_MAIN_PLAYER_ID 129 +#define IDC_MAIN_PLAYER_COLOR 130 +#define IDC_MAIN_SERVICE_ID_LABEL 131 +#define IDC_MAIN_NICKNAME_LABEL 132 +#define IDC_MAIN_NICKNAME_BG 133 +#define IDC_MAIN_LOAD 134 +#define IDC_MAIN_SAVE 135 +#define IDC_MAIN_AAR 136 +#define IDC_MAIN_ACHIEVEMENTS 137 +#define IDC_MAIN_SINGLEPLAYER 138 +#define IDC_MAIN_MOD_LIST 139 +#define IDC_MAIN_MOD_LAUNCHER 140 +#define IDC_MAIN_MOD_ICONS 141 +#define IDC_SP_EDITOR 142 +#define IDC_MAIN_FIELD_MANUAL 143 +#define IDC_MAIN_DLC_ICONS 144 +#define IDC_MAIN_DLC_OWNED_ICONS 145 +#define IDC_MAIN_DLC_ICONS_BACK 146 +#define IDC_MAIN_MOD_ICONS_BACK 147 +#define IDC_MAIN_DLC_OWNED_ICONS_BACK 148 +#define IDC_MAIN_BOOTCAMP_CAMPAIGN 149 +#define IDC_MAIN_BOOTCAMP_SHOWCASES 150 +#define IDC_MAIN_BOOTCAMP_CHALLENGES 151 +#define IDC_MAIN_BOOTCAMP_VRTRAINING 152 +#define IDC_MAIN_QUICKPLAY 154 + +#define IDC_MAIN_CARDAS_CUDL 199 // muj vlastni cudl + +#define IDC_MAIN_VIDEOCONTROL 3335 + +#define IDC_MAIN_TAB_LOGIN 9001 +#define IDC_MAIN_TAB_LIBRARY 9002 +#define IDC_MAIN_TAB_SINGLE 9003 +#define IDC_MAIN_TAB_MULTIPLAYER 9004 +#define IDC_MAIN_TAB_OPTIONS 9005 +#define IDC_MAIN_TAB_CONTROLS 9006 +#define IDC_MAIN_TAB_EDITOR 9007 +#define IDC_MAIN_TAB_QUIT 9008 +#define IDC_MAIN_TAB_AAR 9011 + +#define IDC_BUILD_VERSION 9009 +#define IDC_BUILD_DATE 9010 + +// Single player display controls +#define IDC_SP_TRAINING 101 +//#define IDC_SP_EDITOR 102 +#define IDC_SP_MISSION 103 +#define IDC_SP_CAMPAIGN 104 + +// Select profile display controls +#define IDC_PROFILES_LIST 101 +#define IDC_PROFILES_HEAD 102 +#define IDC_PROFILES_TITLE 103 +#define IDC_PROFILES_CONTROLLER 104 +#define IDC_PROFILES_DIFFICULTY 105 +#define IDC_PROFILES_MISSION 106 +#define IDC_PROFILES_LIVE 107 +#define IDC_PROFILES_MISSION_TEXT 108 +#define IDC_PROFILES_SIGN_IN_STATUS 109 +#define IDC_PROFILES_EDIT 110 +#define IDC_PROFILES_DELETE 111 + +// Edit profile display controls +#define IDC_PROFILE_NAME 101 +#define IDC_PROFILE_FACE 102 +#define IDC_PROFILE_VOICE 103 +#define IDC_PROFILE_CONTROLLER 104 +#define IDC_PROFILE_AUDIO 105 +#define IDC_PROFILE_VIDEO 106 +#define IDC_PROFILE_HEAD 108 +#define IDC_PROFILE_SUM_NAME 109 +#define IDC_PROFILE_SUM_CONTROLLER 110 +#define IDC_PROFILE_SUM_LIVE 111 +#define IDC_PROFILE_VOICE_MASK 112 +#define IDC_PROFILE_SIGN_IN_STATUS 113 +#define IDC_PROFILE_CREDITS 114 +#define IDC_PROFILE_STORAGE_DEVICE 115 + +// Edit profile name display controls +#define IDC_PROFILE_NAME_PREVIEW 101 + +// Edit profile face +#define IDC_PROF_FACE_FACE 101 +#define IDC_PROF_FACE_GLASSES 102 +#define IDC_PROF_FACE_HEAD 103 + +// Edit profile voice +#define IDC_PROF_VOICE_SPEAKER 101 +#define IDC_PROF_VOICE_PITCH_TITLE 102 +#define IDC_PROF_VOICE_PITCH_VALUE 103 +#define IDC_PROF_VOICE_PITCH 104 +#define IDC_PROF_VOICE_MASK 105 +#define IDC_PROF_VOICE_THROUGH_SPEAKERS 106 +#define IDC_PROF_VOICE_HEAD 107 +#define IDC_PROF_VOICE_DEFAULT 108 + +// Edit profile controller +#define IDC_PROF_CONTR_VEHICLE 101 +#define IDC_PROF_CONTR_TYPE 102 +#define IDC_PROF_CONTR_IMAGE 103 +#define IDC_PROF_CONTR_SCHEME 104 +#define IDC_PROF_CONTR_SENSITIVITY 105 +#define IDC_PROF_CONTR_A 200 +#define IDC_PROF_CONTR_B 201 +#define IDC_PROF_CONTR_Y 202 +#define IDC_PROF_CONTR_X 203 +#define IDC_PROF_CONTR_WHITE 204 +#define IDC_PROF_CONTR_BLACK 205 +#define IDC_PROF_CONTR_LEFT 206 +#define IDC_PROF_CONTR_RIGHT 207 +#define IDC_PROF_CONTR_UP 208 +#define IDC_PROF_CONTR_DOWN 209 +#define IDC_PROF_CONTR_BACK 210 +#define IDC_PROF_CONTR_START 211 +#define IDC_PROF_CONTR_LEFT_THUMB 212 +#define IDC_PROF_CONTR_LEFT_THUMB_MOVE_X 213 +#define IDC_PROF_CONTR_LEFT_THUMB_MOVE_Y 214 +#define IDC_PROF_CONTR_RIGHT_THUMB 215 +#define IDC_PROF_CONTR_RIGHT_THUMB_MOVE_X 216 +#define IDC_PROF_CONTR_RIGHT_THUMB_MOVE_Y 217 +#define IDC_PROF_CONTR_LEFT_TRIGGER 218 +#define IDC_PROF_CONTR_RIGHT_TRIGGER 219 +#define IDC_PROF_CONTR_LEFT_THUMB_MOVE 220 +#define IDC_PROF_CONTR_RIGHT_THUMB_MOVE 221 +#define IDC_PROF_CONTR_DPAD 222 +#define IDC_PROF_CONTR_NEXT_SCHEME 223 +#define IDC_PROF_CONTR_PREV_SCHEME 224 +#define IDC_PROF_CONTR_Y_AXIS 225 +#define IDC_PROF_CONTR_VIBRATIONS 226 + +// Controller buttons +// #define IDC_CONTROLLER_BUTTONS 101 + +// Edit profile audio options +#define IDC_PROF_AUDIO_MUSIC_TITLE 101 +#define IDC_PROF_AUDIO_MUSIC_VALUE 102 +#define IDC_PROF_AUDIO_MUSIC 103 +#define IDC_PROF_AUDIO_RADIO_TITLE 104 +#define IDC_PROF_AUDIO_RADIO_VALUE 105 +#define IDC_PROF_AUDIO_RADIO 106 +#define IDC_PROF_AUDIO_EFFECT_TITLE 107 +#define IDC_PROF_AUDIO_EFFECT_VALUE 108 +#define IDC_PROF_AUDIO_EFFECT 109 +#define IDC_PROF_AUDIO_DEFAULT 110 + +// Edit profile video options +#define IDC_PROF_VIDEO_BRIGHT 101 +#define IDC_PROF_VIDEO_BRIGHT_TITLE 102 +#define IDC_PROF_VIDEO_BRIGHT_VALUE 103 +#define IDC_PROF_VIDEO_GAMMA 104 +#define IDC_PROF_VIDEO_GAMMA_TITLE 105 +#define IDC_PROF_VIDEO_GAMMA_VALUE 106 +#define IDC_PROF_VIDEO_SUBTITLES 107 +#define IDC_PROF_VIDEO_RADIO 108 +#define IDC_PROF_VIDEO_DEFAULT 109 + +// Select profile an Xbox live account display controls +#define IDC_PROFILE_LIVE_ACCOUNTS 101 +#define IDC_PROFILE_LIVE_CREATE 102 + +// Select difficulty dialog +#define IDC_DIFF_LIST 108 +#define IDC_DIFF_DESC 102 + +// Single mission display controls +#define IDC_SINGLE_MISSION 101 +#define IDC_SINGLE_OVERVIEW 102 +#define IDC_SINGLE_MISSION_PAD 103 +#define IDC_SINGLE_DIFF 104 +#define IDC_SINGLE_LOAD 105 +#define IDC_SINGLE_TITLE 106 +#define IDC_SINGLE_DELETE 107 +#define IDC_SINGLE_COPY 108 +#define IDC_SINGLE_EDIT 109 +#define IDC_SINGLE_NAME 110 +#define IDC_SINGLE_AUTHOR 111 +#define IDC_SINGLE_PICTURE 112 +#define IDC_SINGLE_DESCRIPTION 113 +#define IDC_SINGLE_LOADING_PICTURE 114 +#define IDC_SINGLE_SHOW_MISSION_WORKSHOP 115 +#define IDC_SINGLE_SHOW_GAME_WORKSHOP 116 +#define IDC_SINGLE_SHOW_GAME_OR_MISSION_WORKSHOP 117 +#define IDC_SINGLE_MISSION_SORT_COMBO 118 +#define IDC_SINGLE_MISSION_SORT_ORDER 119 +#define IDC_SINGLE_MISSION_BUY_DLC 120 +#define IDC_SINGLE_MISSION_DLCSTRIPE 121 +#define IDC_SINGLE_MISSION_DLCICON 122 + +// Xbox style mission wizard +#define IDC_XWIZ_TEMPLATE 101 +#define IDC_XWIZ_TEMPLATE_OVERVIEW 102 + +#define IDC_XWIZ_NAME 101 +#define IDC_XWIZ_ISLAND 102 +#define IDC_XWIZ_WEATHER 103 +#define IDC_XWIZ_TIME 104 +#define IDC_XWIZ_SUM_NAME 105 +#define IDC_XWIZ_SUM_TIME 106 +#define IDC_XWIZ_SUM_TEMPLATE 107 +#define IDC_XWIZ_SUM_ISLAND 108 +#define IDC_XWIZ_SUM_WEATHER 109 +#define IDC_XWIZ_SUM_WEATHER_FORECAST 110 +#define IDC_XWIZ_UNIT 111 +#define IDC_XWIZ_MAP 112 +#define IDC_XWIZ_SUM_DATE 113 +#define IDC_XWIZ_PARAM 114 +#define IDC_XWIZ_SAVE 115 + +#define IDC_XWIZ_UNITS 101 +#define IDC_XWIZ_UNITS_OVERVIEW 102 + +#define IDC_XWIZ_PARAMS 101 +#define IDC_XWIZ_PARAMS_TITLES 102 +#define IDC_XWIZ_PARAMS_VALUES 103 +#define IDC_EDIT 104 +#define IDD_XWIZARD_PARAMETER_TITLE 105 + +#define IDC_XWIZ_UNIT_SELECT 101 +#define IDC_XWIZ_UNIT_SELECT_TITLE 102 + +#define IDC_XWIZ_UNIT_CLASS 101 +#define IDC_XWIZ_UNIT_TYPE 102 +#define IDC_XWIZ_UNIT_COUNT 103 +#define IDC_XWIZ_UNIT_SIDE 104 +#define IDC_XWIZ_UNIT_SELECT_CUSTOM_TITLE 105 + +#define IDC_XWIZ_WP_TYPE 101 +#define IDC_XWIZ_WP_BEHAVIOUR 102 +#define IDC_XWIZ_WP_FORMATION 103 +#define IDC_XWIZ_WP_COMBAT_MODE 104 + +#define IDC_XWIZ_ISLAND_LIST 101 +#define IDC_XWIZ_ISLAND_MAP 102 +#define IDC_XWIZ_ISLAND_SHOTS 103 + +#define IDC_XWIZ_WEATHER_TITLE 101 +#define IDC_XWIZ_WEATHER_VALUE 102 +#define IDC_XWIZ_WEATHER_FORECAST_TITLE 103 +#define IDC_XWIZ_WEATHER_FORECAST_VALUE 104 +#define IDC_XWIZ_FOG_TITLE 105 +#define IDC_XWIZ_FOG_VALUE 106 +#define IDC_XWIZ_FOG_FORECAST_TITLE 107 +#define IDC_XWIZ_FOG_FORECAST_VALUE 108 +#define IDC_XWIZ_VIEW_DISTANCE_TITLE 109 +#define IDC_XWIZ_VIEW_DISTANCE_VALUE 110 + +#define IDC_XWIZ_TIME_HOUR 101 +#define IDC_XWIZ_TIME_MINUTE 102 +#define IDC_XWIZ_TIME_DAY 103 +#define IDC_XWIZ_TIME_MONTH 104 +#define IDC_XWIZ_TIME_YEAR 105 + +#define IDC_XWIZ_MAP_POINTS 101 +#define IDC_XWIZ_MAP_DELETE 102 +#define IDC_XWIZ_MAP_EDIT 103 +#define IDC_XWIZ_MAP_INSERT_WP 104 +#define IDC_XWIZ_MAP_NOTEPAD 105 +#define IDC_XWIZ_MAP_MOVE 106 + +// Select campaign display +#define IDC_CAMPAIGNS_LIST 101 +#define IDC_CAMPAIGNS_CAMPAIGN 102 +#define IDC_CAMPAIGNS_DESCRIPTION 103 +#define IDC_HOST 104 + +// Campaign display +#define IDC_CAMPAIGN_HISTORY 101 +#define IDC_CAMPAIGN_MIS_NAME 102 +#define IDC_CAMPAIGN_MIS_DESC 103 +#define IDC_CAMPAIGN_BOOK 104 +#define IDC_CAMPAIGN_CAMPAIGN 105 +#define IDC_CAMPAIGN_PREV 106 +#define IDC_CAMPAIGN_NEXT 107 +#define IDC_CAMPAIGN_OVERVIEW_DESC 108 +#define IDC_CAMPAIGN_REPLAY 109 +#define IDC_CAMPAIGN_DIFF 110 +#define IDC_CAMPAIGN_MISSION 111 + +#define IDC_CAMPAIGN_DATE 112 +#define IDC_CAMPAIGN_SCORE 113 +#define IDC_CAMPAIGN_DURATION 114 +#define IDC_CAMPAIGN_CASUALTIES 115 +#define IDC_CAMPAIGN_KILLS_TITLE 116 +#define IDC_CAMPAIGN_ENEMY_ROW 117 +#define IDC_CAMPAIGN_FRIENDLY_ROW 118 +#define IDC_CAMPAIGN_CIVILIAN_ROW 119 +#define IDC_CAMPAIGN_INFANTRY_COLUMN 120 +#define IDC_CAMPAIGN_SOFT_COLUMN 121 +#define IDC_CAMPAIGN_ARMORED_COLUMN 122 +#define IDC_CAMPAIGN_AIRCRAFT_COLUMN 123 +#define IDC_CAMPAIGN_TOTAL_COLUMN 124 +#define IDC_CAMPAIGN_EINF 125 +#define IDC_CAMPAIGN_ESOFT 126 +#define IDC_CAMPAIGN_EARM 127 +#define IDC_CAMPAIGN_EAIR 128 +#define IDC_CAMPAIGN_ETOT 129 +#define IDC_CAMPAIGN_FINF 130 +#define IDC_CAMPAIGN_FSOFT 131 +#define IDC_CAMPAIGN_FARM 132 +#define IDC_CAMPAIGN_FAIR 133 +#define IDC_CAMPAIGN_FTOT 134 +#define IDC_CAMPAIGN_CINF 135 +#define IDC_CAMPAIGN_CSOFT 136 +#define IDC_CAMPAIGN_CARM 137 +#define IDC_CAMPAIGN_CAIR 138 +#define IDC_CAMPAIGN_CTOT 139 +#define IDC_CAMPAIGN_NAME 140 +#define IDC_CAMPAIGN_AUTHOR 141 +#define IDC_CAMPAIGN_PICTURE 142 +#define IDC_CAMPAIGN_DESCRIPTION 143 +#define IDC_CAMPAIGN_TEXT_ESTDEPLOY 144 +#define IDC_CAMPAIGN_RELEASEDATE 145 +#define IDC_CAMPAIGN_BUY_DLC 146 +#define IDC_CAMPAIGN_DLCSTRIPE 147 +#define IDC_CAMPAIGN_DLCICON 148 + +// MP campaign display +#define IDC_CAMPAIGN_MP_LIST 101 +#define IDC_CAMPAIGN_MP_TITLE 102 +#define IDC_CAMPAIGN_MP_NAME 103 +#define IDC_CAMPAIGN_MP_AUTHOR 104 +#define IDC_CAMPAIGN_MP_PICTURE 105 +#define IDC_CAMPAIGN_MP_DESCRIPTION 106 +#define IDC_CAMPAIGN_MP_PLAY 107 +#define IDC_CAMPAIGN_MP_HOST 108 +#define IDC_CAMPAIGN_MP_JOIN 109 +#define IDC_CAMPAIGN_MP_BUY_DLC 110 + +// Revert display +#define IDC_REVERT_BOOK 101 +#define IDC_REVERT_TITLE 102 +#define IDC_REVERT_QUESTION 103 + +// Game display controls +#define IDC_GAME_SELECT 301 +#define IDC_SIDE_NAME 101 + +// Options display controls +#define IDC_OPTIONS_VIDEO 301 +#define IDC_OPTIONS_AUDIO 302 +#define IDC_OPTIONS_CONFIGURE 303 +#define IDC_OPTIONS_DIFFICULTY 304 +#define IDC_OPTIONS_NOTEBOOK 305 +#define IDC_OPTIONS_CREDITS 306 +#define IDC_OPTIONS_GAMEOPTIONS 307 + +#define IDC_OPTIONS_OBJECT_VISIBILITY_VALUE 308 +#define IDC_OPTIONS_OBJECT_VISIBILITY_SLIDER 309 +#define IDC_OPTIONS_VISIBILITY_TEXT 310 +#define IDC_OPTIONS_SHADOW_VISIBILITY_VALUE 311 +#define IDC_OPTIONS_SHADOW_VISIBILITY_SLIDER 312 +#define IDC_OPTIONS_SHADOW_VISIBILIT_TEXT 313 +#define IDC_OPTIONS_TRAFFIC_VISIBILITY_VALUE 314 +#define IDC_OPTIONS_TRAFFIC_VISIBILITY_SLIDER 315 + +#define IDC_OPTIONS_PIP_VALUE 334 +#define IDC_OPTIONS_SW_VALUE 335 +#define IDC_OPTIONS_FXAA_VALUE 336 +#define IDC_OPTIONS_WATER_SS_REFLECTIONS_VALUE 337 + +#define IDC_OPTIONS_QUALITY_VALUE 101 +#define IDC_OPTIONS_QUALITY_SLIDER 102 +#define IDC_OPTIONS_VISIBILITY_VALUE 103 +#define IDC_OPTIONS_VISIBILITY_SLIDER 104 + +#define IDC_OPTIONS_DRAWDISTANCE_VALUE 1336 +#define IDC_OPTIONS_DRAWDISTANCE_SLIDER 1337 + +#define IDC_OPTIONS_RATE_VALUE 105 +#define IDC_OPTIONS_RATE_SLIDER 106 +#define IDC_OPTIONS_TEXTURES_VALUE 107 +#define IDC_OPTIONS_TEXTURES_SLIDER 108 +#define IDC_OPTIONS_GAMMA_VALUE 109 +#define IDC_OPTIONS_GAMMA_SLIDER 110 +#define IDC_OPTIONS_BRIGHT_VALUE 111 +#define IDC_OPTIONS_BRIGHT_SLIDER 112 +#define IDC_OPTIONS_RESOLUTION 113 +#define IDC_OPTIONS_DISPLAY_MODE 1131 +#define IDC_OPTIONS_REFRESH 114 +#define IDC_OPTIONS_OBJSHADOWS 115 +//#define IDC_OPTIONS_VEHSHADOWS 116 +//#define IDC_OPTIONS_CLOUDLETS 117 +//#define IDC_OPTIONS_HWTL 118 +#define IDC_OPTIONS_BLOOD 119 +//#define IDC_OPTIONS_MULTITEXTURING 120 +#define IDC_OPTIONS_WBUFFER 121 +#define IDC_OPTIONS_BLOOD_TEXT 122 +#define IDC_OPTIONS_TERRAIN 123 +#define IDC_OPTIONS_LIFESTATE 199 +#define IDC_OPTIONS_TUTORIAL_HINTS 140 + +#define IDC_OBJECTS_DETAIL 124 +#define IDC_TEXTURE_DETAIL 125 +#define IDC_QUALITY_PREFERENCE 126 +#define IDC_SHADING_DETAIL 127 +#define IDC_SHADOW_DETAIL 128 + +#define IDC_OPTIONS_VIDEO_DEFAULT 129 +#define IDC_OPTIONS_VIDEO_AUTODETECT 1291 + +#define IDC_ANISO_DETAIL 130 +#define IDC_HDR_DETAIL 131 +#define IDC_POSTPROCESS_EFFECTS 132 +#define IDC_FSAA_DETAIL 133 +#define IDC_ASPECT_RATIO 134 +#define IDC_ATOC_DETAIL 1300 +#define IDC_PPAA_DETAIL 1301 + +#define IDC_OPTIONS_PP_SSAO 1310 +#define IDC_OPTIONS_PP_BLOOM_SLIDER 1311 +#define IDC_OPTIONS_PP_BLOOM_VALUE 1312 +#define IDC_OPTIONS_PP_ROTBLUR_SLIDER 1313 +#define IDC_OPTIONS_PP_ROTBLUR_VALUE 1314 +#define IDC_OPTIONS_PP_RADIALBLUR_SLIDER 1315 +#define IDC_OPTIONS_PP_RADIALBLUR_VALUE 1316 +#define IDC_OPTIONS_PP_DOF_SLIDER 1317 +#define IDC_OPTIONS_PP_DOF_VALUE 1318 +#define IDC_OPTIONS_PP_CAUSTICS 1319 +#define IDC_OPTIONS_PP_SHARPEN_SLIDER 1320 +#define IDC_OPTIONS_PP_SHARPEN_VALUE 1321 +#define IDC_OPTIONS_PP_COLOR_CORRECTIONS 1322 +#define IDC_OPTIONS_PP_BRIGHTNESS_SLIDER 1323 +#define IDC_OPTIONS_PP_BRIGHTNESS_VALUE 1324 +#define IDC_OPTIONS_PP_CONTRAST_SLIDER 1325 +#define IDC_OPTIONS_PP_CONTRAST_VALUE 1326 +#define IDC_OPTIONS_PP_SATURATION_SLIDER 1327 +#define IDC_OPTIONS_PP_SATURATION_VALUE 1328 + +#define IDC_OPTIONS_VIDEO_FPS_TEXT 1400 +#define IDC_OPTIONS_VIDEO_PERF_WARNING 1401 + + +#define IDC_OPTIONS_LANGUAGE 135 + +#define IDC_OPTIONS_IGUISIZE 136 +#define IDC_OPTIONS_IGUISIZE_TEXT 137 +#define IDC_OPTIONS_HEADBOB 138 + +#define IDC_VRAM_VALUE 139 + +#define IDC_VSYNC_VALUE 140 +#define IDC_OPTIONS_IMPERIALUNITS 141 +#define IDC_OPTIONS_VEHICLEFREELOOK 142 +#define IDC_OPTIONS_STREAM_FRIENDLY 143 +#define IDC_OPTIONS_ADAPTIVE_CROSSHAIR 144 +#define IDC_OPTIONS_INSTRUCTOR_FIGURE 145 +#define IDC_OPTIONS_ENABLE_RTD 146 +#define IDC_OPTIONS_ALLOW_FULL_RTD_HUD 147 +#define IDC_OPTIONS_ALLOW_ROUGH_LANDING_RTD 148 +#define IDC_OPTIONS_WIND_INFLUENCE_DYN_RTD 149 +#define IDC_OPTIONS_AUTO_TRIM_RTD 150 +#define IDC_OPTIONS_STRESS_DAMAGE_RTD 151 + +#define IDC_PARTICLES_EFFECTS 143 +#define IDC_OPTIONS_DYNAMIC_LIGHTS 144 + +#define IDC_OPTIONS_SLIDER_FILLRATE 1234 +#define IDC_OPTIONS_VALUE_FILLRATE 1236 + + +#define IDC_OPTIONS_MUSIC_VALUE 101 +#define IDC_OPTIONS_MUSIC_SLIDER 102 +#define IDC_OPTIONS_EFFECTS_VALUE 103 +#define IDC_OPTIONS_EFFECTS_SLIDER 104 +#define IDC_OPTIONS_VOICES_VALUE 105 +#define IDC_OPTIONS_VOICES_SLIDER 106 +#define IDC_OPTIONS_SAMPLING 107 +#define IDC_OPTIONS_HWACC 108 +#define IDC_OPTIONS_EAX 109 +#define IDC_OPTIONS_SINGLE_VOICE 110 +#define IDC_OPTIONS_AUDIO_DEFAULT 111 +#define IDC_OPTIONS_PLAYER_VOICE 112 +#define IDC_OPTIONS_VON_VALUE 113 +#define IDC_OPTIONS_VON_SLIDER 114 +#define IDC_OPTIONS_SAMPLES_VALUE 115 +#define IDC_OPTIONS_SAMPLES_SLIDER 116 +#define IDC_OPTIONS_MIC_SENS_SLIDER 117 +#define IDC_OPTIONS_MIC_ADJUST 118 + +// microphone adjustment +#define IDC_OPTIONS_MIC_PROGRESS_BAR 1001 +#define IDC_OPTIONS_MIC_PROGRESS 1002 + +#define IDC_OPTIONS_SUBTITLES 102 +#define IDC_OPTIONS_RADIO 103 + +#define IDC_DIFF_AI_LEVEL_TEXT 1510 +#define IDC_DIFF_AI_LEVEL 1511 +#define IDC_DIFF_AI_SKILL_LABEL 1512 +#define IDC_DIFF_AI_SKILL_SLIDER 1513 +#define IDC_DIFF_AI_SKILL_VALUE 1514 +#define IDC_DIFF_AI_PRECISION_LABEL 1515 +#define IDC_DIFF_AI_PRECISION_SLIDER 1516 +#define IDC_DIFF_AI_PRECISION_VALUE 1517 +#define IDC_DIFF_PICTURE 1518 +#define IDC_DIFF_DESCRIPTION 1519 +#define IDC_DIFF_OPTIONS_GROUP 1520 +#define IDC_DIFF_REDUCED_DAMAGE 1521 +#define IDC_DIFF_GROUP_INDICATORS 1522 +#define IDC_DIFF_FRIENDLY_TAG 1523 +#define IDC_DIFF_ENEMY_TAG 1524 +#define IDC_DIFF_MINES 1525 +#define IDC_DIFF_COMMANDS 1526 +#define IDC_DIFF_WAYPOINTS 1527 +#define IDC_DIFF_WEAPON_INFO 1528 +#define IDC_DIFF_STANCE_INDICATOR 1529 +#define IDC_DIFF_STAMINA_BAR 1530 +#define IDC_DIFF_CROSSHAIR 1531 +#define IDC_DIFF_VISION_AID 1532 +#define IDC_DIFF_THIRD_PERSON 1533 +#define IDC_DIFF_CAMERA_SHAKE 1534 +#define IDC_DIFF_SCORE_TABLE 1535 +#define IDC_DIFF_KILLED_BY 1536 +#define IDC_DIFF_VON_ID 1537 +#define IDC_DIFF_EXTENDED_MAP 1538 +#define IDC_DIFF_AUTO_REPORT 1539 +#define IDC_DIFF_MULTIPLE_SAVES 1540 +//#define IDC_DIFF_SQUAD_RADAR 1541 + +// Configure display controls +#define IDC_CONFIG_DEFAULT 101 +#define IDC_CONFIG_KEYS 102 +#define IDC_CONFIG_XAXIS 103 +#define IDC_CONFIG_YAXIS 104 +#define IDC_CONFIG_YREVERSED 105 +#define IDC_CONFIG_JOYSTICK 106 +#define IDC_CONFIG_BUTTONS 107 +#define IDC_CONFIG_CONTROLS_PAGE 108 +#define IDC_CONFIG_FLOATING_ZONE 109 +#define IDC_CONFIG_MOUSE_FILTERING 110 +#define IDC_CONFIG_GEARBOX_MODE 112 +#define IDC_CONFIG_MOUSE_ACCELERATION 113 +#define IDC_CONFIG_KEY_PRESETS 114 + +// dialog for selecting default controls preset +#define IDC_CONFIG_DEFAULTCONTROLS_LIST 101 + +// Multiplayer type display controls +#define IDC_MP_TYPE_RANKED_MATCH 101 +#define IDC_MP_TYPE_PLAYER_MATCH 102 +#define IDC_MP_TYPE_SYSTEM_LINK 103 +#define IDC_MP_TYPE_FRIENDS 104 +#define IDC_MP_TYPE_DOWNLOAD 105 +#define IDC_MP_TYPE_INFO 106 +#define IDC_MP_TYPE_STATS 107 +#define IDC_MP_TYPE_SIGN_OUT 108 +#define IDC_MP_TYPE_DEDICATED_SERVER 109 +#define IDC_MP_TYPE_SERVER 110 +#define IDC_MP_TYPE_APPEAR_OFFLINE 111 + +// Xbox Live display controls +#define IDC_LIVE_QUICK_MATCH 101 +#define IDC_LIVE_CUSTOM_MATCH 102 +#define IDC_LIVE_CREATE_MATCH 103 + +// Friends dialog +#define IDC_FRIENDS_LIST 101 +#define IDC_FRIENDS_STATUS 102 + +// Friends options dialog +#define IDC_FRIENDS_PLAYER 101 +#define IDC_FRIENDS_GAME_INVITE 102 +#define IDC_FRIENDS_GAME_CANCEL 103 +#define IDC_FRIENDS_GAME_ACCEPT 104 +#define IDC_FRIENDS_GAME_DECLINE 105 +#define IDC_FRIENDS_GAME_JOIN 106 +#define IDC_FRIENDS_ACCEPT 107 +#define IDC_FRIENDS_DECLINE 108 +#define IDC_FRIENDS_STOP 109 +#define IDC_FRIENDS_CANCEL 110 +#define IDC_FRIENDS_REMOVE 111 +#define IDC_FRIENDS_VOICE 112 +#define IDC_FRIENDS_FEEDBACK 113 +#define IDC_FRIENDS_GAME_INVITE_VOICE 114 +#define IDC_FRIENDS_PLAY_MESSAGE 115 +#define IDC_FRIENDS_MISSIONS 152 +#define IDC_MULTI_BATTLEYE_FILTER 154 +#define IDC_MULTI_EXPANSIONS_FILTER 155 + +// Send voice mail dialog +#define IDC_SVM_TITLE 101 +#define IDC_SVM_PLAYER 102 +#define IDC_SVM_RECORD 103 +#define IDC_SVM_PLAY 104 +#define IDC_SVM_SEND 105 +#define IDC_SVM_PROGRESS 106 +#define IDC_SVM_TIME 107 + +// Receive voice mail dialog +#define IDC_RVM_TITLE 101 +#define IDC_RVM_PLAYER 102 +#define IDC_RVM_PLAY 103 +#define IDC_RVM_FEEDBACK 104 +#define IDC_RVM_PROGRESS 105 +#define IDC_RVM_TIME 106 + +// Xbox players dialog +#define IDC_XPLAYERS_LIST 101 +#define IDC_XPLAYERS_STATUS 102 +#define IDC_XPLAYERS_DISABLE_VOICE 103 +#define IDC_XPLAYERS_ENABLE_VOICE 104 +#define IDC_XPLAYERS_KICKOFF 105 + +// Xbox players options dialog +#define IDC_XPLAYERS_PLAYER 101 +#define IDC_XPLAYERS_ASK 102 +#define IDC_XPLAYERS_MUTE 103 +#define IDC_XPLAYERS_FEEDBACK 104 +#define IDC_XPLAYERS_CANCEL 105 +#define IDC_XPLAYERS_ASK_VOICE 107 + +// Feedback dialog +#define IDC_FEEDBACK_PLAYER 101 +#define IDC_FEEDBACK_DATE 102 +#define IDC_FEEDBACK_GREAT_SESSION 103 +#define IDC_FEEDBACK_GOOD_ATTITUDE 104 +#define IDC_FEEDBACK_BAD_NAME 105 +#define IDC_FEEDBACK_CURSING 106 +#define IDC_FEEDBACK_SCREAM 107 +#define IDC_FEEDBACK_CHEAT 108 +#define IDC_FEEDBACK_THREAT 109 +#define IDC_FEEDBACK_MSG_HARASSING 110 +#define IDC_FEEDBACK_MSG_OFFENSIVE 111 +#define IDC_FEEDBACK_MSG_SPAM 112 + +// Download content display controls +#define IDC_DOWNLOAD_CONTENT_LIST 101 + +#define IDC_DOWNLOAD_CONTENT_TITLE 101 +#define IDC_DOWNLOAD_CONTENT_TERMS 102 +#define IDC_DOWNLOAD_CONTENT_PICTURE 103 +#define IDC_DOWNLOAD_CONTENT_SHOW_PRICE 104 + +#define IDC_DOWNLOAD_CONTENT_PRICE_TITLE 101 +#define IDC_DOWNLOAD_CONTENT_PRICE 102 +#define IDC_DOWNLOAD_CONTENT_PRICE_QUESTION 103 + +#define IDC_INSTALL_CONTENT_PROGRESS 101 +#define IDC_INSTALL_CONTENT_NAME 102 +#define IDC_INSTALL_CONTENT_TIME 103 + +// Multiplayer passcode display controls +#define IDC_MP_PASSCODE_FIRST 101 + +// Multiplayer display controls +#define IDC_MULTI_TITLE 101 +#define IDC_MULTI_SESSIONS 102 +//#define IDC_MULTI_REMOTE 103 //Renamed to IDC_MULTI_TAB_DIRECT_CONNECT +//#define IDC_MULTI_NEW 104 //Renamed to IDC_MULTI_TAB_HOST_SERVER +#define IDC_MULTI_JOIN 105 +#define IDC_MULTI_NOTEBOOK 106 +#define IDC_MULTI_PASSWORD 107 +#define IDC_MULTI_PORT 108 +#define IDC_MULTI_SERVER_ICON 111 +#define IDC_MULTI_SERVER_COLUMN 112 +#define IDC_MULTI_MISSION_ICON 113 +#define IDC_MULTI_MISSION_COLUMN 114 +#define IDC_MULTI_STATE_ICON 115 +#define IDC_MULTI_STATE_COLUMN 116 +#define IDC_MULTI_PLAYERS_ICON 117 +#define IDC_MULTI_PLAYERS_COLUMN 118 +#define IDC_MULTI_PING_ICON 119 +#define IDC_MULTI_PING_COLUMN 120 +#define IDC_MULTI_PROGRESS 121 +#define IDC_MULTI_INTERNET 122 +#define IDC_MULTI_REFRESH 123 +#define IDC_MULTI_FILTER 124 +#define IDC_MULTI_SERVER_FILTER 125 +#define IDC_MULTI_MISSION_FILTER 126 +#define IDC_MULTI_PLAYERS_FILTER 127 +#define IDC_MULTI_PING_FILTER 128 +#define IDC_MP_HOST 129 +#define IDC_MP_TYPE 130 +#define IDC_MP_MISSION 131 +#define IDC_MP_ISLAND 132 +#define IDC_MP_STATE 133 +#define IDC_MP_TIMELEFT 134 +#define IDC_MP_SLOTS_PUBLIC 135 +#define IDC_MP_SLOTS_PRIVATE 136 +#define IDC_MP_NO_SESSION 137 +#define IDC_MP_DIFFICULTY 138 +#define IDC_MP_LANGUAGE 139 +#define IDC_MULTI_GAMETYPE_ICON 140 +#define IDC_MULTI_GAMETYPE_COLUMN 141 +#define IDC_MP_PING 142 +#define IDC_MP_PASSWORD 143 +#define IDC_MP_PLATFORM 144 +#define IDC_MP_COUNTRY 145 +#define IDC_MP_VERSION 146 +#define IDC_MP_VERSION_REQUIRED 147 +#define IDC_MP_MODS 148 +#define IDC_MP_PLAYERS_ROW 149 +#define IDC_MULTI_PASSWORDED_FILTER 150 +#define IDC_MULTI_FULL_FILTER 151 +#define IDC_MULTI_TYPE_FILTER 152 +#define IDC_MP_NEXT_SESSION 153 +#define IDC_MULTI_BATTLEYE_FILTER 154 +#define IDC_MULTI_EXPANSIONS_FILTER 155 +#define IDC_MULTI_FAVORITE_COLUMN 156 +#define IDC_MULTI_FAVORITE_ICON 157 +#define IDC_MULTI_SERVER_COUNT 158 +#define IDC_MULTI_TAB_INTERNET 159 +#define IDC_MULTI_TAB_RECENT 160 +#define IDC_MULTI_TAB_LAN 161 +#define IDC_MULTI_TAB_FRIENDS 162 +#define IDC_MULTI_TAB_OFFICIAL 163 //Changed 164 to 163 +#define IDC_MULTI_TAB_QUICK_PLAY 164 //IDC_MULTI_QUICK_PLAY renamed to IDC_MULTI_TAB_OFFICIAL, changed to 164 +#define IDC_MULTI_TAB_SERVERS 165 //IDC_MULTI_SERVERS renamed to IDC_MULTI_TAB_SERVERS, changed to 165 +#define IDC_MULTI_TAB_DIRECT_CONNECT 166 //IDC_MULTI_REMOTE 103 renamed and changed to IDC_MULTI_TAB_DIRECT_CONNECT +#define IDC_MULTI_TAB_HOST_SERVER 167 //IDC_MULTI_NEW 104 renamed and changed to IDC_MULTI_TAB_HOST_SERVER +#define IDC_MULTI_LAUNCHER 168 //Launcher button +#define IDC_MP_FILEPATCHING 169 + +//MP Quick Play dialogue +#define IDC_MP_QUICK_GAME_TYPE 110 +#define IDC_MP_QUICK_MAX_PING 111 +#define IDC_MP_QUICK_BEST_SERVER 112 +#define IDC_MP_QUICK_FIND_SERVER 113 +#define IDC_MP_QUICK_SHOW_SERVERS 114 +#define IDC_MP_QUICK_SHOW_SERVERS 114 +#define IDC_MP_QUICK_MODE_TITLE 115 +#define IDC_MP_QUICK_MODE_PICTURE 116 +#define IDC_MP_QUICK_MODE_DESCRIPTION 117 +#define IDC_MP_QUICK_MODE_BACKGROUND 118 + +//Server Search dialogue +#define IDC_MP_SERVER_SEARCH_STATUS 101 +#define IDC_MP_SERVER_SEARCH_PROGRESS 102 + +#define IDC_OPTIMATCH_FILTER_SPEED 101 +#define IDC_OPTIMATCH_FILTER_TYPE 102 +#define IDC_OPTIMATCH_FILTER_MIN_PLAYERS 103 +#define IDC_OPTIMATCH_FILTER_MAX_PLAYERS 104 +#define IDC_OPTIMATCH_FILTER_LANGUAGE 105 +#define IDC_OPTIMATCH_FILTER_DIFFICULTY 106 + +#define IDC_PASSWORD 101 + +#define IDC_IP_ADDRESS 101 +#define IDC_IP_PORT 102 + +#define IDC_PORT_PORT 101 + +#define IDC_FILTER_SERVER 101 +#define IDC_FILTER_MISSION 102 +#define IDC_FILTER_MAXPING 103 +#define IDC_FILTER_MINPLAYERS 104 +#define IDC_FILTER_MAXPLAYERS 105 +#define IDC_FILTER_FULL 106 +#define IDC_FILTER_PASSWORDED 107 +#define IDC_FILTER_DEFAULT 108 +#define IDC_FILTER_TYPE 109 +#define IDC_FILTER_BATTLEYE 110 +#define IDC_FILTER_EXPANSIONS 111 +#define IDC_FILTER_MONETIZED 112 + +#define IDC_CLIENT_TEXT 101 +#define IDC_CLIENT_PLAYERS 102 +#define IDC_CLIENT_PROGRESS 103 + +#define IDC_SERVER_ISLAND 101 +#define IDC_SERVER_MISSION 102 +#define IDC_SERVER_EDITOR 103 +#define IDC_SERVER_DIFF 104 +#define IDC_SERVER_PLAYERS 105 +#define IDC_SERVER_GAMETYPE 106 +#define IDC_SERVER_SLOTS 107 +#define IDC_SERVER_SLOTS_PRIVATE 108 +#define IDC_SERVER_SLOTS_PUBLIC 109 +#define IDC_SERVER_MIN_PLAYERS 110 +#define IDC_SERVER_MAX_PLAYERS 111 +#define IDC_SERVER_SLOTS_PRIVATE_TITLE 112 +#define IDC_SERVER_SLOTS_PRIVATE_TEXT 112 +#define IDC_SERVER_SLOTS_PUBLIC_TITLE 113 +#define IDC_SERVER_SLOTS_PUBLIC_TEXT 113 +#define IDC_SERVER_SLOTS_PUBLIC_VALUE 114 +#define IDC_SERVER_SLOTS_PRIVATE_VALUE 115 +#define IDC_SERVER_VOTED_MISSIONS 116 +#define IDC_SERVER_PLAYERS_TITLE 117 +#define IDC_SERVER_TIMEOUT 118 +#define IDC_SERVER_VOTED_DIFFICULTY 119 +#define IDC_SERVER_DELETE 120 +#define IDC_SERVER_COPY 121 +#define IDC_SERVER_EDIT 122 +#define IDC_SERVER_LOAD 123 +#define IDC_SERVER_PRIVATE_SLOTS_TITLE 124 +#define IDC_SERVER_PRIVATE_SLOTS_VALUE 125 +#define IDC_SERVER_PRIVATE_SLOTS 126 +#define IDC_SERVER_MAXIMUM_SLOTS_TITLE 127 +#define IDC_SERVER_MAXIMUM_SLOTS 128 +#define IDC_SERVER_MAXIMUM_SLOTS_VALUE 129 +#define IDC_SERVER_MI_OVERVIEW 130 +#define IDC_SERVER_MI_GAMETYPE 131 +#define IDC_SERVER_MI_MAX_PLAYERS 132 +#define IDC_SERVER_MI_RESPAWN 133 +#define IDC_SERVER_MI_MIN_PLAYERS 134 +#define IDC_SERVER_SHOW_MISSION_WORKSHOP 135 +#define IDC_SERVER_SHOW_GAME_WORKSHOP 136 +#define IDC_SERVER_MI_NAME 137 +#define IDC_SERVER_MI_AUTHOR 138 +#define IDC_SERVER_MI_PICTURE 139 +#define IDC_SERVER_MI_DESCRIPTION 140 +#define IDC_SERVER_LOADING_PICTURE 141 +#define IDC_SERVER_GAME_OR_MISSION_WORKSHOP 142 +#define IDC_SERVER_ISLAND_TITLE 143 +#define IDC_SERVER_MISSION_TITLE 144 +#define IDC_SERVER_DIFF_INDICATOR 145 +#define IDC_SERVER_PURCHASE_BUTTON 146 + + +#define IDC_REQUIRED_BATTLEYE 201 + +// _VBS3 +#define IDC_AAR_SERVER 121 +#define IDC_AAR_SERVER_FILES 122 +#define IDC_AAR_DOWNLOADPROGRESS 123 +#define IDC_AAR_DOWNLOADSTART 124 +#define IDC_AAR_DOWNLOADSTOP 125 + +// Host settings dialog +#define IDC_HOST_NAME 101 +#define IDC_HOST_PASSWORD 102 +#define IDC_HOST_MAX_PLAYERS 103 +#define IDC_HOST_PRIVATE 104 +#define IDC_HOST_PORT 105 +#define IDC_HOST_PORT_WARNING 106 +#define IDC_HOST_UPNP 107 + +#define IDC_DED_SERVER_SLOTS_PUBLIC 101 +#define IDC_DED_SERVER_SLOTS_PUBLIC_TITLE 102 +#define IDC_DED_SERVER_SLOTS_PUBLIC_VALUE 103 +#define IDC_DED_SERVER_SLOTS_PRIVATE 104 +#define IDC_DED_SERVER_SLOTS_PRIVATE_TITLE 105 +#define IDC_DED_SERVER_SLOTS_PRIVATE_VALUE 106 + +#define IDC_WIZT_TEMPLATES 101 +#define IDC_WIZT_OVERVIEW 102 +#define IDC_WIZT_NAME 103 + +#define IDC_WIZM_EDIT 101 + +#define IDC_SRVSETUP_PLAYERS 101 +#define IDC_SRVSETUP_UNITS 102 +#define IDC_SRVSETUP_ISLAND 103 +#define IDC_SRVSETUP_NAME 104 +#define IDC_SRVSETUP_DESC 105 +#define IDC_SRVSETUP_ASSIGN 106 +#define IDC_SRVSETUP_UNASSIGN 107 +#define IDC_SRVSETUP_RANDOM 108 +#define IDC_SRVSETUP_PARAM1 109 +#define IDC_SRVSETUP_PARAM1_TEXT 110 +#define IDC_SRVSETUP_PARAM2 111 +#define IDC_SRVSETUP_PARAM2_TEXT 112 + +#define IDC_SRVSIDE_NAME 101 +#define IDC_SRVSIDE_ISLAND 102 +#define IDC_SRVSIDE_POOL 103 +#define IDC_SRVSIDE_WEST 104 +#define IDC_SRVSIDE_EAST 105 +#define IDC_SRVSIDE_RESIST 106 +#define IDC_SRVSIDE_CIVIL 107 +#define IDC_SRVSIDE_WEST_TEXT 108 +#define IDC_SRVSIDE_EAST_TEXT 109 +#define IDC_SRVSIDE_RESIST_TEXT 110 +#define IDC_SRVSIDE_CIVIL_TEXT 111 +#define IDC_SRVSIDE_DEFAULT 112 +#define IDC_SRVSIDE_PARAM1 113 +#define IDC_SRVSIDE_PARAM1_TEXT 114 +#define IDC_SRVSIDE_PARAM2 115 +#define IDC_SRVSIDE_PARAM2_TEXT 116 +#define IDC_SRVSIDE_PLAYERS 117 + +#define IDC_MPROLE_TITLE 101 +#define IDC_MPROLE_NAME 102 +#define IDC_MPROLE_ISLAND 103 +#define IDC_MPROLE_DESC 104 +#define IDC_MPROLE_POOL 105 +#define IDC_MPROLE_POOL_TEXT 106 +#define IDC_MPROLE_ROLES 107 +#define IDC_MPROLE_DEFAULT 108 +#define IDC_MPROLE_ENABLE 109 +#define IDC_MPROLE_SIDES 110 +#define IDC_MPROLE_ENABLE_ALL 111 + +#define IDC_CLIENT_GAME 101 + +#define IDC_CLIENTMAP_START1 101 +#define IDC_CLIENTMAP_START2 102 + +#define IDC_CLIENT_READY_PLAYERS 120 +#define IDC_CLIENT_READY_PLAYERS_TITLE 121 +#define IDC_CLIENT_READY_TIMEOUT 122 + +#define IDC_SERVER_READY_PLAYERS 120 +#define IDC_SERVER_READY_PLAYERS_TITLE 121 + +#define IDC_MP_PLAYERS 101 +#define IDC_MP_PL 102 +#define IDC_MP_PL_NAME 103 +#define IDC_MP_PL_MAIL 104 +#define IDC_MP_PL_ICQ 105 +#define IDC_MP_PL_REMARK 106 +#define IDC_MP_SQ 107 +#define IDC_MP_SQ_NAME 108 +#define IDC_MP_SQ_ID 109 +#define IDC_MP_SQ_MAIL 110 +#define IDC_MP_SQ_WEB 111 +#define IDC_MP_SQ_PICTURE 112 +#define IDC_MP_SQ_TITLE 113 +#define IDC_MP_KICKOFF 114 +#define IDC_MP_BAN 115 +#define IDC_MP_PL_MISSION 116 +#define IDC_MP_PL_ISLAND 117 +#define IDC_MP_PL_TIME 118 +#define IDC_MP_PL_MINPING 119 +#define IDC_MP_PL_AVGPING 120 +#define IDC_MP_PL_MAXPING 121 +#define IDC_MP_PL_MINBAND 122 +#define IDC_MP_PL_AVGBAND 123 +#define IDC_MP_PL_MAXBAND 124 +#define IDC_MP_PL_DESYNC 125 +#define IDC_MP_PL_REST 126 +#define IDC_MP_MUTE 127 + +#define IDC_CLIENT_WAIT_TITLE 130 // is used together with MP_PL + +#define IDC_MPSETUP_NAME 101 +#define IDC_MPSETUP_ISLAND 102 +#define IDC_MPSETUP_DESC 103 +#define IDC_MPSETUP_WEST 104 +#define IDC_MPSETUP_EAST 105 +#define IDC_MPSETUP_GUERRILA 106 +#define IDC_MPSETUP_CIVILIAN 107 +#define IDC_MPSETUP_ROLES_TITLE 108 +#define IDC_MPSETUP_ROLES 109 +#define IDC_MPSETUP_PARAM1_TITLE 110 +#define IDC_MPSETUP_PARAM1 111 +#define IDC_MPSETUP_PARAM2_TITLE 112 +#define IDC_MPSETUP_PARAM2 113 +#define IDC_MPSETUP_POOL 114 +#define IDC_MPSETUP_MESSAGE 115 +#define IDC_MPSETUP_KICK 116 +#define IDC_MPSETUP_ENABLE_ALL 117 +#define IDC_MPSETUP_LOCK 118 +#define IDC_MPSETUP_SIDE 119 +#define IDC_MPSETUP_POOL_TITLE 120 +#define IDC_MPSETUP_TIMEOUT 121 +#define IDC_MPSETUP_PLAYERS 122 +#define IDC_MPSETUP_FRIENDS 123 +#define IDC_MPSETUP_ADVANCED 124 +#define IDC_MPSETUP_GAMERCARD 125 +#define IDC_MPSETUP_PARTYGUI 126 +#define IDC_MPSETUP_ASSIGNROLE 127 +#define IDC_MPSETUP_PARAMS 128 +#define IDC_MPSETUP_DSINTERFACE 129 +#define IDC_MPSETUP_MISSION_WORKSHOP 130 +#define IDC_MPSETUP_LOGIC 131 +#define IDC_MPSETUP_VIRTUAL 132 + +#define IDC_MPSETUP_MSG_MESSAGE 101 +#define IDC_MPSETUP_MSG_PROGRESS 102 +#define IDC_MPSETUP_MSG_TIME 103 + +#define IDC_PROGRESS_MSG_MESSAGE 101 +#define IDC_PROGRESS_MSG_PROGRESS 102 +#define IDC_PROGRESS_MSG_TIME 103 + +#define IDC_SERVER_SETTINGS_PARAM1_TEXT 101 +#define IDC_SERVER_SETTINGS_PARAM1 102 +#define IDC_SERVER_SETTINGS_PARAM2_TEXT 103 +#define IDC_SERVER_SETTINGS_PARAM2 104 +#define IDC_SERVER_SETTINGS_AI 105 +#define IDC_SERVER_SETTINGS_ASSIGN 106 + +#define IDC_SERVER_ADVANCED_ROLES 101 +#define IDC_SERVER_ADVANCED_DISABLE_ALL 102 +#define IDC_SERVER_ADVANCED_AUTOASSIGN 103 + +#define IDC_SERVER_SELECT_PLAYERS 101 + +// Main map display controls +#define IDC_MAP_WATCH 101 +#define IDC_MAP_COMPASS 102 +#define IDC_MAP_WALKIE_TALKIE 103 +#define IDC_MAP_NOTEPAD 104 +#define IDC_MAP_WARRANT 105 +#define IDC_MAP_GPS 106 +#define IDC_MAP_TEXTURES 107 +#define IDC_MAP_BRIEFING_SHOW 108 +#define IDC_MAP_BRIEFING_PAGE 109 +#define IDC_MAP_PREV_MARKER 110 +#define IDC_MAP_NEXT_MARKER 111 +#define IDC_MAP_GEAR 112 + +// Diary display controls +#define IDC_DIARY 101 +#define IDC_DIARY_INDEX 102 +#define IDC_DIARY_PAGE 103 +#define IDC_DIARY_ADD 104 + +// Select island display controls +#define IDC_SELECT_ISLAND 101 +#define IDC_SELECT_ISLAND_NOTEBOOK 102 +#define IDC_SELECT_ISLAND_WIZARD 103 +#define IDC_SELECT_ISLAND_EDITOR 104 +#define IDC_SELECT_ISLAND_EDITOR_OLD 105 +//Redefined in Eden +//IDC_SELECT_ISLAND_EDITOR_OLD 105 +//IDC_SELECT_ISLAND_3DEN 106 +#define IDC_SELECT_ISLAND_BUTTON_PURCHASE 107 + +// Custom arcade display controls +#define IDC_CUST_GAME 101 +#define IDC_CUST_PLAY 102 +#define IDC_CUST_EDIT 103 +#define IDC_CUST_DELETE 104 +#define IDC_CUST_EDIT_2 105 + +#define IDC_MISSION_PARAMS_LABEL 101 +#define IDC_MISSION_PARAMS_COMBO 102 + +#define IDC_ARCMAP_LOAD 101 +#define IDC_ARCMAP_SAVE 102 +#define IDC_ARCMAP_CLEAR 103 +#define IDC_ARCMAP_MODE 104 +#define IDC_ARCMAP_INTEL 105 +#define IDC_ARCMAP_MERGE 106 +#define IDC_ARCMAP_PREVIEW 107 +#define IDC_ARCMAP_CONTINUE 108 +#define IDC_ARCMAP_SECTION 109 +#define IDC_ARCMAP_IDS 111 +#define IDC_ARCMAP_TEXTURES 112 +#define IDC_ARCMAP_MISSION_NAME 113 +#define IDC_ARCMAP_MAP 114 +#define IDC_ARCMAP_BACKGROUND 115 +#define IDC_ARCMAP_LAYOUT 116 +#define IDC_ARCMAP_PUBLISH_MISSION 117 + +#define IDC_ARCUNIT_TITLE 101 +#define IDC_ARCUNIT_SIDE 102 +#define IDC_ARCUNIT_VEHICLE 103 +#define IDC_ARCUNIT_RANK 104 +#define IDC_ARCUNIT_CTRL 105 +#define IDC_ARCUNIT_CLASS 107 +#define IDC_ARCUNIT_HEALTH 108 +#define IDC_ARCUNIT_FUEL 109 +#define IDC_ARCUNIT_AMMO 110 +#define IDC_ARCUNIT_AZIMUT 111 +#define IDC_ARCUNIT_SPECIAL 112 +#define IDC_ARCUNIT_AGE 113 +#define IDC_ARCUNIT_AZIMUT_PICTURE 114 +#define IDC_ARCUNIT_PLACE 115 +#define IDC_ARCUNIT_PRESENCE 116 +#define IDC_ARCUNIT_PRESENCE_COND 117 +#define IDC_ARCUNIT_TEXT 118 +#define IDC_ARCUNIT_LOCK 119 +#define IDC_ARCUNIT_INIT 120 +#define IDC_ARCUNIT_SKILL 121 +#define IDC_ARCUNIT_DESC 122 +#define IDC_ARCUNIT_FACTION 123 +#define IDC_ARCUNIT_ELEVATION 124 +#define IDC_ARCUNIT_EQUIP 125 +#define IDC_ARCUNIT_RADIUS 126 +#define IDC_ARCUNIT_ARGUMENTS 127 +#define IDC_ARCUNIT_CATEGORY 128 +#define IDC_ARCUNIT_SETTINGS 2301 + +#define IDC_ARCGRP_SIDE 101 +#define IDC_ARCGRP_TYPE 102 +#define IDC_ARCGRP_NAME 103 +#define IDC_ARCGRP_AZIMUT 104 +#define IDC_ARCGRP_AZIMUT_PICTURE 105 +#define IDC_ARCGRP_FACTION 106 +#define IDC_ARCGRP_UNITS_LIST 107 + +#define IDC_ARCWP_TITLE 101 +#define IDC_ARCWP_TYPE 102 +#define IDC_ARCWP_SEQ 103 +#define IDC_ARCWP_DESC 104 +#define IDC_ARCWP_SEMAPHORE 105 +#define IDC_ARCWP_FORM 106 +#define IDC_ARCWP_SPEED 107 +#define IDC_ARCWP_COMBAT 108 +#define IDC_ARCWP_PLACE 109 +#define IDC_ARCWP_EFFECTS 110 +#define IDC_ARCWP_TIMEOUT_MIN 111 +#define IDC_ARCWP_TIMEOUT_MAX 112 +#define IDC_ARCWP_TIMEOUT_MID 113 +#define IDC_ARCWP_HOUSEPOS 114 +#define IDC_ARCWP_HOUSEPOSTEXT 115 +#define IDC_ARCWP_EXPACTIV 116 +#define IDC_ARCWP_SHOW 117 +#define IDC_ARCWP_EXPCOND 118 +#define IDC_ARCWP_SCRIPT 119 +#define IDC_ARCWP_PREC 120 +#define IDC_ARCWP_HEIGHT 121 +#define IDC_ARCWP_HEIGHTTEXT 122 +#define IDC_ARCWP_SCRIPTTEXT 123 +#define IDC_ARCWP_CATEGORY 124 + +#define IDC_ARCWP_ARGUMENTS 125 +#define IDC_ARCWP_ARGUMENTSTEXT 126 +#define IDC_ARCWP_NAME 127 + +#define IDC_ARCEFF_SOUND 103 +#define IDC_ARCEFF_VOICE 104 +#define IDC_ARCEFF_SOUND_ENV 105 +#define IDC_ARCEFF_SOUND_DET 106 +#define IDC_ARCEFF_MUSIC 107 +#define IDC_ARCEFF_TITTYPE 108 +#define IDC_ARCEFF_TITEFF 109 +#define IDC_ARCEFF_TITTEXT 110 +#define IDC_ARCEFF_TITRES 111 +#define IDC_ARCEFF_TITOBJ 112 +//#define IDC_ARCEFF_PLAYERONLY 113 +#define IDC_ARCEFF_CONDITION 113 +#define IDC_ARCEFF_TEXT_TITTEXT 114 + +#define IDC_ARCSENS_TITLE 101 +#define IDC_ARCSENS_A 102 +#define IDC_ARCSENS_B 103 +#define IDC_ARCSENS_ANGLE 104 +#define IDC_ARCSENS_ACTIV 105 +#define IDC_ARCSENS_PRESENCE 106 +#define IDC_ARCSENS_REPEATING 107 +#define IDC_ARCSENS_INTERRUPT 108 +#define IDC_ARCSENS_TIMEOUT_MIN 109 +#define IDC_ARCSENS_TIMEOUT_MAX 110 +#define IDC_ARCSENS_TIMEOUT_MID 111 +#define IDC_ARCSENS_TYPE 112 +#define IDC_ARCSENS_OBJECT 113 +#define IDC_ARCSENS_TEXT 114 +#define IDC_ARCSENS_AGE 115 +#define IDC_ARCSENS_EFFECTS 116 +#define IDC_ARCSENS_EXPCOND 117 +#define IDC_ARCSENS_EXPACTIV 118 +#define IDC_ARCSENS_EXPDESACTIV 119 +#define IDC_ARCSENS_RECT 120 +#define IDC_ARCSENS_NAME 121 + +#define IDC_ARCMARK_TITLE 101 +#define IDC_ARCMARK_NAME 102 +#define IDC_ARCMARK_MARKER 103 +#define IDC_ARCMARK_TYPE 104 +#define IDC_ARCMARK_COLOR 105 +#define IDC_ARCMARK_A 106 +#define IDC_ARCMARK_B 107 +#define IDC_ARCMARK_ANGLE 108 +#define IDC_ARCMARK_TYPE_TEXT 109 +#define IDC_ARCMARK_FILL 110 +#define IDC_ARCMARK_TEXT 111 + +#define IDC_INTEL_RESISTANCE 101 +#define IDC_INTEL_MONTH 102 +#define IDC_INTEL_DAY 103 +#define IDC_INTEL_HOUR 104 +#define IDC_INTEL_MINUTE 105 +#define IDC_INTEL_BRIEFING_NAME 106 +#define IDC_INTEL_BRIEFING_DESC 107 +#define IDC_INTEL_WEATHER 108 +#define IDC_INTEL_FOG 109 +#define IDC_INTEL_WEATHER_FORECAST 110 +#define IDC_INTEL_FOG_FORECAST 111 +#define IDC_INTEL_YEAR 112 +//added by MUF - new intel dialog-------------------------- +#define IDC_INTEL_WEATHER_TB 113 +#define IDC_INTEL_WEATHER_FORECAST_TB 114 + +#define IDC_INTEL_FOG_CB 115 +#define IDC_INTEL_FOG_TB 116 +#define IDC_INTEL_FOG_FORECAST_TB 117 + +#define IDC_INTEL_RAIN_CB 118 +#define IDC_INTEL_RAIN 119 +#define IDC_INTEL_RAIN_TB 120 +#define IDC_INTEL_RAIN_FORECAST 121 +#define IDC_INTEL_RAIN_FORECAST_TB 122 + +#define IDC_INTEL_LIGHTN_CB 123 +#define IDC_INTEL_LIGHTN 124 +#define IDC_INTEL_LIGHTN_TB 125 +#define IDC_INTEL_LIGHTN_FORECAST 126 +#define IDC_INTEL_LIGHTN_FORECAST_TB 127 + +#define IDC_INTEL_WAVES_CB 128 +#define IDC_INTEL_WAVES 129 +#define IDC_INTEL_WAVES_TB 130 +#define IDC_INTEL_WAVES_FORECAST 131 +#define IDC_INTEL_WAVES_FORECAST_TB 132 + +#define IDC_INTEL_WIND_CB 133 +#define IDC_INTEL_STRENGTH 134 +#define IDC_INTEL_STRENGTH_TB 135 +#define IDC_INTEL_STRENGTH_FORECAST 136 +#define IDC_INTEL_STRENGTH_FORECAST_TB 137 + +#define IDC_INTEL_GUSTS 138 +#define IDC_INTEL_GUSTS_TB 139 +#define IDC_INTEL_GUSTS_FORECAST 140 +#define IDC_INTEL_GUSTS_FORECAST_TB 141 + +#define IDC_INTEL_WINDDIR 142 +#define IDC_INTEL_WINDDIR_TB 143 +#define IDC_INTEL_WINDDIR_FORECAST 144 +#define IDC_INTEL_WINDDIR_FORECAST_TB 145 + +#define IDC_INTEL_CHNGTIME 146 +#define IDC_INTEL_CHNGTIME_HOUR_TB 147 +#define IDC_INTEL_CHNGTIME_MIN_TB 148 + +#define IDC_INTEL_CHNGTIME_HLEFT 149 +#define IDC_INTEL_CHNGTIME_HMIDDLE 150 +#define IDC_INTEL_CHNGTIME_HRIGHT 151 + +//added by MUF - new intel dialog-------------------------- + +// Dialog for choosing Editor's layout +#define IDC_LAYOUT_LIST 101 +#define IDC_LAYOUT_PICTURE 102 + +// Chat +#define IDC_CHANNEL 101 +#define IDC_CHANNEL_VOICE 102 + +#define IDC_CHAT 101 + +#define IDC_VOICE_CHAT 101 + +// Save / load template +#define IDC_TEMPL_NAME 101 +#define IDC_TEMPL_TITLE 102 +#define IDC_TEMPL_MODE 103 +#define IDC_TEMPL_ISLAND 104 + +// publish / update to Steam workshop +#define IDC_PUBLISH_STEAM_TITLE 101 +#define IDC_PUBLISH_STEAM_TAGS 102 +#define IDC_PUBLISH_STEAM_PICTURE 103 +#define IDC_PUBLISH_STEAM_DESCRIPTION 104 +#define IDC_PUBLISH_STEAM_MISSION_LIST 105 +#define IDC_PUBLISH_STEAM_VISIBILITY 106 +#define IDC_PUBLISH_STEAM_CHANGE_NOTES 107 +#define IDC_PUBLISH_STEAM_PREVIEW_FILE 108 +#define IDC_PUBLISH_CHECKBOX_LICENCE 109 +#define IDC_PUBLISH_TEXT_MISSION_SIZE 110 +#define IDC_PUBLISH_TEXT_QUOTA 111 +#define IDC_PUBLISH_BUTTON_PUBLISH 112 +#define IDC_PUBLISH_BUTTON_UPDATE 113 +#define IDC_PUBLISH_BUTTON_DELETE 114 +#define IDC_PUBLISH_BUTTON_EDIT_TAGS 115 +#define IDC_PUBLISH_BUTTON_WORKSHOP 116 +#define IDC_PUBLISH_BUTTON_WORKSHOP_LICENCE 117 +#define IDC_PUBLISH_BUTTON_SELECT_PREVIEW 118 +#define IDC_PUBLISH_BUTTON_DEFAULT_PREVIEW 119 +#define IDC_PUBLISH_STORAGE_SLIDER 120 +// group that is hidden when new mission is selected and shown when already uploaded mission is selected +#define IDC_PUBLISH_STEAM_HIDE_NEW_MISSION 121 +// group that is shown when new mission is selected and hidden when already uploaded mission is selected +#define IDC_PUBLISH_STEAM_SHOW_NEW_MISSION 122 + +// publish / update to Steam workshop - tags dialog +#define IDC_PUBLISH_STEAM_TAGS_AVAILABLE 101 +#define IDC_PUBLISH_STEAM_TAGS_SELECTED 102 +#define IDC_PUBLISH_STEAM_TAGS_ADD 103 +#define IDC_PUBLISH_STEAM_TAGS_REMOVE 104 +#define IDC_PUBLISH_STEAM_TAGS_NEXT 105 +#define IDC_PUBLISH_STEAM_TAGS_BACK 106 +#define IDC_PUBLISH_STEAM_TAGS_TITLE 107 + +// select file dialog +#define IDC_FILE_SELECT_PATH 101 +#define IDC_FILE_SELECT_DIR_TREE 102 +#define IDC_FILE_SELECT_FILE_LIST 103 +#define IDC_FILE_SELECT_PREVIEW 104 + + +//Login display +#define IDC_LOGIN_USER_LIST 101 +#define IDC_LOGIN_EDIT 102 +#define IDC_LOGIN_NEW_USER 103 +#define IDC_LOGIN_DELETE 104 +#define IDC_LOGIN_NAME 105 +#define IDC_LOGIN_FACE 106 +#define IDC_LOGIN_SPEAKER 107 +#define IDC_LOGIN_PITCH 108 +#define IDC_LOGIN_HEAD 109 +#define IDC_LOGIN_GLASSES 110 +#define IDC_LOGIN_ID 111 +#define IDC_LOGIN_SQUAD 112 +#define IDC_LOGIN_SQUAD_TEXT 113 +#define IDC_LOGIN_DISCARD 114 +#define IDC_LOGIN_TAB_AVATAR 115 +#define IDC_LOGIN_TAB_UNIT 116 +#define IDC_LOGIN_UNIT_SELECT 117 +#define IDC_LOGIN_UNIT_LOGO 118 +#define IDC_LOGIN_UNIT_NAME 119 +#define IDC_LOGIN_UNIT_MOTTO 120 +#define IDC_LOGIN_UNIT_DESCRIPTION 121 +#define IDC_LOGIN_ID_TEXT 122 +#define IDC_LOGIN_REFRESH 123 + +// Interrupt display +#define IDC_INT_OPTIONS 101 +#define IDC_INT_LOAD 102 +#define IDC_INT_SAVE 103 +#define IDC_INT_ABORT 104 +#define IDC_INT_RETRY 105 +#define IDC_INT_TITLE 106 +#define IDC_INT_SETTINGS 107 +#define IDC_INT_FRIENDS 108 +#define IDC_INT_PLAYERS 109 +#define IDC_INT_APPEAR_OFFLINE 110 +#define IDC_INT_MISSION 111 +#define IDC_INT_SIGN_IN_STATUS 112 +#define IDC_INT_EDIT_MAP 113 +#define IDC_INT_EDIT_3D 114 +#define IDC_INT_EDIT_PREVIEW 115 +#define IDC_INT_EDIT_REALTIME 116 +#define IDC_INT_RESTART 117 +#define IDC_INT_DIARY 118 +#define IDC_INT_REVERT 119 +#define IDC_INT_MISSIONNAME 120 +#define IDC_INT_TRAFFIC_LIGHT 121 +#define IDC_INT_FIELD_MANUAL 122 + +// Interrupt revert display +#define IDC_INT_REVERT_TYPE 101 + +// Select save display +#define IDC_SELECT_SAVE_SLOTS 101 + +// Mission end display +#define IDC_ME_SUBTITLE 101 +#define IDC_ME_QUOTATION 102 +#define IDC_ME_AUTHOR 103 +#define IDC_ME_RETRY 104 +#define IDC_ME_LOAD 105 +#define IDC_ME_RESTART 106 +#define IDC_ME_TEAM_SWITCH 107 + +// Get ready display +#define IDC_GETREADY_NAME 101 +#define IDC_GETREADY_DESC 102 +#define IDC_GETREADY_PRIMARY 105 +#define IDC_GETREADY_SECONDARY 106 +#define IDC_GETREADY_PLAYER 107 +#define IDC_GETREADY_DATE 108 +#define IDC_GETREADY_MODE 110 +#define IDC_GETREADY_PRIMARY_TEXT 111 +#define IDC_GETREADY_SECONDARY_TEXT 112 +#define IDC_GETREADY_EDITMODE 113 +#define IDC_GETREADY_TITLE 114 + +#define IDC_GEAR_UNIT 101 +#define IDC_GEAR_SKILL 102 +#define IDC_GEAR_VEHICLE 103 +#define IDC_GEAR_POOL 105 +#define IDC_GEAR_OVERVIEW 106 +#define IDC_GEAR_SLOT_PRIMARY 107 +#define IDC_GEAR_SLOT_SECONDARY 108 +#define IDC_GEAR_SLOT_ITEM1 109 +#define IDC_GEAR_SLOT_ITEM2 110 +#define IDC_GEAR_SLOT_ITEM3 111 +#define IDC_GEAR_SLOT_ITEM4 112 +#define IDC_GEAR_SLOT_ITEM5 113 +#define IDC_GEAR_SLOT_ITEM6 114 +#define IDC_GEAR_SLOT_ITEM7 115 +#define IDC_GEAR_SLOT_ITEM8 116 +#define IDC_GEAR_SLOT_ITEM9 117 +#define IDC_GEAR_SLOT_ITEM10 118 +#define IDC_GEAR_SLOT_ITEM11 119 +#define IDC_GEAR_SLOT_ITEM12 120 +#define IDC_GEAR_SLOT_HANDGUN 121 +#define IDC_GEAR_SLOT_HANGUN_ITEM1 122 +#define IDC_GEAR_SLOT_HANGUN_ITEM2 123 +#define IDC_GEAR_SLOT_HANGUN_ITEM3 124 +#define IDC_GEAR_SLOT_HANGUN_ITEM4 125 +#define IDC_GEAR_SLOT_HANGUN_ITEM5 126 +#define IDC_GEAR_SLOT_HANGUN_ITEM6 127 +#define IDC_GEAR_SLOT_HANGUN_ITEM7 128 +#define IDC_GEAR_SLOT_HANGUN_ITEM8 129 +#define IDC_GEAR_SLOT_SPECIAL1 130 +#define IDC_GEAR_SLOT_SPECIAL2 131 +#define IDC_GEAR_REARM 132 +#define IDC_GEAR_CONTINUE 133 +#define IDC_GEAR_SLOT_INVENTORY1 134 +#define IDC_GEAR_SLOT_INVENTORY2 135 +#define IDC_GEAR_SLOT_INVENTORY3 136 +#define IDC_GEAR_SLOT_INVENTORY4 137 +#define IDC_GEAR_SLOT_INVENTORY5 138 +#define IDC_GEAR_SLOT_INVENTORY6 139 +#define IDC_GEAR_SLOT_INVENTORY7 140 +#define IDC_GEAR_SLOT_INVENTORY8 141 +#define IDC_GEAR_SLOT_INVENTORY9 142 +#define IDC_GEAR_SLOT_INVENTORY10 143 +#define IDC_GEAR_SLOT_INVENTORY11 144 +#define IDC_GEAR_SLOT_INVENTORY12 145 + +#define IDC_GEAR_ADD_ITEM 146 +#define IDC_GEAR_REMOVE_ITEM 147 + +#define IDC_GEAR_FILTER 148 +#define IDC_GEAR_FILTER_ICON1 149 +#define IDC_GEAR_FILTER_ICON2 150 +#define IDC_GEAR_FILTER_ICON3 151 +#define IDC_GEAR_FILTER_ICON4 152 +#define IDC_GEAR_FILTER_ICON5 153 +#define IDC_GEAR_FILTER_ICON6 154 + +#define IDC_GEAR_POOL_GROUP 155 +#define IDC_GEAR_SOURCE_NAME 156 +#define IDC_GEAR_OPEN_BAG 157 +#define IDC_GEAR_CLOSE_BAG 158 +#define IDC_GEAR_ADD_DEFAULT 255 +#define IDC_GEAR_CLEAR_ALL 256 +#define IDC_BAG_ITEMS_GROUP 159 +#define IDC_UNIT_ITEMS_GROUP 160 + +#define IDC_GEAR_BAG_EMPTY 5000 +/* +#define IDC_GEAR_BAG_EMPTY_SLOT1 5000 +#define IDC_GEAR_BAG_EMPTY_SLOT2 5001 +#define IDC_GEAR_BAG_EMPTY_SLOT3 5002 +. +. +. +#define IDC_GEAR_BAG_EMPTY_SLOT499 5498 +#define IDC_GEAR_BAG_EMPTY_SLOT500 5499 +*/ +#define IDC_GEAR_BAG_FULL 5500 + +// Debriefing +/* +#define IDC_DEBRIEFING_LEFT 101 +#define IDC_DEBRIEFING_RIGHT 102 +*/ +#define IDC_DEBRIEFING_STAT 103 +#define IDC_DEBRIEFING_RESTART 104 +#define IDC_DEBRIEFING_PAD2 105 +#define IDC_DEBRIEFING_PLAYERS_TITLE_BG 106 +#define IDC_DEBRIEFING_PLAYERS_TITLE 107 +#define IDC_DEBRIEFING_PLAYERS_BG 108 +#define IDC_DEBRIEFING_PLAYERS 109 +#define IDC_DEBRIEFING_TIMEOUT 110 +#define IDC_DEBRIEFING_RESULT 111 +#define IDC_DEBRIEFING_TITLE 112 +#define IDC_DEBRIEFING_DEBRIEFING 113 +#define IDC_DEBRIEFING_OBJECTIVES 114 +#define IDC_DEBRIEFING_INFO 115 +#define IDC_DEBRIEFING_SHOW_PLAYERS 116 +#define IDC_DEBRIEFING_SHOW_PAGE2 117 +#define IDC_DEBRIEFING_LIVE_STATS 118 +#define IDC_DEBRIEFING_PREV_PAGE 119 +#define IDC_DEBRIEFING_NEXT_PAGE 120 +#define IDC_DEBRIEFING_LOAD 121 + +#define IDC_DEBRIEFING_TEXT_GROUP 122 +#define IDC_DEBRIEFING_OBJECTIVES_GROUP 123 +#define IDC_DEBRIEFING_STATS_GROUP 124 + +#define IDC_DEBRIEFING_MISSION_WORKSHOP 125 + +// Debug display +#define IDC_DEBUG_EXP 101 +#define IDC_DEBUG_APPLY 102 +#define IDC_DEBUG_LOG 103 +#define IDC_DEBUG_SEARCH 161 +#define IDC_DEBUG_SEARCH_BUTTON 162 +#define IDC_DEBUG_HISTORY 163 + +#define IDC_DEBUG_EXP1 121 +#define IDC_DEBUG_EXP2 122 +#define IDC_DEBUG_EXP3 123 +#define IDC_DEBUG_EXP4 124 + +#define IDC_DEBUG_RES1 141 +#define IDC_DEBUG_RES2 142 +#define IDC_DEBUG_RES3 143 +#define IDC_DEBUG_RES4 144 + +#define IDC_DEBUG_CLEAR_LOG 151 +#define IDC_DEBUG_FILTER_EDIT 152 + +// Debug PhysX Display +#define IDC_PHYSX_DEBUG_DIAGMODE 101 +#define IDC_PHYSX_DEBUG_DIAGMODEDRAW 102 + +#define IDC_PHYSX_DEBUG_TERRAIN 103 +#define IDC_PHYSX_DEBUG_STATIC 104 +#define IDC_PHYSX_DEBUG_KINEMATIC 105 +#define IDC_PHYSX_DEBUG_DYNAMIC 106 + +#define IDC_PHYSX_DEBUG_CHECK_BUTTONS_START 109 +#define IDC_PHYSX_DEBUG_WORLD_AXES 110 +#define IDC_PHYSX_DEBUG_BODY_AXES 111 +#define IDC_PHYSX_DEBUG_BODY_MASS_AXES 112 +#define IDC_PHYSX_DEBUG_BODY_LIN_VELOCITY 113 +#define IDC_PHYSX_DEBUG_BODY_ANG_VELOCITY 114 +#define IDC_PHYSX_DEBUG_BODY_JOINT_GROUPS 115 +#define IDC_PHYSX_DEBUG_JOINT_LOCAL_AXES 116 +#define IDC_PHYSX_DEBUG_JOINT_WORLD_AXES 117 +#define IDC_PHYSX_DEBUG_JOINT_LIMITS 118 +#define IDC_PHYSX_DEBUG_CONTACT_POINT 119 +#define IDC_PHYSX_DEBUG_CONTACT_NORMAL 120 +#define IDC_PHYSX_DEBUG_CONTACT_ERROR 121 +#define IDC_PHYSX_DEBUG_CONTACT_FORCE 122 +#define IDC_PHYSX_DEBUG_ACTOR_AXES 123 +#define IDC_PHYSX_DEBUG_COLLISION_AABBS 124 +#define IDC_PHYSX_DEBUG_COLLISION_SHAPES 125 +#define IDC_PHYSX_DEBUG_COLLISION_AXES 126 +#define IDC_PHYSX_DEBUG_COLLISION_COMPOUNDS 127 +#define IDC_PHYSX_DEBUG_COLLISION_VNORMALS 128 +#define IDC_PHYSX_DEBUG_COLLISION_FNORMALS 129 +#define IDC_PHYSX_DEBUG_COLLISION_EDGES 130 +#define IDC_PHYSX_DEBUG_COLLISION_SPHERES 131 +#define IDC_PHYSX_DEBUG_COLLISION_STATIC 132 +#define IDC_PHYSX_DEBUG_COLLISION_DYNAMIC 133 +#define IDC_PHYSX_DEBUG_COLLISION_FREE 134 +#define IDC_PHYSX_DEBUG_COLLISION_CCD 135 +#define IDC_PHYSX_DEBUG_COLLISION_SKELETONS 136 +#define IDC_PHYSX_DEBUG_CHECK_BUTTONS_END 148 + +#define IDC_PHYSX3_DEBUG_CHECK_BUTTONS_START 149 +#define IDC_PHYSX3_DEBUG_WORLD_AXES 150 +#define IDC_PHYSX3_DEBUG_BODY_AXES 151 +#define IDC_PHYSX3_DEBUG_BODY_MASS_AXES 152 +#define IDC_PHYSX3_DEBUG_BODY_LIN_VELOCITY 153 +#define IDC_PHYSX3_DEBUG_BODY_ANG_VELOCITY 154 +#define IDC_PHYSX3_DEBUG_BODY_JOINT_GROUPS 155 +#define IDC_PHYSX3_DEBUG_CONTACT_POINT 156 +#define IDC_PHYSX3_DEBUG_CONTACT_NORMAL 157 +#define IDC_PHYSX3_DEBUG_CONTACT_ERROR 158 +#define IDC_PHYSX3_DEBUG_CONTACT_FORCE 159 +#define IDC_PHYSX3_DEBUG_ACTOR_AXES 160 +#define IDC_PHYSX3_DEBUG_COLLISION_AABBS 161 +#define IDC_PHYSX3_DEBUG_COLLISION_SHAPES 162 +#define IDC_PHYSX3_DEBUG_COLLISION_AXES 163 +#define IDC_PHYSX3_DEBUG_COLLISION_COMPOUNDS 164 +#define IDC_PHYSX3_DEBUG_COLLISION_FNORMALS 165 +#define IDC_PHYSX3_DEBUG_COLLISION_EDGES 166 +#define IDC_PHYSX3_DEBUG_COLLISION_STATIC 167 +#define IDC_PHYSX3_DEBUG_COLLISION_DYNAMIC 168 +#define IDC_PHYSX3_DEBUG_COLLISION_PAIRS 169 +#define IDC_PHYSX3_DEBUG_JOINT_LOCAL_AXES 170 +#define IDC_PHYSX3_DEBUG_JOINT_LIMITS 171 +#define IDC_PHYSX3_DEBUG_PARTICLE_SYSTEM_POSITION 172 +#define IDC_PHYSX3_DEBUG_PARTICLE_SYSTEM_VELOCITY 173 +#define IDC_PHYSX3_DEBUG_PARTICLE_SYSTEM_COLLISION_NORMAL 174 +#define IDC_PHYSX3_DEBUG_PARTICLE_SYSTEM_BOUNDS 175 +#define IDC_PHYSX3_DEBUG_PARTICLE_SYSTEM_GRID 176 +#define IDC_PHYSX3_DEBUG_PARTICLE_SYSTEM_BROADPHASE_BOUNDS 177 +#define IDC_PHYSX3_DEBUG_PARTICLE_SYSTEM_MAX_MOTION_DISTANCE 178 +#define IDC_PHYSX3_DEBUG_CHECK_BUTTONS_END 188 + +#define IDC_PHYSX_DEBUG_ALL 190 +#define IDC_PHYSX_DEBUG_NONE 191 +#define IDC_PHYSX_DEBUG_DIAGMODEPERF 192 +#define IDC_PHYSX_DEBUG_DIAGMODESTATS 193 + +#define IDC_PHYSX_DEBUG_USECONVEXSHAPES 194 +#define IDC_PHYSX_DEBUG_USEROADWAYS 195 +#define IDC_PHYSX_DEBUG_USEONECAPSULE 196 +#define IDC_PHYSX_DEBUG_IMMEDIATEFETCH 197 + +#define IDC_PHYSX_DEBUG_BASIC 198 + +// DS interface display +#define IDC_DSI_PLAYERLIST 101 +#define IDC_DSI_MISSONLIST 102 + +// HintC display +#define IDC_HINTC_BG 101 +#define IDC_HINTC_HINT 102 +#define IDC_HINTC_TITLE 103 +#define IDC_HINTC_CONTINUE 104 +#define IDC_HINTC_LINE1 105 +#define IDC_HINTC_LINE2 106 + +// Insert marker display +#define IDC_INSERT_MARKER 101 +#define IDC_INSERT_MARKER_PICTURE 102 +#define IDC_INSERT_MARKER_CHANNELS 103 + +// InGameUI +// - unit info +#define IDC_IGUI_TIME 101 +#define IDC_IGUI_DATE 102 +#define IDC_IGUI_NAME 103 +#define IDC_IGUI_UNIT 104 +#define IDC_IGUI_VALUE_EXP 106 +#define IDC_IGUI_COMBAT_MODE 107 +#define IDC_IGUI_VALUE_HEALTH 109 +#define IDC_IGUI_HITZONES 111 +#define IDC_IGUI_VALUE_FUEL 113 +#define IDC_IGUI_CARGO_MAN 114 +#define IDC_IGUI_CARGO_FUEL 115 +#define IDC_IGUI_CARGO_REPAIR 116 +#define IDC_IGUI_CARGO_AMMO 117 +#define IDC_IGUI_WEAPON 118 +#define IDC_IGUI_AMMO 119 +#define IDC_IGUI_VEHICLE 120 +#define IDC_IGUI_SPEED 121 +#define IDC_IGUI_ALT 122 +#define IDC_IGUI_FORMATION 123 +#define IDC_IGUI_BG 124 +#define IDC_IGUI_COMMANDER 125 +#define IDC_IGUI_DRIVER 126 +#define IDC_IGUI_GUNNER 127 + +#define IDC_IGUI_SPEED_FREEFALL 380 +#define IDC_IGUI_SPEED_VERTICAL_FREEFALL 381 +#define IDC_IGUI_ALT_FREEFALL 382 + +#define IDC_IGUI_ANALOGUE_HORIZON 383 +#define IDC_IGUI_ANALOGUE_SPEED_LADDER 384 +#define IDC_IGUI_ANALOGUE_ALT_LADDER 385 + +#define IDC_IGUI_OPTICS_GROUP 390 +#define IDC_IGUI_DRIVER_GROUP 391 +#define IDC_IGUI_DRIVER_OPTICS_GROUP 392 +#define IDC_IGUI_VEHICLE_PITCH 393 + + +//AV_Terminal +#define IDC_IGUI_AVT_NAME 100 +#define IDC_IGUI_AVT_TAKE_CONTROL 101 +#define IDC_IGUI_AVT_STATUS 102 +#define IDC_IGUI_AVT_TARGET 103 +#define IDC_IGUI_AVT_POSITION 104 +#define IDC_IGUI_AVT_PIP1 105 +#define IDC_IGUI_AVT_PIP2 106 +#define IDC_IGUI_AVT_COUNT 107 +#define IDC_IGUI_AVT_EDITOR_MENU 108 +#define IDC_IGUI_AVT_FUEL 109 +#define IDC_IGUI_AVT_WEAPON 110 +#define IDC_IGUI_AVT_AMMO 111 +#define IDC_IGUI_AVT_WEAPON_SEC 112 +#define IDC_IGUI_AVT_AMMO_SEC 113 +#define IDC_IGUI_AVT_TAKE_CONTROL_DRIVER 114 +#define IDC_IGUI_AVT_TAKE_CONTROL_GUNNER 115 +#define IDC_IGUI_AVT_AUTONOMOUS 116 +#define IDC_IGUI_AVT_COMBO 117 +#define IDC_IGUI_AVT_ALLOW_LIGHTS 118 + +//AV Camera +#define IDC_IGUI_AVC_PIP_DRIVER 100 +#define IDC_IGUI_AVC_PIP_GUNNER 101 +#define IDC_IGUI_AVC_PIP_SINGLE_VIEW 102 + +//Sling Load Assistant +#define IDC_SLA_MAP 100 +#define IDC_SLA_HDIST 101 +#define IDC_SLA_VDIST 102 +#define IDC_SLA_STATUS 103 +#define IDC_SLA_LIFT_PROGRESS 104 +#define IDC_SLA_HEIGHT_BAR 105 +#define IDC_SLA_MAX_ALT 106 + +//MP Score Table +#define IDC_MP_SCORE_TABLE_TITLE 101 +#define IDC_MP_SCORE_TABLE_PLAYERS_LIST 102 +#define IDC_MP_SCORE_TABLE_SIDES_LIST 103 +#define IDC_MP_SCORE_TABLE_LINE_TEMPLATE 104 +#define IDC_MP_SCORE_TABLE_LINE_BACK 105 +#define IDC_MP_SCORE_TABLE_ORDER 106 +#define IDC_MP_SCORE_TABLE_PLAYERSNAME 107 +#define IDC_MP_SCORE_TABLE_KILLS_INF 108 +#define IDC_MP_SCORE_TABLE_KILLS_SOFT 109 +#define IDC_MP_SCORE_TABLE_KILLS_ARMOR 110 +#define IDC_MP_SCORE_TABLE_KILLS_AIR 111 +#define IDC_MP_SCORE_TABLE_KILLED 112 +#define IDC_MP_SCORE_TABLE_KILLSTOTAL 113 + +//Vehicle MessageBox +#define IDC_VEHICLEMSGBOX_BACKGROUND 100 +#define IDC_VEHICLEMSGBOX_LOGO 101 +#define IDC_VEHICLEMSGBOX_TEXT 102 +#define IDC_VEHICLEMSGBOX_PURCHASE 103 + +//Action Notification +#define IDC_DLC_ACTION_NOTIFICATION_GROUP 11406 +#define IDC_DLC_ACTION_NOTIFICATION_LOGO 100 +#define IDC_DLC_ACTION_NOTIFICATION_TEXT 101 +#define IDC_DLC_ACTION_NOTIFICATION_TITLE 102 + +//first aid icons +#define IDC_IGUI_BLEEDING0 401 +#define IDC_IGUI_BLEEDING1 402 +#define IDC_IGUI_INJURED_HEAD0 403 +#define IDC_IGUI_INJURED_HEAD1 404 +#define IDC_IGUI_INJURED_HANDS0 405 +#define IDC_IGUI_INJURED_HANDS1 406 +#define IDC_IGUI_INJURED_HANDS2 407 +#define IDC_IGUI_INJURED_LEGS0 408 +#define IDC_IGUI_INJURED_LEGS1 409 +#define IDC_IGUI_INJURED_LEGS2 410 +#define IDC_IGUI_BODY 411 +#define IDC_IGUI_VALUE_OXYGEN 412 +#define IDC_IGUI_BURNING 413 + +#define IDC_IGUI_ALT_WANTED 128 +#define IDC_IGUI_SPEED_WANTED 129 +#define IDC_IGUI_POSITION 130 +#define IDC_IGUI_OPTIC 131 + +// _VBS3 + #define IDC_IGUI_MAGAZINE 132 + #define IDC_IGUI_OVR_STATUS 133 + //TI + #define IDC_IGUI_TI_BACK 134 + #define IDC_IGUI_TI_MODE 135 + #define IDC_IGUI_TI_BRIGHTNESS_TXT 136 + #define IDC_IGUI_TI_BRIGHTNESS 137 + #define IDC_IGUI_TI_CONTRAST_TXT 138 + #define IDC_IGUI_TI_CONTRAST 139 + #define IDC_IGUI_TI_AUTO_CONTRAST 140 + + //LASE + #define IDC_IGLR_RANGE 141 + #define IDC_IGLR_BG 142 + #define IDC_IGLR_RANGE_NUM 143 + + //AVRS + #define IDC_IGUI_NICK 144 + #define IDC_IGUI_NICK_VAL 145 + #define IDC_IGUI_BANK 146 + #define IDC_IGUI_BANK_VAL 147 +// !_VBS3 +#define IDC_IGUI_HEADING 148 + +// !new arrowhead +#define IDC_IGUI_WEAPON_MODE 149 +#define IDC_IGUI_WEAPON_GUNNER 150 +#define IDC_IGUI_COUNTER_MEASURES_AMMO 151 +#define IDC_IGUI_COUNTER_MEASURES_MODE 152 + +#define IDC_IGUI_RADARRANGE 153 +#define IDC_IGUI_VALUE_RELOAD 154 +#define IDC_IGUI_WEAPON_AMMO 155 + +// New Arma 3 +#define IDC_IGUI_WEAPON_OPTICS_PITCH 182 +#define IDC_IGUI_STANCE_INDICATOR 188 +#define IDC_IGUI_GPS_PLAYER 189 +#define IDC_IGUI_SPEED2 190 +#define IDC_IGUI_ALT2 191 +#define IDC_IGUI_PILOT_OPTIC_ZOOM 192 +#define IDC_IGUI_STAMINA_BAR 193 + +// weapon/turret info controls +#define IDC_IGUI_WEAPON_DISTANCE 151 +#define IDC_IGUI_WEAPON_VISION_MODE 152 +#define IDC_IGUI_WEAPON_FLIR_MODE 153 +#define IDC_IGUI_WEAPON_FOV_MODE 154 +#define IDC_IGUI_WEAPON_COMPASS 155 +#define IDC_IGUI_WEAPON_HEADING 156 +#define IDC_IGUI_WEAPON_AUTOHOVER 157 +#define IDC_IGUI_WEAPON_LASER_MARKER_ON 158 +#define IDC_IGUI_WEAPON_BALL_ENABLED 159 +#define IDC_IGUI_WEAPON_JAVELIN_DAY 160 +#define IDC_IGUI_WEAPON_JAVELIN_FLTR 161 +#define IDC_IGUI_WEAPON_JAVELIN_NFOV 162 +#define IDC_IGUI_WEAPON_JAVELIN_WFOV 163 +#define IDC_IGUI_WEAPON_BALL_RANGE 164 +#define IDC_IGUI_WEAPON_BALISTIC_COMP 165 +#define IDC_IGUI_WEAPON_JAVELIN_SEEK 166 +#define IDC_IGUI_WEAPON_JAVELIN_MISSLE 167 +#define IDC_IGUI_WEAPON_ELEVATION 168 +#define IDC_IGUI_WEAPON_ELEVATION_TEXT 169 +#define IDC_IGUI_WEAPON_STATIC_ITEMS 170 +#define IDC_IGUI_WEAPON_GPS_PLAYER 171 +#define IDC_IGUI_WEAPON_GPS_TARGET 172 +#define IDC_IGUI_WEAPON_ARTI_DIST 173 +#define IDC_IGUI_WEAPON_ARTI_TIME 174 +#define IDC_IGUI_WEAPON_ARTI_ELEV 175 +#define IDC_IGUI_WEAPON_ARTI_ELEV_NEED 176 +#define IDC_IGUI_WEAPON_ARTI_OUT_RANGE 177 +#define IDC_IGUI_WEAPON_ARTI_AUTO_ELEV 178 +#define IDC_IGUI_WEAPON_VISION_MODE2 179 +#define IDC_IGUI_WEAPON_OPTICS_ZOOM 180 +#define IDC_IGUI_WEAPON_TARGET_UNIT 181 +#define IDC_IGUI_WEAPON_OPTICS_PITCH 182 +#define IDC_IGUI_WEAPON_DISTANCE2 183 + +// unit info (to preserve order) - new A3 +#define IDC_IGUI_AMMOCOUNT 184 +#define IDC_IGUI_MAGCOUNT 185 + +#define IDC_IGUI_DEPTH 186 +#define IDC_IGUI_WEAPON_MODE_TEXTURE 187 +#define IDC_IGUI_WEAPON_SPEED 188 +#define IDC_IGUI_WEAPON_ALT 189 +#define IDC_IGUI_WEAPON_TIME 190 + +// helicopter unit info +#define IDC_IGUI_GMETER 501 +#define IDC_IGUI_RADARALTIMETER 505 +#define IDC_IGUI_RADARALTIMETER_BAR 506 +#define IDC_IGUI_RADARALTIMETER_VALUE 507 +#define IDC_IGUI_TORQUE 510 +#define IDC_IGUI_WINDINDICATOR 515 +#define IDC_IGUI_WINDINDICATOR_TEXT 516 +#define IDC_IGUI_WINDINDICATOR_IMAGE 517 +#define IDC_IGUI_STABILITYINDICATOR 520 +#define IDC_IGUI_STABILITYINDICATOR_AXIS 521 +#define IDC_IGUI_STABILITYINDICATOR_OFFSET 522 +#define IDC_IGUI_COLLECTIVE 525 +#define IDC_IGUI_AIRSPEEDINDICATOR 530 +#define IDC_IGUI_AIRSPEEDINDICATOR_AXIS 531 +#define IDC_IGUI_AIRSPEEDINDICATOR_VALUE 532 +#define IDC_IGUI_ALTIMETER 535 +#define IDC_IGUI_ALTIMETER_AXIS 536 +#define IDC_IGUI_ALTIMETER_VALUE 537 +#define IDC_IGUI_ATTITUDEINDICATOR 540 +#define IDC_IGUI_ATTITUDEINDICATOR_LITE 541 +#define IDC_IGUI_TRIMINDICATOR 545 +#define IDC_IGUI_AUTOHOVERNDICATOR 546 +#define IDC_IGUI_HELIHUD_MISCELLANEOUS 550 + +// helicopter Analogue unit info +#define IDC_IGUI_ANALOGUE_SPEED 601 +#define IDC_IGUI_ANALOGUE_SPEED_NEEDLE 602 +#define IDC_IGUI_ANALOGUE_SPEED_MIN 603 +#define IDC_IGUI_ANALOGUE_SPEED_MAX 604 +#define IDC_IGUI_ANALOGUE_SPEED_TEXT 605 +#define IDC_IGUI_ANALOGUE_SPEED_IMPERIAL 606 +#define IDC_IGUI_ANALOGUE_SPEED_METRIC 607 + +#define IDC_IGUI_ANALOGUE_ALTITUDE 611 +#define IDC_IGUI_ANALOGUE_ALTITUDE_NEEDLE 612 +#define IDC_IGUI_ANALOGUE_ALTITUDE_MIN 613 +#define IDC_IGUI_ANALOGUE_ALTITUDE_MAX 614 +#define IDC_IGUI_ANALOGUE_ALTITUDE_TEXT 615 +#define IDC_IGUI_ANALOGUE_ALTITUDE_IMPERIAL 616 +#define IDC_IGUI_ANALOGUE_ALTITUDE_METRIC 617 + +#define IDC_IGUI_ANALOGUE_ATTITUDE 621 +#define IDC_IGUI_ANALOGUE_ATTITUDE_HORIZON 622 +#define IDC_IGUI_ANALOGUE_ATTITUDE_VALUE 623 + +#define IDC_IGUI_ANALOGUE_COMPASS 631 +#define IDC_IGUI_ANALOGUE_COMPASS_DIR 632 +#define IDC_IGUI_ANALOGUE_COMPASS_WIND 633 +#define IDC_IGUI_ANALOGUE_COMPASS_WAYPOINT 634 +#define IDC_IGUI_ANALOGUE_COMPASS_MIN 635 +#define IDC_IGUI_ANALOGUE_COMPASS_MAX 636 +#define IDC_IGUI_ANALOGUE_COMPASS_TEXT 637 +#define IDC_IGUI_ANALOGUE_COMPASS_WIND_TEXT 638 + +#define IDC_IGUI_ANALOGUE_STABILITY 641 +#define IDC_IGUI_ANALOGUE_STABILITY_SPEED 642 +#define IDC_IGUI_ANALOGUE_STABILITY_TEXT 643 +#define IDC_IGUI_ANALOGUE_STABILITY_VSPEED_NEEDLE 644 +#define IDC_IGUI_ANALOGUE_STABILITY_COLLECTIVE 645 +#define IDC_IGUI_ANALOGUE_STABILITY_VSPEED 646 +#define IDC_IGUI_ANALOGUE_STABILITY_IMPERIAL 647 +#define IDC_IGUI_ANALOGUE_STABILITY_METRIC 648 + +//damage +#define IDC_IGUI_DAMAGE_GROUP 660 +#define IDC_IGUI_DAMAGE_ENGINESRPM 662 +#define IDC_IGUI_DAMAGE_ENGINESDAMAGE 663 +#define IDC_IGUI_DAMAGE_TORQUE 664 +#define IDC_IGUI_DAMAGE_ELECTRICITY 665 +#define IDC_IGUI_DAMAGE_FUEL 666 +#define IDC_IGUI_DAMAGE_HYDRAULICS 667 +#define IDC_IGUI_DAMAGE_MAINROTOR 668 +#define IDC_IGUI_DAMAGE_TAILROTOR 669 +#define IDC_IGUI_DAMAGE_AUTOHOVER 670 +#define IDC_IGUI_DAMAGE_INSTALLATIONS 671 +#define IDC_IGUI_DAMAGE_HULL 672 +#define IDC_IGUI_DAMAGE_WHEELBRAKE 673 +#define IDC_IGUI_DAMAGE_ROTORBRAKE 674 +#define IDC_IGUI_DAMAGE_WINCH 675 +#define IDC_IGUI_DAMAGE_GEAR 676 + +// - hint +#define IDC_IGHINT_BG 101 +#define IDC_IGHINT_HINT 102 + +// - task hint +#define IDC_IGTASKHINT_BG 103 +#define IDC_IGTASKHINT_HINT 104 + +// - load mission progress bar +#define IDC_LOAD_MISSION_NAME 101 +#define IDC_LOAD_MISSION_DATE 102 +#define IDC_PROGRESS_TIME 103 +#define IDC_PROGRESS_PROGRESS 104 +#define IDC_LOAD_MISSION_PICTURE 105 +#define IDC_LOAD_MISSION_TEXT 106 + +// - dedicated server dialog +#define IDC_DS_REPORT 101 +#define IDC_DS_PLAYERS 102 +#define IDC_DS_FRIENDS 103 + +// - friend's missions dialog +#define IDC_FRIEND_MISSIONS_LIST 101 + +// - live statistics dialogs +#define IDC_LIVE_STATS_BOARDS 101 + +#define IDC_LIVE_STATS_LIST 101 +#define IDC_LIVE_STATS_COUNT 102 +#define IDC_LIVE_STATS_TITLE 103 +#define IDC_LIVE_STATS_PLAYER 104 +#define IDC_LIVE_STATS_BEGIN 105 +#define IDC_LIVE_STATS_END 106 +#define IDC_LIVE_STATS_PREV 107 +#define IDC_LIVE_STATS_NEXT 108 +#define IDC_LIVE_STATS_FRIENDS 109 +#define IDC_LIVE_STATS_GAMER_CARD 110 + +#define IDC_RECEIVING_TEXT 101 +#define IDC_RECEIVING_TIME 102 + +#define IDC_MSG_BOX_MESSAGE 101 + +#define IDC_EDITOR_OBJECTS 201 +#define IDC_EDITOR_ATTRIBUTES 202 +#define IDC_EDITOR_BACKGROUND 203 +#define IDC_EDITOR_MENU 204 +#define IDC_EDITOR_SAVE 205 +#define IDC_EDITOR_LOAD 206 +#define IDC_EDITOR_RESTART 207 +#define IDC_EDITOR_PREVIEW 208 +#define IDC_EDITOR_MAP 209 +#define IDC_EDITOR_CLEAR 210 +#define IDC_EDITOR_TYPE_LIST 211 + +// editor menu system +#define IDC_EDITOR_FILE 212 +#define IDC_EDITOR_VIEW 213 +#define IDC_EDITOR_USER 214 +#define IDC_EDITOR_MENU_FILE 216 +#define IDC_EDITOR_MENU_VIEW 217 +#define IDC_EDITOR_MENU_USER 218 + +#define IDC_EDITOR_CONTROLS_HELP 220 +#define IDC_EDITOR_LOAD_AAR 221 + +#define IDC_EDITOR_ADDOBJ_TYPES 222 +#define IDC_EDITOR_ADDOBJ_CATEGORIES 223 +#define IDC_EDITOR_ADDOBJ_LISTING 224 + +#define IDC_MINI_MAP 225 + +// editor tree filtering +#define IDC_EDITOR_OBJECTS_FILTER 236 +#define IDC_EDITOR_TREE_EXPAND_ALL 237 +#define IDC_EDITOR_TREE_EXPAND_ALL_BACK 238 +#define IDC_EDITOR_TREE_COLLAPSE_ALL 239 +#define IDC_EDITOR_TREE_COLLAPSE_ALL_BACK 240 + +#define IDC_EDIT_OBJECT_CONTROLS 101 +#define IDC_EDIT_OBJECT_TOGGLE_BUTTON 102 + +#define IDC_NEW_OBJECT_TYPE 101 +#define IDC_NEW_OBJECT_PARENT 102 + +#define IDC_MISSION_LOAD_ISLAND 101 +#define IDC_MISSION_LOAD_MISSION 102 + +#define IDC_MISSION_SAVE_MISSION 101 +#define IDC_MISSION_SAVE_TITLE 102 +#define IDC_MISSION_SAVE_DESCRIPTION 103 +#define IDC_MISSION_SAVE_PLACEMENT 104 + +#define IDC_OVERLAY_CREATE_NAME 101 +#define IDC_OVERLAY_LOAD_NAME 101 +#define IDC_OVERLAY_LOAD_MISSION 102 + +#define IDC_EDIT_DIARY_RECORD 101 +#define IDC_EDIT_DIARY_TITLE 102 + +#define IDC_LOAD_AAR_NAME 101 + +#define IDC_EDITOR_EB_PLAN 101 +#define IDC_EDITOR_EB_NOTES 102 +#define IDC_EDITOR_EB_SIDE 103 +#define IDC_EDITOR_EB_OBJECTIVES 104 +#define IDC_EDITOR_EB_NEW_OBJECTIVE 105 +#define IDC_EDITOR_EB_ADD_OBJECTIVE 106 +#define IDC_EDITOR_EB_DEL_OBJECTIVE 107 + +// - team switch display + +#define IDC_TEAM_SWITCH_ROLES 101 + +// - configure action display + +#define IDC_CONFIGURE_ACTION_TITLE 101 +#define IDC_CONFIGURE_ACTION_KEYS 102 +#define IDC_CONFIGURE_ACTION_SPECIAL 103 +#define IDC_CONFIGURE_ACTION_DELETE 104 +#define IDC_CONFIGURE_ACTION_DEFAULT 105 +#define IDC_CONFIGURE_ACTION_CLEAR 106 +#define IDC_CONFIGURE_ACTION_CANCEL 107 +#define IDC_CONFIGURE_ACTION_PREV 108 +#define IDC_CONFIGURE_ACTION_NEXT 109 + +// - controls display +#define IDC_CONTROLS_TYPE 101 +#define IDC_CONTROLS_CONFIGURE 102 + +// - miniMap display + +#define IDC_MINIMAP 101 + +// - scripting help display +#define IDC_SCRITING_HELP 101 +#define IDC_SCRITING_HELP_BACK 102 +#define IDC_SCRITING_HELP_FORWARD 103 +#define IDC_SCRITING_HELP_EXAMPLE 104 + +// - performance display +#define IDC_PERF_INDEX 101 +#define IDC_PERF_ENABLE 102 +#define IDC_PERF_GRAPH 103 +#define IDC_PERF_GRAPH_TITLE 104 +#define IDC_PERF_MAXTIME 105 + +// - capture display +#define IDC_CAPTURE_INDEX 101 +#define IDC_CAPTURE_TIMELINES 102 +#define IDC_CAPTURE_ZOOMIN 103 +#define IDC_CAPTURE_ZOOMOUT 104 +#define IDC_CAPTURE_EXPORT 105 +#define IDC_CAPTURE_INFO 106 +#define IDC_CAPTURE_EXPORT_ALL 107 +#define IDC_CAPTURE_IMPORT_ALL 108 +#define IDC_CAPTURE_PREVIOUS_DATA 109 +#define IDC_CAPTURE_AVERAGES 110 +#define IDC_CAPTURE_SAVE_ARCHIVE 111 +#define IDC_CAPTURE_SEARCH 112 + + +// - joysticks configuration display +#define IDC_CONTROLLER_CUSTOMIZE 101 +#define IDC_CONTROLLER_ENABLE 102 +#define IDC_CONTROLLER_XINPUT_LIST 103 +#define IDC_CONTROLLER_LIST 104 +#define IDC_CONTROLLER_REFRESH 105 + +// - customize controllers +#define IDC_CUSTOMIZE_CTRL_SENSITIVITIES 101 +#define IDC_CUSTOMIZE_CTRL_UNMAP 102 +#define IDC_CUSTOMIZE_CTRL_DEFAULT 103 +#define IDC_CUSTOMIZE_CTRL_TITLE 104 +#define IDC_CUSTOMIZE_CTRL_DEFAULT_BINDING 105 +#define IDC_CUSTOMIZE_CTRL_ADVANCED 106 +#define IDC_SENSITIVITY_SLIDER 120 +#define IDC_DEADZONE_SLIDER 220 +#define IDC_CUSTOMIZE_CTRL_ACTIVE_AXIS_ICON 320 +#define IDC_CUSTOMIZE_CTRL_STEEPNESS 420 +#define IDC_CUSTOMIZE_CTRL_VALUE 520 + +// - joystick schemes +#define IDC_JOY_SCHEMES_TITLE 101 +#define IDC_JOY_SCHEMES_LIST 102 +#define IDC_JOY_SCHEMES_MAP 103 + +// - helper IDC for DisplayCampaignLoadLight +#define IDC_MP_CAMPAIGN_RESTART 150 +#define IDC_MP_CAMPAIGN_REPLAY 151 +#define IDC_MP_CAMPAIGN_LOAD 152 + +// - addon actions display +#define IDC_ADDON_ACTIONS 101 +#define IDC_ADDON_ACTIONS_NEW_MOD 102 + +// - mod launcher +#define IDC_MOD_LAUNCHER_MODS 101 +#define IDC_MOD_LAUNCHER_PICTURE 102 +#define IDC_MOD_LAUNCHER_UP 103 +#define IDC_MOD_LAUNCHER_DOWN 104 +#define IDC_MOD_LAUNCHER_DISABLE 105 +#define IDC_MOD_LAUNCHER_ACTION 106 +#define IDC_MOD_LAUNCHER_PURCHASE 107 +#define IDC_MOD_LAUNCHER_DESCRIPTION 108 + +// - create new mod +#define IDC_MOD_NAME 101 +#define IDC_MOD_DIR 102 + + +//A3 credits +#define ONBUTTONCLICK_START_CREDITS "0 = _this spawn (uinamespace getvariable 'bis_fnc_credits');" + + +// Hitzone types +#define HZ_AIRPLANE_HULL 0 + +#define HZ_HELICOPTER_HULL 1 +#define HZ_HELICOPTER_ENG 2 +#define HZ_HELICOPTER_INST 3 +#define HZ_HELICOPTER_ATRQ 4 +#define HZ_HELICOPTER_MROT 5 +#define HZ_HELICOPTER_WINCH 6 + +#define HZ_CAR_HULL 7 +#define HZ_CAR_ENG 8 +#define HZ_CAR_FUEL 9 +#define HZ_CAR_WHL 10 + +#define HZ_MOTORCYCLE_HULL 11 +#define HZ_MOTORCYCLE_ENG 12 +#define HZ_MOTORCYCLE_FUEL 13 +#define HZ_MOTORCYCLE_WHL 14 + +#define HZ_TANK_HULL 15 +#define HZ_TANK_ENG 16 +#define HZ_TANK_GUN 17 +#define HZ_TANK_LTR 18 +#define HZ_TANK_RTR 19 +#define HZ_TANK_TRRT 20 + +#define HZ_SHIP_ENG 21 + +#endif diff --git a/extras/cba/addons/main/script_macros_common.hpp b/include/cba/addons/main/script_macros_common.hpp similarity index 100% rename from extras/cba/addons/main/script_macros_common.hpp rename to include/cba/addons/main/script_macros_common.hpp diff --git a/include/x/cba/main/$PBOPREFIX$ b/include/x/cba/main/$PBOPREFIX$ new file mode 100644 index 00000000..2ac60484 --- /dev/null +++ b/include/x/cba/main/$PBOPREFIX$ @@ -0,0 +1 @@ +x\cba\addons\main diff --git a/include/x/cba/main/script_classes.hpp b/include/x/cba/main/script_classes.hpp new file mode 100644 index 00000000..cffb841f --- /dev/null +++ b/include/x/cba/main/script_classes.hpp @@ -0,0 +1,300 @@ +// Cfg +class CfgMods; +class CfgExperience; +class CfgAISkill; +class CfgDifficulties; +class CfgInventory; +class CfgTextureToMaterial; +class CfgMaterials; +class CfgVehicleActions; +class CfgWeaponCursors; +class CfgAmmo; +class CfgRecoils; +class CfgMagazines; +class CfgWeapons; +class CfgCloudlets; +class CfgOpticsEffect; +class CfgDestructPos; +class CfgDamageAround; +class CfgLights; +class CfgCloth; +class CfgVehicleClasses; +class CfgFactionClasses; +class CfgVehicles; +class CfgNonAIVehicles; +class CfgSimulationCosts; +class CfgMarkedTargets; +class CfgFSMs; +class CfgSkeletonParameters; +class CfgVoice; +class CfgVoiceTypes; +class CfgCoreData; +class CfgVehicleIcons; +class CfgCloudletShapes; +class CfgSaveThumbnails; +class CfgSurfaceCharacters; +class CfgSurfaces; +class CfgDefaultSettings; +// class CfgPatches; // ;-) +class CfgFontFamilies; +class CfgFonts; +class CfgEditCamera; +class CfgWrapperUI; +class CfgInGameUI; +class CfgDiary; +class CfgActions; +class CfgMissions; +class CfgDefaultKeysMapping; +class CfgDetectors; +class CfgFaceWounds; +class CfgGlasses; +class CfgFaces; +class CfgMimics; +class CfgEnvSounds; +class CfgHQIdentities; +class CfgHeads; +class CfgMusic; +class CfgSounds; +class CfgWhistleSound; +class CfgTitles; +class CfgIntro; +class CfgCredits; +class CfgCutScenes; +class CfgCameraEffects; +class CfgMarkers; +class CfgMarkerColors; +class CfgMarkerBrushes; +class CfgLocationTypes; +class CfgWorlds; +class CfgWorldList; +class CfgGroups; +class CfgAddons; +class CfgEditorObjects; +class CfgMPGameTypes; +class CfgLiveStats; +class CfgAchievements; +class CfgVoiceMask; +class CfgRumble; +class CfgCameraShake; +class CfgMovesButterfly; +class CfgMovesBasic; +class CfgMovesMaleSdr; +class CfgGesturesMale; +class CfgMovesWomen; +class CfgMovesSportWomen; +class CfgMovesOldWomen; +class CfgDestroy; +class CfgSFX; +class CfgCivilianConversations; +class CfgCivilianScreams; +class CfgCivilianRemarks; +class CfgCivilianActions; +class CfgObjectCompositions; +class CfgCivilianConversations_EP1; +class CfgCivilianScreams_EP1; +class CfgCivilianRemarks_EP1; +class CfgCivilianActions_EP1; +class CfgIdentities; +class CfgRadio; +class CfgMovesAnimal; +class CfgMovesBird; +class CfgTasks; +class CfgMovesAnimalsBase; +class CfgMovesCock; +class CfgMovesHen; +class CfgMovesCow; +class CfgMovesDog; +class CfgMovesGoat; +class CfgMovesRabbit; +class CfgMovesSheep; +class CfgMovesWildBoar; +class CfgLanguages; +class CfgTalkTopics; +class CfgTalkSentences; +class CfgArmory; +class CfgSecOps; +class CfgTalkSentences_E; + +// Other +class Mode_SemiAuto; +class Mode_Burst; +class Mode_FullAuto; +class MissileManualEffects; +class MissileEffects; +class ImpactEffectsBig; +class ImpactEffectsSmall; +class ImpactEffectsBlood; +class ImpactEffectsWater; +class ExplosionEffects; +class ExhaustsEffect; +class ExhaustsEffectBig; +class LDustEffects; +class RDustEffects; +class LWaterEffects; +class RWaterEffects; +class LEngEffects; +class REngEffects; +class FDustEffects; +class HeliDust; +class HeliWater; +class DamageSmokeHeli; +class DamageSmokePlane; +class ScudEffect; +class WeaponFireGun; +class WeaponFireMGun; +class WeaponCloudsGun; +class WeaponCloudsMGun; +class AirplaneHUD; +class PreloadVehicles; +class cfgFormations; +class UserActionsConflictGroups; +class UserActionGroups; +class cfgGroupIcons; +class PreloadTextures; +class DefaultAnalogCurveDefs; +class DefaultMouseCurveDefs; +class ButtonDeadZonesDefault; +class ControllerTypes; +class ControllerSchemes; +class DefaultTextAttributes; +class DefaultSounds; +class DisplayMultiplayerServerAdvanced; +class DisplayMultiplayerServerAdvancedSelect; +class DisplayMultiplayerServerSettings; +class RadioChannels; +class RadioProtocolBase; +class RadioProtocolDefault; +class PreloadConfig; +class DefaultEventhandlers; +class MaskFace; +class MaskFaceWoman; +class EyeMask; +class EyeMaskWoman; +class LipMask; +class NoEffect; +class Missile1; +class Missile2; +class Missile3; +class Missile4; +class Missile5; +class GrenadeCrater; +class MortarCrater; +class ATMissileCrater; +class AAMissileCrater; +class ATRocketCrater; +class HERocketCrater; +class HEShellCrater; +class ArtyShellCrater; +class ExploAmmoCrater; +class ImpactMetal; +class ImpactGlass; +class ImpactGlassThin; +class ImpactWood; +class ImpactPlaster; +class ImpactRubber; +class ImpactBlood; +class ImpactConcrete; +class ImpactLeaves; +class BombCrater; +class ExplosionEffectsWater; +class CannonFire; +class heavyCaliber; +class SencondaryExplosion; +class GrenadeExplosion; +class MortarExplosion; +class WPExplosion; +class ATMissileExplosion; +class AAMissileExplosion; +class ATRocketExplosion; +class HERocketExplosion; +class HEShellExplosion; +class ArtyShellExplosion; +class BombExplosion; +class HelicopterExplosionEffects; +class HelicopterExplosionEffects2; +class VehicleExplosionEffects; +class RocketExplosion; +class ExploAmmoExplosion; +class SmallFire; +class SmokeShellWhite; +class cfgFunctions; +class CounterMeasureFlare; +class CounterMeasureChaff; +class ImpactLeavesGreen; +class RadioProtocol_EP1_EN; +class RadioProtocol_EP1_TK; +class RadioProtocol_WMN_EP1_TK; +class IGUIBack; +class CA_Mainback; +class CA_Mainback_2; +class CA_Mainback_3; +class CA_Back; +class CA_Title_Back; +class CA_Back1; +class CA_Back2; +class CA_Back3; +class CA_Black_Back; +class CA_Title; +class CA_IGUI_Title; +class CA_Logo; +class CA_Logo_Small; +class CA_GameSpy_logo; +class ArmA2_HintBackgroundTop; +class ArmA2_HintBackgroundBottom; +class CA_RscButton; +class CA_RscButton_dialog; +class CA_Ok; +class CA_Ok_image; +class CA_Ok_image2; +class CA_Ok_text; +class CA_Table_back; +class CA_UpTitle; +class CA_BoxLeft; +class BB_left; +class BB_right; +class BB_down; +class BB_up; +class BB_Back; +class Back_UserTitle; +class Table_back_black; +class Table_back_white; +class MapArea; +class RespawnMap; +class RespawnTimer; +class NoCrater; +class NoExplosion; +class RadioProtocol_BAF; +class WFGUIText; +class WFGUILargeText; +class WFGUIButton; +class WFGUIImage; +class WFGUIImageAspectRatio; +class WFGUIListBox; +class WFGUIListNBox; +class WFGUIComboBox; +class WFGUIActiveText; +class WFGUIActiveImage; +class WFGUIActiveImageAspectRatio; +class WFGUIStructuredText; +class WFGUISlider; +class WFGUIShortcutButton; +class WFGUIGearShortcutButton; +class WFBuyMenuBase; +class WFFactoryMenu; +class WFGearMenu; +class WFCityMenu; +class WFTeamMenu; +class WFDiplomacyMenu; +class WFGUIMap; +class WFViewMission; +class WFCommanderViewMission; +class WFFactoryMenuOA; +class WFGearMenuOA; +class WFCityMenuOA; +class WFTeamMenuOA; +class WFDiplomacyMenuOA; +class NoDust; +class ARTY_ShellExplosionSmall; +class ARTY_ShellExplosionMedium; +class ARTY_ShellExplosionLarge; +class ARTY_SmokeExplosionMedium; diff --git a/include/x/cba/main/script_eventhandlers.hpp b/include/x/cba/main/script_eventhandlers.hpp new file mode 100644 index 00000000..7b84e03f --- /dev/null +++ b/include/x/cba/main/script_eventhandlers.hpp @@ -0,0 +1,26 @@ +class Extended_EventHandlers; +class Extended_PreInit_EventHandlers; +class Extended_PostInit_EventHandlers; +class Extended_InitPost_EventHandlers; +class Extended_Init_EventHandlers; +class Extended_AnimChanged_EventHandlers; +class Extended_AnimDone_EventHandlers; +class Extended_Dammaged_EventHandlers; +class Extended_Engine_EventHandlers; +class Extended_fired_Eventhandlers; +class Extended_firedbis_Eventhandlers; +class Extended_firednear_Eventhandlers; +class Extended_Fuel_EventHandlers; +class Extended_Gear_EventHandlers; +class Extended_GetIn_EventHandlers; +class Extended_GetOut_EventHandlers; +class Extended_hit_Eventhandlers; +class Extended_IncomingMissile_EventHandlers; +class Extended_killed_Eventhandlers; +class Extended_LandedTouchDown_EventHandlers; +class Extended_LandedStopped_EventHandlers; +class Extended_HandleDamage_EventHandlers; +class Extended_Respawn_EventHandlers; +//class Extended_MPRespawn_EventHandlers; +//class Extended_MPKilled_EventHandlers; +//class Extended_MPHit_EventHandlers; diff --git a/include/x/cba/main/script_macros.hpp b/include/x/cba/main/script_macros.hpp new file mode 100644 index 00000000..6f9b78c9 --- /dev/null +++ b/include/x/cba/main/script_macros.hpp @@ -0,0 +1 @@ +#include "script_macros_common.hpp" diff --git a/include/x/cba/main/script_macros_common.hpp b/include/x/cba/main/script_macros_common.hpp new file mode 100644 index 00000000..d50a27f5 --- /dev/null +++ b/include/x/cba/main/script_macros_common.hpp @@ -0,0 +1,1831 @@ +/* + Header: script_macros_common.hpp + + Description: + A general set of useful macro functions for use by CBA itself or by any module that uses CBA. + + Authors: + Sickboy and Spooner +*/ + +/* **************************************************** + New - Should be exported to general addon + Aim: + - Simplify (shorten) the amount of characters required for repetitive tasks + - Provide a solid structure that can be dynamic and easy editable (Which sometimes means we cannot adhere to Aim #1 ;-) + An example is the path that is built from defines. Some available in this file, others in mods and addons. + + Follows Standard: + Object variables: PREFIX_COMPONENT + Main-object variables: PREFIX_main + Paths: MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT\SCRIPTNAME.sqf + e.g: x\six\addons\sys_menu\fDate.sqf + + Usage: + define PREFIX and COMPONENT, then include this file + (Note, you could have a main addon for your mod, define the PREFIX in a macros.hpp, + and include this script_macros_common.hpp file. + Then in your addons, add a component.hpp, define the COMPONENT, + and include your mod's script_macros.hpp + In your scripts you can then include the addon's component.hpp with relative path) + + TODO: + - Try only to use 1 string type " vs ' + - Evaluate double functions, and simplification + - Evaluate naming scheme; current = prototype + - Evaluate "Debug" features.. + - Evaluate "create mini function per precompiled script, that will load the script on first usage, rather than on init" + - Also saw "Namespace" typeName, evaluate which we need :P + - Single/Multi player gamelogics? (Incase of MP, you would want only 1 gamelogic per component, which is pv'ed from server, etc) + */ + +#ifndef MAINPREFIX + #define MAINPREFIX x +#endif + +#ifndef SUBPREFIX + #define SUBPREFIX addons +#endif + +#ifndef MAINLOGIC + #define MAINLOGIC main +#endif + +#define ADDON DOUBLES(PREFIX,COMPONENT) +#define MAIN_ADDON DOUBLES(PREFIX,main) + +/* ------------------------------------------- +Macro: VERSION_CONFIG + Define CBA Versioning System config entries. + + VERSION should be a floating-point number (1 separator). + VERSION_STR is a string representation of the version. + VERSION_AR is an array representation of the version. + + VERSION must always be defined, otherwise it is 0. + VERSION_STR and VERSION_AR default to VERSION if undefined. + +Parameters: + None + +Example: + (begin example) + #define VERSION 1.0 + #define VERSION_STR 1.0.1 + #define VERSION_AR 1,0,1 + + class CfgPatches { + class MyMod_main { + VERSION_CONFIG; + }; + }; + (end) + +Author: + ?, Jonpas +------------------------------------------- */ +#ifndef VERSION + #define VERSION 0 +#endif + +#ifndef VERSION_STR + #define VERSION_STR VERSION +#endif + +#ifndef VERSION_AR + #define VERSION_AR VERSION +#endif + +#ifndef VERSION_CONFIG + #define VERSION_CONFIG version = VERSION; versionStr = QUOTE(VERSION_STR); versionAr[] = {VERSION_AR} +#endif + +/* ------------------------------------------- +Group: Debugging +------------------------------------------- */ + +/* ------------------------------------------- +Macros: DEBUG_MODE_x + Managing debugging based on debug level. + + According to the *highest* level of debugging that has been defined *before* script_macros_common.hpp is included, + only the appropriate debugging commands will be functional. With no level explicitely defined, assume DEBUG_MODE_NORMAL. + + DEBUG_MODE_FULL - Full debugging output. + DEBUG_MODE_NORMAL - All debugging except and (Default setting if none specified). + DEBUG_MODE_MINIMAL - Only and enabled. + +Examples: + In order to turn on full debugging for a single file, + (begin example) + // Top of individual script file. + #define DEBUG_MODE_FULL + #include "script_component.hpp" + (end) + + In order to force minimal debugging for a single component, + (begin example) + // Top of addons\\script_component.hpp + // Ensure that any FULL and NORMAL setting from the individual files are undefined and MINIMAL is set. + #ifdef DEBUG_MODE_FULL + #undef DEBUG_MODE_FULL + #endif + #ifdef DEBUG_MODE_NORMAL + #undef DEBUG_MODE_NORMAL + #endif + #ifndef DEBUG_MODE_MINIMAL + #define DEBUG_MODE_MINIMAL + #endif + #include "script_macros.hpp" + (end) + + In order to turn on full debugging for a whole addon, + (begin example) + // Top of addons\main\script_macros.hpp + #ifndef DEBUG_MODE_FULL + #define DEBUG_MODE_FULL + #endif + #include "\x\cba\addons\main\script_macros_common.hpp" + (end) + +Author: + Spooner +------------------------------------------- */ + +// If DEBUG_MODE_FULL, then also enable DEBUG_MODE_NORMAL. +#ifdef DEBUG_MODE_FULL +#define DEBUG_MODE_NORMAL +#endif + +// If DEBUG_MODE_NORMAL, then also enable DEBUG_MODE_MINIMAL. +#ifdef DEBUG_MODE_NORMAL +#define DEBUG_MODE_MINIMAL +#endif + +// If no debug modes specified, use DEBUG_MODE_NORMAL (+ DEBUG_MODE_MINIMAL). +#ifndef DEBUG_MODE_MINIMAL +#define DEBUG_MODE_NORMAL +#define DEBUG_MODE_MINIMAL +#endif + +#define LOG_SYS_FORMAT(LEVEL,MESSAGE) format ['[%1] (%2) %3: %4', toUpper 'PREFIX', 'COMPONENT', LEVEL, MESSAGE] + +#ifdef DEBUG_SYNCHRONOUS +#define LOG_SYS(LEVEL,MESSAGE) diag_log text LOG_SYS_FORMAT(LEVEL,MESSAGE) +#else +#define LOG_SYS(LEVEL,MESSAGE) LOG_SYS_FORMAT(LEVEL,MESSAGE) call CBA_fnc_log +#endif + +#define LOG_SYS_FILELINENUMBERS(LEVEL,MESSAGE) LOG_SYS(LEVEL,format [ARR_4('%1 %2:%3',MESSAGE,__FILE__,__LINE__ + 1)]) + +/* ------------------------------------------- +Macro: LOG() + Log a debug message into the RPT log. + + Only run if is defined. + +Parameters: + MESSAGE - Message to record + +Example: + (begin example) + LOG("Initiated clog-dancing simulator."); + (end) + +Author: + Spooner +------------------------------------------- */ +#ifdef DEBUG_MODE_FULL + +#define LOG(MESSAGE) LOG_SYS('LOG',MESSAGE) +#define LOG_1(MESSAGE,ARG1) LOG(FORMAT_1(MESSAGE,ARG1)) +#define LOG_2(MESSAGE,ARG1,ARG2) LOG(FORMAT_2(MESSAGE,ARG1,ARG2)) +#define LOG_3(MESSAGE,ARG1,ARG2,ARG3) LOG(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) +#define LOG_4(MESSAGE,ARG1,ARG2,ARG3,ARG4) LOG(FORMAT_4(MESSAGE,ARG1,ARG2,ARG3,ARG4)) +#define LOG_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5) LOG(FORMAT_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5)) +#define LOG_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) LOG(FORMAT_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6)) +#define LOG_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) LOG(FORMAT_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7)) +#define LOG_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) LOG(FORMAT_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8)) + +#else + +#define LOG(MESSAGE) /* disabled */ +#define LOG_1(MESSAGE,ARG1) /* disabled */ +#define LOG_2(MESSAGE,ARG1,ARG2) /* disabled */ +#define LOG_3(MESSAGE,ARG1,ARG2,ARG3) /* disabled */ +#define LOG_4(MESSAGE,ARG1,ARG2,ARG3,ARG4) /* disabled */ +#define LOG_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5) /* disabled */ +#define LOG_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) /* disabled */ +#define LOG_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) /* disabled */ +#define LOG_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) /* disabled */ + +#endif + +/* ------------------------------------------- +Macro: INFO() + Record a message without file and line number in the RPT log. + +Parameters: + MESSAGE - Message to record + +Example: + (begin example) + INFO("Mod X is loaded, do Y"); + (end) + +Author: + commy2 +------------------------------------------- */ +#define INFO(MESSAGE) LOG_SYS('INFO',MESSAGE) +#define INFO_1(MESSAGE,ARG1) INFO(FORMAT_1(MESSAGE,ARG1)) +#define INFO_2(MESSAGE,ARG1,ARG2) INFO(FORMAT_2(MESSAGE,ARG1,ARG2)) +#define INFO_3(MESSAGE,ARG1,ARG2,ARG3) INFO(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) +#define INFO_4(MESSAGE,ARG1,ARG2,ARG3,ARG4) INFO(FORMAT_4(MESSAGE,ARG1,ARG2,ARG3,ARG4)) +#define INFO_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5) INFO(FORMAT_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5)) +#define INFO_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) INFO(FORMAT_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6)) +#define INFO_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) INFO(FORMAT_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7)) +#define INFO_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) INFO(FORMAT_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8)) + +/* ------------------------------------------- +Macro: WARNING() + Record a non-critical error in the RPT log. + + Only run if or higher is defined. + +Parameters: + MESSAGE - Message to record + +Example: + (begin example) + WARNING("This function has been deprecated. Please don't use it in future!"); + (end) + +Author: + Spooner +------------------------------------------- */ +#ifdef DEBUG_MODE_NORMAL + +#define WARNING(MESSAGE) LOG_SYS('WARNING',MESSAGE) +#define WARNING_1(MESSAGE,ARG1) WARNING(FORMAT_1(MESSAGE,ARG1)) +#define WARNING_2(MESSAGE,ARG1,ARG2) WARNING(FORMAT_2(MESSAGE,ARG1,ARG2)) +#define WARNING_3(MESSAGE,ARG1,ARG2,ARG3) WARNING(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) +#define WARNING_4(MESSAGE,ARG1,ARG2,ARG3,ARG4) WARNING(FORMAT_4(MESSAGE,ARG1,ARG2,ARG3,ARG4)) +#define WARNING_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5) WARNING(FORMAT_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5)) +#define WARNING_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) WARNING(FORMAT_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6)) +#define WARNING_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) WARNING(FORMAT_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7)) +#define WARNING_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) WARNING(FORMAT_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8)) + +#else + +#define WARNING(MESSAGE) /* disabled */ +#define WARNING_1(MESSAGE,ARG1) /* disabled */ +#define WARNING_2(MESSAGE,ARG1,ARG2) /* disabled */ +#define WARNING_3(MESSAGE,ARG1,ARG2,ARG3) /* disabled */ +#define WARNING_4(MESSAGE,ARG1,ARG2,ARG3,ARG4) /* disabled */ +#define WARNING_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5) /* disabled */ +#define WARNING_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) /* disabled */ +#define WARNING_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) /* disabled */ +#define WARNING_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) /* disabled */ + +#endif + +/* ------------------------------------------- +Macro: ERROR() + Record a critical error in the RPT log. + +Parameters: + MESSAGE - Message to record + +Example: + (begin example) + ERROR("value of frog not found in config ...yada...yada..."); + (end) + +Author: + Spooner +------------------------------------------- */ +#define ERROR(MESSAGE) LOG_SYS('ERROR',MESSAGE) +#define ERROR_1(MESSAGE,ARG1) ERROR(FORMAT_1(MESSAGE,ARG1)) +#define ERROR_2(MESSAGE,ARG1,ARG2) ERROR(FORMAT_2(MESSAGE,ARG1,ARG2)) +#define ERROR_3(MESSAGE,ARG1,ARG2,ARG3) ERROR(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) +#define ERROR_4(MESSAGE,ARG1,ARG2,ARG3,ARG4) ERROR(FORMAT_4(MESSAGE,ARG1,ARG2,ARG3,ARG4)) +#define ERROR_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5) ERROR(FORMAT_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5)) +#define ERROR_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) ERROR(FORMAT_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6)) +#define ERROR_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) ERROR(FORMAT_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7)) +#define ERROR_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) ERROR(FORMAT_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8)) + +/* ------------------------------------------- +Macro: ERROR_MSG() + Record a critical error in the RPT log and display on screen error message. + + Newlines (\n) in the MESSAGE will be put on separate lines. + +Parameters: + MESSAGE - Message to record + +Example: + (begin example) + ERROR_MSG("value of frog not found in config ...yada...yada..."); + (end) + +Author: + commy2 +------------------------------------------- */ +#define ERROR_MSG(MESSAGE) ['PREFIX', 'COMPONENT', nil, MESSAGE, __FILE__, __LINE__ + 1] call CBA_fnc_error +#define ERROR_MSG_1(MESSAGE,ARG1) ERROR_MSG(FORMAT_1(MESSAGE,ARG1)) +#define ERROR_MSG_2(MESSAGE,ARG1,ARG2) ERROR_MSG(FORMAT_2(MESSAGE,ARG1,ARG2)) +#define ERROR_MSG_3(MESSAGE,ARG1,ARG2,ARG3) ERROR_MSG(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) +#define ERROR_MSG_4(MESSAGE,ARG1,ARG2,ARG3,ARG4) ERROR_MSG(FORMAT_4(MESSAGE,ARG1,ARG2,ARG3,ARG4)) +#define ERROR_MSG_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5) ERROR_MSG(FORMAT_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5)) +#define ERROR_MSG_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) ERROR_MSG(FORMAT_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6)) +#define ERROR_MSG_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) ERROR_MSG(FORMAT_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7)) +#define ERROR_MSG_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) ERROR_MSG(FORMAT_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8)) + +/* ------------------------------------------- +Macro: ERROR_WITH_TITLE() + Record a critical error in the RPT log. + + The title can be specified (in the heading is always just "ERROR") + Newlines (\n) in the MESSAGE will be put on separate lines. + +Parameters: + TITLE - Title of error message + MESSAGE - Body of error message + +Example: + (begin example) + ERROR_WITH_TITLE("Value not found","Value of frog not found in config ...yada...yada..."); + (end) + +Author: + Spooner +------------------------------------------- */ +#define ERROR_WITH_TITLE(TITLE,MESSAGE) ['PREFIX', 'COMPONENT', TITLE, MESSAGE, __FILE__, __LINE__ + 1] call CBA_fnc_error +#define ERROR_WITH_TITLE_1(TITLE,MESSAGE,ARG1) ERROR_WITH_TITLE(TITLE,FORMAT_1(MESSAGE,ARG1)) +#define ERROR_WITH_TITLE_2(TITLE,MESSAGE,ARG1,ARG2) ERROR_WITH_TITLE(TITLE,FORMAT_2(MESSAGE,ARG1,ARG2)) +#define ERROR_WITH_TITLE_3(TITLE,MESSAGE,ARG1,ARG2,ARG3) ERROR_WITH_TITLE(TITLE,FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) +#define ERROR_WITH_TITLE_4(TITLE,MESSAGE,ARG1,ARG2,ARG3,ARG4) ERROR_WITH_TITLE(TITLE,FORMAT_4(MESSAGE,ARG1,ARG2,ARG3,ARG4)) +#define ERROR_WITH_TITLE_5(TITLE,MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5) ERROR_WITH_TITLE(TITLE,FORMAT_5(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5)) +#define ERROR_WITH_TITLE_6(TITLE,MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) ERROR_WITH_TITLE(TITLE,FORMAT_6(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6)) +#define ERROR_WITH_TITLE_7(TITLE,MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) ERROR_WITH_TITLE(TITLE,FORMAT_7(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7)) +#define ERROR_WITH_TITLE_8(TITLE,MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) ERROR_WITH_TITLE(TITLE,FORMAT_8(MESSAGE,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8)) + +/* ------------------------------------------- +Macro: MESSAGE_WITH_TITLE() + Record a single line in the RPT log. + +Parameters: + TITLE - Title of log message + MESSAGE - Body of message + +Example: + (begin example) + MESSAGE_WITH_TITLE("Value found","Value of frog found in config "); + (end) + +Author: + Killswitch +------------------------------------------- */ +#define MESSAGE_WITH_TITLE(TITLE,MESSAGE) LOG_SYS_FILELINENUMBERS(TITLE,MESSAGE) + +/* ------------------------------------------- +Macro: RETDEF() + If a variable is undefined, return the default value. Otherwise, return the + variable itself. + +Parameters: + VARIABLE - the variable to check + DEFAULT_VALUE - the default value to use if variable is undefined + +Example: + (begin example) + // _var is undefined + hintSilent format ["_var=%1", RETDEF(_var,5)]; // "_var=5" + _var = 7; + hintSilent format ["_var=%1", RETDEF(_var,5)]; // "_var=7" + (end example) +Author: + 654wak654 +------------------------------------------- */ +#define RETDEF(VARIABLE,DEFAULT_VALUE) (if (isNil {VARIABLE}) then [{DEFAULT_VALUE}, {VARIABLE}]) + +/* ------------------------------------------- +Macro: RETNIL() + If a variable is undefined, return the value nil. Otherwise, return the + variable itself. + +Parameters: + VARIABLE - the variable to check + +Example: + (begin example) + // _var is undefined + hintSilent format ["_var=%1", RETNIL(_var)]; // "_var=any" + (end example) + +Author: + Alef (see CBA issue #8514) +------------------------------------------- */ +#define RETNIL(VARIABLE) RETDEF(VARIABLE,nil) + +/* ------------------------------------------- +Macros: TRACE_n() + Log a message and 1-8 variables to the RPT log. + + Only run if is defined. + + TRACE_1(MESSAGE,A) - Log 1 variable. + TRACE_2(MESSAGE,A,B) - Log 2 variables. + TRACE_3(MESSAGE,A,B,C) - Log 3 variables. + TRACE_4(MESSAGE,A,B,C,D) - Log 4 variables. + TRACE_5(MESSAGE,A,B,C,D,E) - Log 5 variables. + TRACE_6(MESSAGE,A,B,C,D,E,F) - Log 6 variables. + TRACE_7(MESSAGE,A,B,C,D,E,F,G) - Log 7 variables. + TRACE_8(MESSAGE,A,B,C,D,E,F,G,H) - Log 8 variables. + TRACE_9(MESSAGE,A,B,C,D,E,F,G,H,I) - Log 9 variables. + +Parameters: + MESSAGE - Message to add to the trace [String] + A..H - Variable names to log values of [Any] + +Example: + (begin example) + TRACE_3("After takeoff",_vehicle player,getPos (_vehicle player), getPosASL (_vehicle player)); + (end) + +Author: + Spooner +------------------------------------------- */ +#define PFORMAT_1(MESSAGE,A) \ + format ['%1: A=%2', MESSAGE, RETNIL(A)] + +#define PFORMAT_2(MESSAGE,A,B) \ + format ['%1: A=%2, B=%3', MESSAGE, RETNIL(A), RETNIL(B)] + +#define PFORMAT_3(MESSAGE,A,B,C) \ + format ['%1: A=%2, B=%3, C=%4', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C)] + +#define PFORMAT_4(MESSAGE,A,B,C,D) \ + format ['%1: A=%2, B=%3, C=%4, D=%5', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C), RETNIL(D)] + +#define PFORMAT_5(MESSAGE,A,B,C,D,E) \ + format ['%1: A=%2, B=%3, C=%4, D=%5, E=%6', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C), RETNIL(D), RETNIL(E)] + +#define PFORMAT_6(MESSAGE,A,B,C,D,E,F) \ + format ['%1: A=%2, B=%3, C=%4, D=%5, E=%6, F=%7', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C), RETNIL(D), RETNIL(E), RETNIL(F)] + +#define PFORMAT_7(MESSAGE,A,B,C,D,E,F,G) \ + format ['%1: A=%2, B=%3, C=%4, D=%5, E=%6, F=%7, G=%8', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C), RETNIL(D), RETNIL(E), RETNIL(F), RETNIL(G)] + +#define PFORMAT_8(MESSAGE,A,B,C,D,E,F,G,H) \ + format ['%1: A=%2, B=%3, C=%4, D=%5, E=%6, F=%7, G=%8, H=%9', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C), RETNIL(D), RETNIL(E), RETNIL(F), RETNIL(G), RETNIL(H)] + +#define PFORMAT_9(MESSAGE,A,B,C,D,E,F,G,H,I) \ + format ['%1: A=%2, B=%3, C=%4, D=%5, E=%6, F=%7, G=%8, H=%9, I=%10', MESSAGE, RETNIL(A), RETNIL(B), RETNIL(C), RETNIL(D), RETNIL(E), RETNIL(F), RETNIL(G), RETNIL(H), RETNIL(I)] + + +#ifdef DEBUG_MODE_FULL +#define TRACE_1(MESSAGE,A) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_1(str diag_frameNo + ' ' + (MESSAGE),A)) +#define TRACE_2(MESSAGE,A,B) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_2(str diag_frameNo + ' ' + (MESSAGE),A,B)) +#define TRACE_3(MESSAGE,A,B,C) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_3(str diag_frameNo + ' ' + (MESSAGE),A,B,C)) +#define TRACE_4(MESSAGE,A,B,C,D) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_4(str diag_frameNo + ' ' + (MESSAGE),A,B,C,D)) +#define TRACE_5(MESSAGE,A,B,C,D,E) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_5(str diag_frameNo + ' ' + (MESSAGE),A,B,C,D,E)) +#define TRACE_6(MESSAGE,A,B,C,D,E,F) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_6(str diag_frameNo + ' ' + (MESSAGE),A,B,C,D,E,F)) +#define TRACE_7(MESSAGE,A,B,C,D,E,F,G) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_7(str diag_frameNo + ' ' + (MESSAGE),A,B,C,D,E,F,G)) +#define TRACE_8(MESSAGE,A,B,C,D,E,F,G,H) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_8(str diag_frameNo + ' ' + (MESSAGE),A,B,C,D,E,F,G,H)) +#define TRACE_9(MESSAGE,A,B,C,D,E,F,G,H,I) LOG_SYS_FILELINENUMBERS('TRACE',PFORMAT_9(str diag_frameNo + ' ' + (MESSAGE),A,B,C,D,E,F,G,H,I)) +#else +#define TRACE_1(MESSAGE,A) /* disabled */ +#define TRACE_2(MESSAGE,A,B) /* disabled */ +#define TRACE_3(MESSAGE,A,B,C) /* disabled */ +#define TRACE_4(MESSAGE,A,B,C,D) /* disabled */ +#define TRACE_5(MESSAGE,A,B,C,D,E) /* disabled */ +#define TRACE_6(MESSAGE,A,B,C,D,E,F) /* disabled */ +#define TRACE_7(MESSAGE,A,B,C,D,E,F,G) /* disabled */ +#define TRACE_8(MESSAGE,A,B,C,D,E,F,G,H) /* disabled */ +#define TRACE_9(MESSAGE,A,B,C,D,E,F,G,H,I) /* disabled */ +#endif + +/* ------------------------------------------- +Group: General +------------------------------------------- */ + +// ************************************* +// Internal Functions +#define DOUBLES(var1,var2) var1##_##var2 +#define TRIPLES(var1,var2,var3) var1##_##var2##_##var3 +#define QUOTE(var1) #var1 + +#ifdef MODULAR + #define COMPONENT_T DOUBLES(t,COMPONENT) + #define COMPONENT_M DOUBLES(m,COMPONENT) + #define COMPONENT_S DOUBLES(s,COMPONENT) + #define COMPONENT_C DOUBLES(c,COMPONENT) + #define COMPONENT_F COMPONENT_C +#else + #define COMPONENT_T COMPONENT + #define COMPONENT_M COMPONENT + #define COMPONENT_S COMPONENT + #define COMPONENT_F COMPONENT + #define COMPONENT_C COMPONENT +#endif + +/* ------------------------------------------- +Macro: INC() + +Description: + Increase a number by one. + +Parameters: + VAR - Variable to increment [Number] + +Example: + (begin example) + _counter = 0; + INC(_counter); + // _counter => 1 + (end) + +Author: + Spooner +------------------------------------------- */ +#define INC(var) var = (var) + 1 + +/* ------------------------------------------- +Macro: DEC() + +Description: + Decrease a number by one. + +Parameters: + VAR - Variable to decrement [Number] + +Example: + (begin example) + _counter = 99; + DEC(_counter); + // _counter => 98 + (end) + +Author: + Spooner +------------------------------------------- */ +#define DEC(var) var = (var) - 1 + +/* ------------------------------------------- +Macro: ADD() + +Description: + Add a value to a variable. Variable and value should be both Numbers or both Strings. + +Parameters: + VAR - Variable to add to [Number or String] + VALUE - Value to add [Number or String] + +Examples: + (begin example) + _counter = 2; + ADD(_counter,3); + // _counter => 5 + (end) + (begin example) + _str = "hello"; + ADD(_str," "); + ADD(_str,"Fred"); + // _str => "hello Fred" + (end) + +Author: + Sickboy +------------------------------------------- */ +#define ADD(var1,var2) var1 = (var1) + (var2) + +/* ------------------------------------------- +Macro: SUB() + +Description: + Subtract a value from a number variable. VAR and VALUE should both be Numbers. + +Parameters: + VAR - Variable to subtract from [Number] + VALUE - Value to subtract [Number] + +Examples: + (begin example) + _numChickens = 2; + SUB(_numChickens,3); + // _numChickens => -1 + (end) +------------------------------------------- */ +#define SUB(var1,var2) var1 = (var1) - (var2) + +/* ------------------------------------------- +Macro: REM() + +Description: + Remove an element from an array each time it occurs. + + This recreates the entire array, so use BIS_fnc_removeIndex if modification of the original array is required + or if only one of the elements that matches ELEMENT needs to be removed. + +Parameters: + ARRAY - Array to modify [Array] + ELEMENT - Element to remove [Any] + +Examples: + (begin example) + _array = [1, 2, 3, 4, 3, 8]; + REM(_array,3); + // _array = [1, 2, 4, 8]; + (end) + +Author: + Spooner +------------------------------------------- */ +#define REM(var1,var2) SUB(var1,[var2]) + +/* ------------------------------------------- +Macro: PUSH() + +Description: + Appends a single value onto the end of an ARRAY. Change is made to the ARRAY itself, not creating a new array. + +Parameters: + ARRAY - Array to push element onto [Array] + ELEMENT - Element to push [Any] + +Examples: + (begin example) + _fish = ["blue", "green", "smelly"]; + PUSH(_fish,"monkey-flavoured"); + // _fish => ["blue", "green", "smelly", "monkey-flavoured"] + (end) + +Author: + Spooner +------------------------------------------- */ +#define PUSH(var1,var2) (var1) pushBack (var2) + +/* ------------------------------------------- +Macro: MAP() +Description: + Applies given code to each element of the array, then assigns the + resulting array to the original +Parameters: + ARRAY - Array to be modified + CODE - Code that'll be applied to each element of the array. +Example: + (begin example) + _array = [1, 2, 3, 4, 3, 8]; + MAP(_array,_x + 1); + // _array is now [2, 3, 4, 5, 4, 9]; + (end) +Author: + 654wak654 +------------------------------------------- */ +#define MAP(ARR,CODE) ARR = ARR apply {CODE} + +/* ------------------------------------------- +Macro: FILTER() +Description: + Filters an array based on given code, then assigns the resulting array + to the original +Parameters: + ARRAY - Array to be filtered + CODE - Condition to pick elements +Example: + (begin example) + _array = [1, 2, 3, 4, 3, 8]; + FILTER(_array,_x % 2 == 0) + // _array is now [2, 4, 8]; + (end) +Author: + Commy2 +------------------------------------------- */ +#define FILTER(ARR,CODE) ARR = ARR select {CODE} + +/* ------------------------------------------- +Macro: UNIQUE() +Description: + Removes duplicate values in given array +Parameters: + ARRAY - The array to be modified +Example: + (begin example) + _someArray = [4, 4, 5, 5, 5, 2]; + UNIQUE(_someArray); + // _someArray is now [4, 5, 2] + (end) +Author: + Commy2 +------------------------------------------- */ +#define UNIQUE(ARR) ARR = ARR arrayIntersect ARR + +/* ------------------------------------------- +Macro: INTERSECTION() +Description: + Finds unique common elements between two arrays and assigns them + to the first array +Parameters: + ARRAY0 - The array to be modified + ARRAY1 - The array to find intersections with +Example: + (begin example) + _someArray = [1, 2, 3, 4, 5, 5]; + _anotherArray = [4, 5, 6, 7]; + INTERSECTION(_someArray,_anotherArray); + // _someArray is now [4, 5] + (end) +Author: + 654wak654 +------------------------------------------- */ +#define INTERSECTION(ARG0,ARG1) ARG0 = ARG0 arrayIntersect (ARG1) + +/* ------------------------------------------- +Macro: ISNILS() + +Description: + Sets a variable with a value, but only if it is undefined. + +Parameters: + VARIABLE - Variable to set [Any, not nil] + DEFAULT_VALUE - Value to set VARIABLE to if it is undefined [Any, not nil] + +Examples: + (begin example) + // _fish is undefined + ISNILS(_fish,0); + // _fish => 0 + (end) + (begin example) + _fish = 12; + // ...later... + ISNILS(_fish,0); + // _fish => 12 + (end) + +Author: + Sickboy +------------------------------------------- */ +#define ISNILS(VARIABLE,DEFAULT_VALUE) if (isNil #VARIABLE) then { VARIABLE = DEFAULT_VALUE } +#define ISNILS2(var1,var2,var3,var4) ISNILS(TRIPLES(var1,var2,var3),var4) +#define ISNILS3(var1,var2,var3) ISNILS(DOUBLES(var1,var2),var3) +#define ISNIL(var1,var2) ISNILS2(PREFIX,COMPONENT,var1,var2) +#define ISNILMAIN(var1,var2) ISNILS3(PREFIX,var1,var2) + +#define CREATELOGICS(var1,var2) var1##_##var2 = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit ["LOGIC", [0, 0, 0], [], 0, "NONE"] +#define CREATELOGICLOCALS(var1,var2) var1##_##var2 = "LOGIC" createVehicleLocal [0, 0, 0] +#define CREATELOGICGLOBALS(var1,var2) var1##_##var2 = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit ["LOGIC", [0, 0, 0], [], 0, "NONE"]; publicVariable QUOTE(DOUBLES(var1,var2)) +#define CREATELOGICGLOBALTESTS(var1,var2) var1##_##var2 = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit [QUOTE(DOUBLES(ADDON,logic)), [0, 0, 0], [], 0, "NONE"] + +#define GETVARS(var1,var2,var3) (var1##_##var2 getVariable #var3) +#define GETVARMAINS(var1,var2) GETVARS(var1,MAINLOGIC,var2) + +#ifndef PATHTO_SYS + #define PATHTO_SYS(var1,var2,var3) \MAINPREFIX\var1\SUBPREFIX\var2\var3.sqf +#endif +#ifndef PATHTOF_SYS + #define PATHTOF_SYS(var1,var2,var3) \MAINPREFIX\var1\SUBPREFIX\var2\var3 +#endif + +#ifndef PATHTOF2_SYS + #define PATHTOF2_SYS(var1,var2,var3) MAINPREFIX\var1\SUBPREFIX\var2\var3 +#endif + +#define PATHTO_R(var1) PATHTOF2_SYS(PREFIX,COMPONENT_C,var1) +#define PATHTO_T(var1) PATHTOF_SYS(PREFIX,COMPONENT_T,var1) +#define PATHTO_M(var1) PATHTOF_SYS(PREFIX,COMPONENT_M,var1) +#define PATHTO_S(var1) PATHTOF_SYS(PREFIX,COMPONENT_S,var1) +#define PATHTO_C(var1) PATHTOF_SYS(PREFIX,COMPONENT_C,var1) +#define PATHTO_F(var1) PATHTO_SYS(PREFIX,COMPONENT_F,var1) + +// Already quoted "" +#define QPATHTO_R(var1) QUOTE(PATHTO_R(var1)) +#define QPATHTO_T(var1) QUOTE(PATHTO_T(var1)) +#define QPATHTO_M(var1) QUOTE(PATHTO_M(var1)) +#define QPATHTO_S(var1) QUOTE(PATHTO_S(var1)) +#define QPATHTO_C(var1) QUOTE(PATHTO_C(var1)) +#define QPATHTO_F(var1) QUOTE(PATHTO_F(var1)) + +// This only works for binarized configs after recompiling the pbos +// TODO: Reduce amount of calls / code.. +#define COMPILE_FILE2_CFG_SYS(var1) compile preprocessFileLineNumbers var1 +#define COMPILE_FILE2_SYS(var1) COMPILE_FILE2_CFG_SYS(var1) + +#define COMPILE_FILE_SYS(var1,var2,var3) COMPILE_FILE2_SYS('PATHTO_SYS(var1,var2,var3)') +#define COMPILE_FILE_CFG_SYS(var1,var2,var3) COMPILE_FILE2_CFG_SYS('PATHTO_SYS(var1,var2,var3)') + +#define SETVARS(var1,var2) var1##_##var2 setVariable +#define SETVARMAINS(var1) SETVARS(var1,MAINLOGIC) +#define GVARMAINS(var1,var2) var1##_##var2 +#define CFGSETTINGSS(var1,var2) configFile >> "CfgSettings" >> #var1 >> #var2 +//#define SETGVARS(var1,var2,var3) var1##_##var2##_##var3 = +//#define SETGVARMAINS(var1,var2) var1##_##var2 = + +// Compile-Once, JIT: On first use. +// #define PREPMAIN_SYS(var1,var2,var3) var1##_fnc_##var3 = { var1##_fnc_##var3 = COMPILE_FILE_SYS(var1,var2,DOUBLES(fnc,var3)); if (isNil "_this") then { call var1##_fnc_##var3 } else { _this call var1##_fnc_##var3 } } +// #define PREP_SYS(var1,var2,var3) var1##_##var2##_fnc_##var3 = { var1##_##var2##_fnc_##var3 = COMPILE_FILE_SYS(var1,var2,DOUBLES(fnc,var3)); if (isNil "_this") then { call var1##_##var2##_fnc_##var3 } else { _this call var1##_##var2##_fnc_##var3 } } +// #define PREP_SYS2(var1,var2,var3,var4) var1##_##var2##_fnc_##var4 = { var1##_##var2##_fnc_##var4 = COMPILE_FILE_SYS(var1,var3,DOUBLES(fnc,var4)); if (isNil "_this") then { call var1##_##var2##_fnc_##var4 } else { _this call var1##_##var2##_fnc_##var4 } } + +// Compile-Once, at Macro. As opposed to Compile-Once, on first use. +#define PREPMAIN_SYS(var1,var2,var3) var1##_fnc_##var3 = COMPILE_FILE_SYS(var1,var2,DOUBLES(fnc,var3)) +#define PREP_SYS(var1,var2,var3) var1##_##var2##_fnc_##var3 = COMPILE_FILE_SYS(var1,var2,DOUBLES(fnc,var3)) +#define PREP_SYS2(var1,var2,var3,var4) var1##_##var2##_fnc_##var4 = COMPILE_FILE_SYS(var1,var3,DOUBLES(fnc,var4)) + +#define LSTR(var1) TRIPLES(ADDON,STR,var1) + +#ifndef DEBUG_SETTINGS + #define DEBUG_SETTINGS [false, true, false] +#endif + +#define MSG_INIT QUOTE(Initializing: ADDON version: VERSION) + +// ************************************* +// User Functions +#define CFGSETTINGS CFGSETTINGSS(PREFIX,COMPONENT) +#define PATHTO(var1) PATHTO_SYS(PREFIX,COMPONENT_F,var1) +#define PATHTOF(var1) PATHTOF_SYS(PREFIX,COMPONENT,var1) +#define PATHTOEF(var1,var2) PATHTOF_SYS(PREFIX,var1,var2) +#define QPATHTOF(var1) QUOTE(PATHTOF(var1)) +#define QPATHTOEF(var1,var2) QUOTE(PATHTOEF(var1,var2)) + +#define COMPILE_FILE(var1) COMPILE_FILE_SYS(PREFIX,COMPONENT_F,var1) +#define COMPILE_FILE_CFG(var1) COMPILE_FILE_CFG_SYS(PREFIX,COMPONENT_F,var1) +#define COMPILE_FILE2(var1) COMPILE_FILE2_SYS('var1') +#define COMPILE_FILE2_CFG(var1) COMPILE_FILE2_CFG_SYS('var1') + + +#define VERSIONING_SYS(var1) class CfgSettings \ +{ \ + class CBA \ + { \ + class Versioning \ + { \ + class var1 \ + { \ + }; \ + }; \ + }; \ +}; + +#define VERSIONING VERSIONING_SYS(PREFIX) + +/* ------------------------------------------- +Macro: GVAR() + Get full variable identifier for a global variable owned by this component. + +Parameters: + VARIABLE - Partial name of global variable owned by this component [Any]. + +Example: + (begin example) + GVAR(frog) = 12; + // In SPON_FrogDancing component, equivalent to SPON_FrogDancing_frog = 12 + (end) + +Author: + Sickboy +------------------------------------------- */ +#define GVAR(var1) DOUBLES(ADDON,var1) +#define EGVAR(var1,var2) TRIPLES(PREFIX,var1,var2) +#define QGVAR(var1) QUOTE(GVAR(var1)) +#define QEGVAR(var1,var2) QUOTE(EGVAR(var1,var2)) +#define QQGVAR(var1) QUOTE(QGVAR(var1)) +#define QQEGVAR(var1,var2) QUOTE(QEGVAR(var1,var2)) + +/* ------------------------------------------- +Macro: GVARMAIN() + Get full variable identifier for a global variable owned by this addon. + +Parameters: + VARIABLE - Partial name of global variable owned by this addon [Any]. + +Example: + (begin example) + GVARMAIN(frog) = 12; + // In SPON_FrogDancing component, equivalent to SPON_frog = 12 + (end) + +Author: + Sickboy +------------------------------------------- */ +#define GVARMAIN(var1) GVARMAINS(PREFIX,var1) +#define QGVARMAIN(var1) QUOTE(GVARMAIN(var1)) +#define QQGVARMAIN(var1) QUOTE(QGVARMAIN(var1)) +// TODO: What's this? +#define SETTINGS DOUBLES(PREFIX,settings) +#define CREATELOGIC CREATELOGICS(PREFIX,COMPONENT) +#define CREATELOGICGLOBAL CREATELOGICGLOBALS(PREFIX,COMPONENT) +#define CREATELOGICGLOBALTEST CREATELOGICGLOBALTESTS(PREFIX,COMPONENT) +#define CREATELOGICLOCAL CREATELOGICLOCALS(PREFIX,COMPONENT) +#define CREATELOGICMAIN CREATELOGICS(PREFIX,MAINLOGIC) +#define GETVAR(var1) GETVARS(PREFIX,COMPONENT,var1) +#define SETVAR SETVARS(PREFIX,COMPONENT) +#define SETVARMAIN SETVARMAINS(PREFIX) +#define IFCOUNT(var1,var2,var3) if (count var1 > var2) then { var3 = var1 select var2 }; + +/* ------------------------------------------- +Macro: PREP() + +Description: + Defines a function. + + Full file path: + '\MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT\fnc_.sqf' + + Resulting function name: + 'PREFIX_COMPONENT_' + + The PREP macro should be placed in a script run by a XEH preStart and XEH preInit event. + + The PREP macro allows for CBA function caching, which drastically speeds up load times. + Beware though that function caching is enabled by default and as such to disable it, you need to + #define DISABLE_COMPILE_CACHE above your #include "script_components.hpp" include! + + The function will be defined in ui and mission namespace. It can not be overwritten without + a mission restart. + +Parameters: + FUNCTION NAME - Name of the function, unquoted + +Examples: + (begin example) + PREP(banana); + call FUNC(banana); + (end) + +Author: + dixon13 + ------------------------------------------- */ +//#define PREP(var1) PREP_SYS(PREFIX,COMPONENT_F,var1) + +#ifdef DISABLE_COMPILE_CACHE + #define PREP(var1) TRIPLES(ADDON,fnc,var1) = compile preProcessFileLineNumbers 'PATHTO_SYS(PREFIX,COMPONENT_F,DOUBLES(fnc,var1))' + #define PREPMAIN(var1) TRIPLES(PREFIX,fnc,var1) = compile preProcessFileLineNumbers 'PATHTO_SYS(PREFIX,COMPONENT_F,DOUBLES(fnc,var1))' +#else + #define PREP(var1) ['PATHTO_SYS(PREFIX,COMPONENT_F,DOUBLES(fnc,var1))', 'TRIPLES(ADDON,fnc,var1)'] call SLX_XEH_COMPILE_NEW + #define PREPMAIN(var1) ['PATHTO_SYS(PREFIX,COMPONENT_F,DOUBLES(fnc,var1))', 'TRIPLES(PREFIX,fnc,var1)'] call SLX_XEH_COMPILE_NEW +#endif + +/* ------------------------------------------- +Macro: PATHTO_FNC() + +Description: + Defines a function inside CfgFunctions. + + Full file path in addons: + '\MAINPREFIX\PREFIX\SUBPREFIX\COMPONENT\fnc_.sqf' + Define 'RECOMPILE' to enable recompiling. + Define 'SKIP_FUNCTION_HEADER' to skip adding function header. + +Parameters: + FUNCTION NAME - Name of the function, unquoted + +Examples: + (begin example) + // file name: fnc_addPerFrameHandler.sqf + class CfgFunctions { + class CBA { + class Misc { + PATHTO_FNC(addPerFrameHandler); + }; + }; + }; + // -> CBA_fnc_addPerFrameHandler + (end) + +Author: + dixon13, commy2 + ------------------------------------------- */ +#ifdef RECOMPILE + #undef RECOMPILE + #define RECOMPILE recompile = 1 +#else + #define RECOMPILE recompile = 0 +#endif +// Set function header type: -1 - no header; 0 - default header; 1 - system header. +#ifdef SKIP_FUNCTION_HEADER + #define CFGFUNCTION_HEADER headerType = -1 +#else + #define CFGFUNCTION_HEADER headerType = 0 +#endif + +#define PATHTO_FNC(func) class func {\ + file = QPATHTOF(DOUBLES(fnc,func).sqf);\ + CFGFUNCTION_HEADER;\ + RECOMPILE;\ +} + +#define FUNC(var1) TRIPLES(ADDON,fnc,var1) +#define FUNCMAIN(var1) TRIPLES(PREFIX,fnc,var1) +#define FUNC_INNER(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2) +#define EFUNC(var1,var2) FUNC_INNER(var1,var2) +#define QFUNC(var1) QUOTE(FUNC(var1)) +#define QFUNCMAIN(var1) QUOTE(FUNCMAIN(var1)) +#define QFUNC_INNER(var1,var2) QUOTE(FUNC_INNER(var1,var2)) +#define QEFUNC(var1,var2) QUOTE(EFUNC(var1,var2)) +#define QQFUNC(var1) QUOTE(QFUNC(var1)) +#define QQFUNCMAIN(var1) QUOTE(QFUNCMAIN(var1)) +#define QQFUNC_INNER(var1,var2) QUOTE(QFUNC_INNER(var1,var2)) +#define QQEFUNC(var1,var2) QUOTE(QEFUNC(var1,var2)) + +#ifndef PRELOAD_ADDONS + #define PRELOAD_ADDONS class CfgAddons \ +{ \ + class PreloadAddons \ + { \ + class ADDON \ + { \ + list[]={ QUOTE(ADDON) }; \ + }; \ + }; \ +} +#endif + +/* ------------------------------------------- +Macros: ARG_#() + Select from list of array arguments + +Parameters: + VARIABLE(1-8) - elements for the list + +Author: + Rommel +------------------------------------------- */ +#define ARG_1(A,B) ((A) select (B)) +#define ARG_2(A,B,C) (ARG_1(ARG_1(A,B),C)) +#define ARG_3(A,B,C,D) (ARG_1(ARG_2(A,B,C),D)) +#define ARG_4(A,B,C,D,E) (ARG_1(ARG_3(A,B,C,D),E)) +#define ARG_5(A,B,C,D,E,F) (ARG_1(ARG_4(A,B,C,D,E),F)) +#define ARG_6(A,B,C,D,E,F,G) (ARG_1(ARG_5(A,B,C,D,E,F),G)) +#define ARG_7(A,B,C,D,E,F,G,H) (ARG_1(ARG_6(A,B,C,D,E,E,F,G),H)) +#define ARG_8(A,B,C,D,E,F,G,H,I) (ARG_1(ARG_7(A,B,C,D,E,E,F,G,H),I)) + +/* ------------------------------------------- +Macros: ARR_#() + Create list from arguments. Useful for working around , in macro parameters. + 1-8 arguments possible. + +Parameters: + VARIABLE(1-8) - elements for the list + +Author: + Nou +------------------------------------------- */ +#define ARR_1(ARG1) ARG1 +#define ARR_2(ARG1,ARG2) ARG1, ARG2 +#define ARR_3(ARG1,ARG2,ARG3) ARG1, ARG2, ARG3 +#define ARR_4(ARG1,ARG2,ARG3,ARG4) ARG1, ARG2, ARG3, ARG4 +#define ARR_5(ARG1,ARG2,ARG3,ARG4,ARG5) ARG1, ARG2, ARG3, ARG4, ARG5 +#define ARR_6(ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) ARG1, ARG2, ARG3, ARG4, ARG5, ARG6 +#define ARR_7(ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7 +#define ARR_8(ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8 + +/* ------------------------------------------- +Macros: FORMAT_#(STR, ARG1) + Format - Useful for working around , in macro parameters. + 1-8 arguments possible. + +Parameters: + STRING - string used by format + VARIABLE(1-8) - elements for usage in format + +Author: + Nou & Sickboy +------------------------------------------- */ +#define FORMAT_1(STR,ARG1) format[STR, ARG1] +#define FORMAT_2(STR,ARG1,ARG2) format[STR, ARG1, ARG2] +#define FORMAT_3(STR,ARG1,ARG2,ARG3) format[STR, ARG1, ARG2, ARG3] +#define FORMAT_4(STR,ARG1,ARG2,ARG3,ARG4) format[STR, ARG1, ARG2, ARG3, ARG4] +#define FORMAT_5(STR,ARG1,ARG2,ARG3,ARG4,ARG5) format[STR, ARG1, ARG2, ARG3, ARG4, ARG5] +#define FORMAT_6(STR,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6) format[STR, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6] +#define FORMAT_7(STR,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7) format[STR, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7] +#define FORMAT_8(STR,ARG1,ARG2,ARG3,ARG4,ARG5,ARG6,ARG7,ARG8) format[STR, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8] + +// CONTROL(46) 12 +#define DISPLAY(A) (findDisplay A) +#define CONTROL(A) DISPLAY(A) displayCtrl + +/* ------------------------------------------- +Macros: IS_x() + Checking the data types of variables. + + IS_ARRAY() - Array + IS_BOOL() - Boolean + IS_BOOLEAN() - UI display handle(synonym for ) + IS_CODE() - Code block (i.e a compiled function) + IS_CONFIG() - Configuration + IS_CONTROL() - UI control handle. + IS_DISPLAY() - UI display handle. + IS_FUNCTION() - A compiled function (synonym for ) + IS_GROUP() - Group. + IS_INTEGER() - Is a number a whole number? + IS_LOCATION() - World location. + IS_NUMBER() - A floating point number (synonym for ) + IS_OBJECT() - World object. + IS_SCALAR() - Floating point number. + IS_SCRIPT() - A script handle (as returned by execVM and spawn commands). + IS_SIDE() - Game side. + IS_STRING() - World object. + IS_TEXT() - Structured text. + +Parameters: + VARIABLE - Variable to check if it is of a particular type [Any, not nil] + +Author: + Spooner +------------------------------------------- */ +#define IS_META_SYS(VAR,TYPE) (if (isNil {VAR}) then {false} else {(VAR) isEqualType TYPE}) +#define IS_ARRAY(VAR) IS_META_SYS(VAR,[]) +#define IS_BOOL(VAR) IS_META_SYS(VAR,false) +#define IS_CODE(VAR) IS_META_SYS(VAR,{}) +#define IS_CONFIG(VAR) IS_META_SYS(VAR,configNull) +#define IS_CONTROL(VAR) IS_META_SYS(VAR,controlNull) +#define IS_DISPLAY(VAR) IS_META_SYS(VAR,displayNull) +#define IS_GROUP(VAR) IS_META_SYS(VAR,grpNull) +#define IS_OBJECT(VAR) IS_META_SYS(VAR,objNull) +#define IS_SCALAR(VAR) IS_META_SYS(VAR,0) +#define IS_SCRIPT(VAR) IS_META_SYS(VAR,scriptNull) +#define IS_SIDE(VAR) IS_META_SYS(VAR,west) +#define IS_STRING(VAR) IS_META_SYS(VAR,"STRING") +#define IS_TEXT(VAR) IS_META_SYS(VAR,text "") +#define IS_LOCATION(VAR) IS_META_SYS(VAR,locationNull) + +#define IS_BOOLEAN(VAR) IS_BOOL(VAR) +#define IS_FUNCTION(VAR) IS_CODE(VAR) +#define IS_INTEGER(VAR) (if (IS_SCALAR(VAR)) then {floor (VAR) == (VAR)} else {false}) +#define IS_NUMBER(VAR) IS_SCALAR(VAR) + +#define FLOAT_TO_STRING(num) (if (_this == 0) then {"0"} else {str parseNumber (str (_this % _this) + str floor abs _this) + "." + (str (abs _this - floor abs _this) select [2]) + "0"}) + +/* ------------------------------------------- +Macro: SCRIPT() + Sets name of script (relies on PREFIX and COMPONENT values being #defined). + Define 'SKIP_SCRIPT_NAME' to skip adding scriptName. + +Parameters: + NAME - Name of script [Indentifier] + +Example: + (begin example) + SCRIPT(eradicateMuppets); + (end) + +Author: + Spooner +------------------------------------------- */ +#ifndef SKIP_SCRIPT_NAME + #define SCRIPT(NAME) scriptName 'PREFIX\COMPONENT\NAME' +#else + #define SCRIPT(NAME) /* nope */ +#endif + +/* ------------------------------------------- +Macros: EXPLODE_n() + DEPRECATED - Use param/params commands added in Arma 3 1.48 + + Splitting an ARRAY into a number of variables (A, B, C, etc). + + Note that this NOT does make the created variables private. + _PVT variants do. + + EXPLODE_1(ARRAY,A,B) - Split a 1-element array into separate variable. + EXPLODE_2(ARRAY,A,B) - Split a 2-element array into separate variables. + EXPLODE_3(ARRAY,A,B,C) - Split a 3-element array into separate variables. + EXPLODE_4(ARRAY,A,B,C,D) - Split a 4-element array into separate variables. + EXPLODE_5(ARRAY,A,B,C,D,E) - Split a 5-element array into separate variables. + EXPLODE_6(ARRAY,A,B,C,D,E,F) - Split a 6-element array into separate variables. + EXPLODE_7(ARRAY,A,B,C,D,E,F,G) - Split a 7-element array into separate variables. + EXPLODE_8(ARRAY,A,B,C,D,E,F,G,H) - Split a 8-element array into separate variables. + EXPLODE_9(ARRAY,A,B,C,D,E,F,G,H,I) - Split a 9-element array into separate variables. + +Parameters: + ARRAY - Array to read from [Array] + A..H - Names of variables to set from array [Identifier] + +Example: + (begin example) + _array = ["fred", 156.8, 120.9]; + EXPLODE_3(_array,_name,_height,_weight); + (end) + +Author: + Spooner +------------------------------------------- */ +#define EXPLODE_1_SYS(ARRAY,A) A = ARRAY param [0] +#define EXPLODE_1(ARRAY,A) EXPLODE_1_SYS(ARRAY,A); TRACE_1("EXPLODE_1, " + QUOTE(ARRAY),A) +#define EXPLODE_1_PVT(ARRAY,A) ARRAY params [#A]; TRACE_1("EXPLODE_1, " + QUOTE(ARRAY),A) + +#define EXPLODE_2_SYS(ARRAY,A,B) EXPLODE_1_SYS(ARRAY,A); B = ARRAY param [1] +#define EXPLODE_2(ARRAY,A,B) EXPLODE_2_SYS(ARRAY,A,B); TRACE_2("EXPLODE_2, " + QUOTE(ARRAY),A,B) +#define EXPLODE_2_PVT(ARRAY,A,B) ARRAY params [#A,#B]; TRACE_2("EXPLODE_2, " + QUOTE(ARRAY),A,B) + +#define EXPLODE_3_SYS(ARRAY,A,B,C) EXPLODE_2_SYS(ARRAY,A,B); C = ARRAY param [2] +#define EXPLODE_3(ARRAY,A,B,C) EXPLODE_3_SYS(ARRAY,A,B,C); TRACE_3("EXPLODE_3, " + QUOTE(ARRAY),A,B,C) +#define EXPLODE_3_PVT(ARRAY,A,B,C) ARRAY params [#A,#B,#C]; TRACE_3("EXPLODE_3, " + QUOTE(ARRAY),A,B,C) + +#define EXPLODE_4_SYS(ARRAY,A,B,C,D) EXPLODE_3_SYS(ARRAY,A,B,C); D = ARRAY param [3] +#define EXPLODE_4(ARRAY,A,B,C,D) EXPLODE_4_SYS(ARRAY,A,B,C,D); TRACE_4("EXPLODE_4, " + QUOTE(ARRAY),A,B,C,D) +#define EXPLODE_4_PVT(ARRAY,A,B,C,D) ARRAY params [#A,#B,#C,#D]; TRACE_4("EXPLODE_4, " + QUOTE(ARRAY),A,B,C,D) + +#define EXPLODE_5_SYS(ARRAY,A,B,C,D,E) EXPLODE_4_SYS(ARRAY,A,B,C,D); E = ARRAY param [4] +#define EXPLODE_5(ARRAY,A,B,C,D,E) EXPLODE_5_SYS(ARRAY,A,B,C,D,E); TRACE_5("EXPLODE_5, " + QUOTE(ARRAY),A,B,C,D,E) +#define EXPLODE_5_PVT(ARRAY,A,B,C,D,E) ARRAY params [#A,#B,#C,#D,#E]; TRACE_5("EXPLODE_5, " + QUOTE(ARRAY),A,B,C,D,E) + +#define EXPLODE_6_SYS(ARRAY,A,B,C,D,E,F) EXPLODE_5_SYS(ARRAY,A,B,C,D,E); F = ARRAY param [5] +#define EXPLODE_6(ARRAY,A,B,C,D,E,F) EXPLODE_6_SYS(ARRAY,A,B,C,D,E,F); TRACE_6("EXPLODE_6, " + QUOTE(ARRAY),A,B,C,D,E,F) +#define EXPLODE_6_PVT(ARRAY,A,B,C,D,E,F) ARRAY params [#A,#B,#C,#D,#E,#F]; TRACE_6("EXPLODE_6, " + QUOTE(ARRAY),A,B,C,D,E,F) + +#define EXPLODE_7_SYS(ARRAY,A,B,C,D,E,F,G) EXPLODE_6_SYS(ARRAY,A,B,C,D,E,F); G = ARRAY param [6] +#define EXPLODE_7(ARRAY,A,B,C,D,E,F,G) EXPLODE_7_SYS(ARRAY,A,B,C,D,E,F,G); TRACE_7("EXPLODE_7, " + QUOTE(ARRAY),A,B,C,D,E,F,G) +#define EXPLODE_7_PVT(ARRAY,A,B,C,D,E,F,G) ARRAY params [#A,#B,#C,#D,#E,#F,#G]; TRACE_7("EXPLODE_7, " + QUOTE(ARRAY),A,B,C,D,E,F,G) + +#define EXPLODE_8_SYS(ARRAY,A,B,C,D,E,F,G,H) EXPLODE_7_SYS(ARRAY,A,B,C,D,E,F,G); H = ARRAY param [7] +#define EXPLODE_8(ARRAY,A,B,C,D,E,F,G,H) EXPLODE_8_SYS(ARRAY,A,B,C,D,E,F,G,H); TRACE_8("EXPLODE_8, " + QUOTE(ARRAY),A,B,C,D,E,F,G,H) +#define EXPLODE_8_PVT(ARRAY,A,B,C,D,E,F,G,H) ARRAY params [#A,#B,#C,#D,#E,#F,#G,#H]; TRACE_8("EXPLODE_8, " + QUOTE(ARRAY),A,B,C,D,E,F,G,H) + +#define EXPLODE_9_SYS(ARRAY,A,B,C,D,E,F,G,H,I) EXPLODE_8_SYS(ARRAY,A,B,C,D,E,F,G,H); I = ARRAY param [8] +#define EXPLODE_9(ARRAY,A,B,C,D,E,F,G,H,I) EXPLODE_9_SYS(ARRAY,A,B,C,D,E,F,G,H,I); TRACE_9("EXPLODE_9, " + QUOTE(ARRAY),A,B,C,D,E,F,G,H,I) +#define EXPLODE_9_PVT(ARRAY,A,B,C,D,E,F,G,H,I) ARRAY params [#A,#B,#C,#D,#E,#F,#G,#H,#I]; TRACE_9("EXPLODE_9, " + QUOTE(ARRAY),A,B,C,D,E,F,G,H,I) + +/* ------------------------------------------- +Macro: xSTRING() + Get full string identifier from a stringtable owned by this component. + +Parameters: + VARIABLE - Partial name of global variable owned by this component [Any]. + +Example: + ADDON is CBA_Balls. + (begin example) + // Localized String (localize command must still be used with it) + LSTRING(Example); // STR_CBA_Balls_Example; + // Config String (note the $) + CSTRING(Example); // $STR_CBA_Balls_Example; + (end) + +Author: + Jonpas +------------------------------------------- */ +#ifndef STRING_MACROS_GUARD +#define STRING_MACROS_GUARD + #define LSTRING(var1) QUOTE(TRIPLES(STR,ADDON,var1)) + #define ELSTRING(var1,var2) QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2)) + #define CSTRING(var1) QUOTE(TRIPLES($STR,ADDON,var1)) + #define ECSTRING(var1,var2) QUOTE(TRIPLES($STR,DOUBLES(PREFIX,var1),var2)) + + #define LLSTRING(var1) localize QUOTE(TRIPLES(STR,ADDON,var1)) + #define LELSTRING(var1,var2) localize QUOTE(TRIPLES(STR,DOUBLES(PREFIX,var1),var2)) +#endif + + +/* ------------------------------------------- +Group: Managing Function Parameters +------------------------------------------- */ + +/* ------------------------------------------- +Macros: PARAMS_n() + DEPRECATED - Use param/params commands added in Arma 3 1.48 + + Setting variables based on parameters passed to a function. + + Each parameter is defines as private and set to the appropriate value from _this. + + PARAMS_1(A) - Get 1 parameter from the _this array (or _this if it's not an array). + PARAMS_2(A,B) - Get 2 parameters from the _this array. + PARAMS_3(A,B,C) - Get 3 parameters from the _this array. + PARAMS_4(A,B,C,D) - Get 4 parameters from the _this array. + PARAMS_5(A,B,C,D,E) - Get 5 parameters from the _this array. + PARAMS_6(A,B,C,D,E,F) - Get 6 parameters from the _this array. + PARAMS_7(A,B,C,D,E,F,G) - Get 7 parameters from the _this array. + PARAMS_8(A,B,C,D,E,F,G,H) - Get 8 parameters from the _this array. + +Parameters: + A..H - Name of variable to read from _this [Identifier] + +Example: + A function called like this: + (begin example) + [_name,_address,_telephone] call recordPersonalDetails; + (end) + expects 3 parameters and those variables could be initialised at the start of the function definition with: + (begin example) + recordPersonalDetails = { + PARAMS_3(_name,_address,_telephone); + // Rest of function follows... + }; + (end) + +Author: + Spooner +------------------------------------------- */ +#define PARAMS_1(A) EXPLODE_1_PVT(_this,A) +#define PARAMS_2(A,B) EXPLODE_2_PVT(_this,A,B) +#define PARAMS_3(A,B,C) EXPLODE_3_PVT(_this,A,B,C) +#define PARAMS_4(A,B,C,D) EXPLODE_4_PVT(_this,A,B,C,D) +#define PARAMS_5(A,B,C,D,E) EXPLODE_5_PVT(_this,A,B,C,D,E) +#define PARAMS_6(A,B,C,D,E,F) EXPLODE_6_PVT(_this,A,B,C,D,E,F) +#define PARAMS_7(A,B,C,D,E,F,G) EXPLODE_7_PVT(_this,A,B,C,D,E,F,G) +#define PARAMS_8(A,B,C,D,E,F,G,H) EXPLODE_8_PVT(_this,A,B,C,D,E,F,G,H) +#define PARAMS_9(A,B,C,D,E,F,G,H,I) EXPLODE_9_PVT(_this,A,B,C,D,E,F,G,H,I) + +/* ------------------------------------------- +Macro: DEFAULT_PARAM() + DEPRECATED - Use param/params commands added in Arma 3 1.48 + + Getting a default function parameter. This may be used together with to have a mix of required and + optional parameters. + +Parameters: + INDEX - Index of parameter in _this [Integer, 0+] + NAME - Name of the variable to set [Identifier] + DEF_VALUE - Default value to use in case the array is too short or the value at INDEX is nil [Any] + +Example: + A function called with optional parameters: + (begin example) + [_name] call myFunction; + [_name, _numberOfLegs] call myFunction; + [_name, _numberOfLegs, _hasAHead] call myFunction; + (end) + 1 required parameter and 2 optional parameters. Those variables could be initialised at the start of the function + definition with: + (begin example) + myFunction = { + PARAMS_1(_name); + DEFAULT_PARAM(1,_numberOfLegs,2); + DEFAULT_PARAM(2,_hasAHead,true); + // Rest of function follows... + }; + (end) + +Author: + Spooner +------------------------------------------- */ +#define DEFAULT_PARAM(INDEX,NAME,DEF_VALUE) \ + private [#NAME,"_this"]; \ + ISNILS(_this,[]); \ + NAME = _this param [INDEX, DEF_VALUE]; \ + TRACE_3("DEFAULT_PARAM",INDEX,NAME,DEF_VALUE) + +/* ------------------------------------------- +Macro: KEY_PARAM() + Get value from key in _this list, return default when key is not included in list. + +Parameters: + KEY - Key name [String] + NAME - Name of the variable to set [Identifier] + DEF_VALUE - Default value to use in case key not found [ANY] + +Example: + + +Author: + Muzzleflash +------------------------------------------- */ +#define KEY_PARAM(KEY,NAME,DEF_VALUE) \ + private #NAME; \ + NAME = [toLower KEY, toUpper KEY, DEF_VALUE, RETNIL(_this)] call CBA_fnc_getArg; \ + TRACE_3("KEY_PARAM",KEY,NAME,DEF_VALUE) + +/* ------------------------------------------- +Group: Assertions +------------------------------------------- */ + +#define ASSERTION_ERROR(MESSAGE) ERROR_WITH_TITLE("Assertion failed!",MESSAGE) + +/* ------------------------------------------- +Macro: ASSERT_TRUE() + Asserts that a CONDITION is true. When an assertion fails, an error is raised with the given MESSAGE. + +Parameters: + CONDITION - Condition to assert as true [Boolean] + MESSSAGE - Message to display if (A OPERATOR B) is false [String] + +Example: + (begin example) + ASSERT_TRUE(_frogIsDead,"The frog is alive"); + (end) + +Author: + Spooner +------------------------------------------- */ +#define ASSERT_TRUE(CONDITION,MESSAGE) \ + if (not (CONDITION)) then \ + { \ + ASSERTION_ERROR('Assertion (CONDITION) failed!\n\n' + (MESSAGE)); \ + } + +/* ------------------------------------------- +Macro: ASSERT_FALSE() + Asserts that a CONDITION is false. When an assertion fails, an error is raised with the given MESSAGE. + +Parameters: + CONDITION - Condition to assert as false [Boolean] + MESSSAGE - Message to display if (A OPERATOR B) is true [String] + +Example: + (begin example) + ASSERT_FALSE(_frogIsDead,"The frog died"); + (end) + +Author: + Spooner +------------------------------------------- */ +#define ASSERT_FALSE(CONDITION,MESSAGE) \ + if (CONDITION) then \ + { \ + ASSERTION_ERROR('Assertion (not (CONDITION)) failed!\n\n' + (MESSAGE)) \ + } + +/* ------------------------------------------- +Macro: ASSERT_OP() + Asserts that (A OPERATOR B) is true. When an assertion fails, an error is raised with the given MESSAGE. + +Parameters: + A - First value [Any] + OPERATOR - Binary operator to use [Operator] + B - Second value [Any] + MESSSAGE - Message to display if (A OPERATOR B) is false. [String] + +Example: + (begin example) + ASSERT_OP(_fish,>,5,"Too few fish!"); + (end) + +Author: + Spooner +------------------------------------------- */ +#define ASSERT_OP(A,OPERATOR,B,MESSAGE) \ + if (not ((A) OPERATOR (B))) then \ + { \ + ASSERTION_ERROR('Assertion (A OPERATOR B) failed!\n' + 'A: ' + (str (A)) + '\n' + 'B: ' + (str (B)) + "\n\n" + (MESSAGE)); \ + } + +/* ------------------------------------------- +Macro: ASSERT_DEFINED() + Asserts that a VARIABLE is defined. When an assertion fails, an error is raised with the given MESSAGE.. + +Parameters: + VARIABLE - Variable to test if defined [String or Function]. + MESSAGE - Message to display if variable is undefined [String]. + +Examples: + (begin example) + ASSERT_DEFINED("_anUndefinedVar","Too few fish!"); + ASSERT_DEFINED({ obj getVariable "anUndefinedVar" },"Too many fish!"); + (end) + +Author: + Spooner +------------------------------------------- */ +#define ASSERT_DEFINED(VARIABLE,MESSAGE) \ + if (isNil VARIABLE) then \ + { \ + ASSERTION_ERROR('Assertion (VARIABLE is defined) failed!\n\n' + (MESSAGE)); \ + } + +/* ------------------------------------------- +Group: Unit tests +------------------------------------------- */ +#define TEST_SUCCESS(MESSAGE) MESSAGE_WITH_TITLE("Test OK",MESSAGE) +#define TEST_FAIL(MESSAGE) ERROR_WITH_TITLE("Test FAIL",MESSAGE) + +/* ------------------------------------------- +Macro: TEST_TRUE() + Tests that a CONDITION is true. + If the condition is not true, an error is raised with the given MESSAGE. + +Parameters: + CONDITION - Condition to assert as true [Boolean] + MESSSAGE - Message to display if (A OPERATOR B) is false [String] + +Example: + (begin example) + TEST_TRUE(_frogIsDead,"The frog is alive"); + (end) + +Author: + Killswitch +------------------------------------------- */ +#define TEST_TRUE(CONDITION, MESSAGE) \ + if (CONDITION) then \ + { \ + TEST_SUCCESS('(CONDITION)'); \ + } \ + else \ + { \ + TEST_FAIL('(CONDITION) ' + (MESSAGE)); \ + } + +/* ------------------------------------------- +Macro: TEST_FALSE() + Tests that a CONDITION is false. + If the condition is not false, an error is raised with the given MESSAGE. + +Parameters: + CONDITION - Condition to test as false [Boolean] + MESSSAGE - Message to display if (A OPERATOR B) is true [String] + +Example: + (begin example) + TEST_FALSE(_frogIsDead,"The frog died"); + (end) + +Author: + Killswitch +------------------------------------------- */ +#define TEST_FALSE(CONDITION, MESSAGE) \ + if (not (CONDITION)) then \ + { \ + TEST_SUCCESS('(not (CONDITION))'); \ + } \ + else \ + { \ + TEST_FAIL('(not (CONDITION)) ' + (MESSAGE)); \ + } + +/* ------------------------------------------- +Macro: TEST_OP() + Tests that (A OPERATOR B) is true. + If the test fails, an error is raised with the given MESSAGE. + +Parameters: + A - First value [Any] + OPERATOR - Binary operator to use [Operator] + B - Second value [Any] + MESSSAGE - Message to display if (A OPERATOR B) is false. [String] + +Example: + (begin example) + TEST_OP(_fish,>,5,"Too few fish!"); + (end) + +Author: + Killswitch +------------------------------------------- */ +#define TEST_OP(A,OPERATOR,B,MESSAGE) \ + if ((A) OPERATOR (B)) then \ + { \ + TEST_SUCCESS('(A OPERATOR B)') \ + } \ + else \ + { \ + TEST_FAIL('(A OPERATOR B)') \ + }; + +/* ------------------------------------------- +Macro: TEST_DEFINED_AND_OP() + Tests that A and B are defined and (A OPERATOR B) is true. + If the test fails, an error is raised with the given MESSAGE. + +Parameters: + A - First value [Any] + OPERATOR - Binary operator to use [Operator] + B - Second value [Any] + MESSSAGE - Message to display [String] + +Example: + (begin example) + TEST_OP(_fish,>,5,"Too few fish!"); + (end) + +Author: + Killswitch, PabstMirror +------------------------------------------- */ +#define TEST_DEFINED_AND_OP(A,OPERATOR,B,MESSAGE) \ + if (isNil #A) then { \ + TEST_FAIL('(A is not defined) ' + (MESSAGE)); \ + } else { \ + if (isNil #B) then { \ + TEST_FAIL('(B is not defined) ' + (MESSAGE)); \ + } else { \ + if ((A) OPERATOR (B)) then { \ + TEST_SUCCESS('(A OPERATOR B) ' + (MESSAGE)) \ + } else { \ + TEST_FAIL('(A OPERATOR B) ' + (MESSAGE)) \ + }; }; }; + + +/* ------------------------------------------- +Macro: TEST_DEFINED() + Tests that a VARIABLE is defined. + +Parameters: + VARIABLE - Variable to test if defined [String or Function]. + MESSAGE - Message to display if variable is undefined [String]. + +Examples: + (begin example) + TEST_DEFINED("_anUndefinedVar","Too few fish!"); + TEST_DEFINED({ obj getVariable "anUndefinedVar" },"Too many fish!"); + (end) + +Author: + Killswitch +------------------------------------------- */ +#define TEST_DEFINED(VARIABLE,MESSAGE) \ + if (not isNil VARIABLE) then \ + { \ + TEST_SUCCESS('(' + VARIABLE + ' is defined)'); \ + } \ + else \ + { \ + TEST_FAIL('(' + VARIABLE + ' is not defined)' + (MESSAGE)); \ + } + +/* ------------------------------------------- +Group: Managing Deprecation +------------------------------------------- */ + +/* ------------------------------------------- +Macro: DEPRECATE_SYS() + Allow deprecation of a function that has been renamed. + + Replaces an old OLD_FUNCTION (which will have PREFIX_ prepended) with a NEW_FUNCTION + (PREFIX_ prepended) with the intention that the old function will be disabled in the future. + + Shows a warning in RPT each time the deprecated function is used, but runs the new function. + +Parameters: + OLD_FUNCTION - Full name of old function [Identifier for function that does not exist any more] + NEW_FUNCTION - Full name of new function [Function] + +Example: + (begin example) + // After renaming CBA_fnc_frog as CBA_fnc_fish + DEPRECATE_SYS(CBA_fnc_frog,CBA_fnc_fish); + (end) + +Author: + Sickboy +------------------------------------------- */ +#define DEPRECATE_SYS(OLD_FUNCTION,NEW_FUNCTION) \ + OLD_FUNCTION = { \ + WARNING('Deprecated function used: OLD_FUNCTION (new: NEW_FUNCTION) in ADDON'); \ + if (isNil "_this") then { call NEW_FUNCTION } else { _this call NEW_FUNCTION }; \ + } + +/* ------------------------------------------- +Macro: DEPRECATE() + Allow deprecation of a function, in the current component, that has been renamed. + + Replaces an OLD_FUNCTION (which will have PREFIX_ prepended) with a NEW_FUNCTION + (PREFIX_ prepended) with the intention that the old function will be disabled in the future. + + Shows a warning in RPT each time the deprecated function is used, but runs the new function. + +Parameters: + OLD_FUNCTION - Name of old function, assuming PREFIX [Identifier for function that does not exist any more] + NEW_FUNCTION - Name of new function, assuming PREFIX [Function] + +Example: + (begin example) + // After renaming CBA_fnc_frog as CBA_fnc_fish + DEPRECATE(fnc_frog,fnc_fish); + (end) + +Author: + Sickboy +------------------------------------------- */ +#define DEPRECATE(OLD_FUNCTION,NEW_FUNCTION) \ + DEPRECATE_SYS(DOUBLES(PREFIX,OLD_FUNCTION),DOUBLES(PREFIX,NEW_FUNCTION)) + +/* ------------------------------------------- +Macro: OBSOLETE_SYS() + Replace a function that has become obsolete. + + Replace an obsolete OLD_FUNCTION with a simple COMMAND_FUNCTION, with the intention that anyone + using the function should replace it with the simple command, since the function will be disabled in the future. + + Shows a warning in RPT each time the deprecated function is used, and runs the command function. + +Parameters: + OLD_FUNCTION - Full name of old function [Identifier for function that does not exist any more] + COMMAND_CODE - Code to replace the old function [Function] + +Example: + (begin example) + // In Arma2, currentWeapon command made the CBA_fMyWeapon function obsolete: + OBSOLETE_SYS(CBA_fMyWeapon,{ currentWeapon player }); + (end) + +Author: + Spooner +------------------------------------------- */ +#define OBSOLETE_SYS(OLD_FUNCTION,COMMAND_CODE) \ + OLD_FUNCTION = { \ + WARNING('Obsolete function used: (use: OLD_FUNCTION) in ADDON'); \ + if (isNil "_this") then { call COMMAND_CODE } else { _this call COMMAND_CODE }; \ + } + +/* ------------------------------------------- +Macro: OBSOLETE() + Replace a function, in the current component, that has become obsolete. + + Replace an obsolete OLD_FUNCTION (which will have PREFIX_ prepended) with a simple + COMMAND_CODE, with the intention that anyone using the function should replace it with the simple + command. + + Shows a warning in RPT each time the deprecated function is used. + +Parameters: + OLD_FUNCTION - Name of old function, assuming PREFIX [Identifier for function that does not exist any more] + COMMAND_CODE - Code to replace the old function [Function] + +Example: + (begin example) + // In Arma2, currentWeapon command made the CBA_fMyWeapon function obsolete: + OBSOLETE(fMyWeapon,{ currentWeapon player }); + (end) + +Author: + Spooner +------------------------------------------- */ +#define OBSOLETE(OLD_FUNCTION,COMMAND_CODE) \ + OBSOLETE_SYS(DOUBLES(PREFIX,OLD_FUNCTION),COMMAND_CODE) + +#define BWC_CONFIG(NAME) class NAME { \ + units[] = {}; \ + weapons[] = {}; \ + requiredVersion = REQUIRED_VERSION; \ + requiredAddons[] = {}; \ + version = VERSION; \ +} + +// XEH Specific +#define XEH_CLASS CBA_Extended_EventHandlers +#define XEH_CLASS_BASE DOUBLES(XEH_CLASS,base) +#define XEH_DISABLED class EventHandlers { class XEH_CLASS {}; }; SLX_XEH_DISABLED = 1 +#define XEH_ENABLED class EventHandlers { class XEH_CLASS { EXTENDED_EVENTHANDLERS }; }; SLX_XEH_DISABLED = 0 + +// TODO: These are actually outdated; _Once ? +#define XEH_PRE_INIT QUOTE(call COMPILE_FILE(XEH_PreInit_Once)) +#define XEH_PRE_CINIT QUOTE(call COMPILE_FILE(XEH_PreClientInit_Once)) +#define XEH_PRE_SINIT QUOTE(call COMPILE_FILE(XEH_PreServerInit_Once)) + +#define XEH_POST_INIT QUOTE(call COMPILE_FILE(XEH_PostInit_Once)) +#define XEH_POST_CINIT QUOTE(call COMPILE_FILE(XEH_PostClientInit_Once)) +#define XEH_POST_SINIT QUOTE(call COMPILE_FILE(XEH_PostServerInit_Once)) + +/* ------------------------------------------- +Macro: IS_ADMIN + Check if the local machine is an admin in the multiplayer environment. + + Reports 'true' for logged and voted in admins. + +Parameters: + None + +Example: + (begin example) + // print "true" if player is admin + systemChat str IS_ADMIN; + (end) + +Author: + commy2 +------------------------------------------- */ +#define IS_ADMIN_SYS(x) x##kick +#define IS_ADMIN serverCommandAvailable 'IS_ADMIN_SYS(#)' + +/* ------------------------------------------- +Macro: IS_ADMIN_LOGGED + Check if the local machine is a logged in admin in the multiplayer environment. + + Reports 'false' if the player was voted to be the admin. + +Parameters: + None + +Example: + (begin example) + // print "true" if player is admin and entered in the server password + systemChat str IS_ADMIN_LOGGED; + (end) + +Author: + commy2 +------------------------------------------- */ +#define IS_ADMIN_LOGGED_SYS(x) x##shutdown +#define IS_ADMIN_LOGGED serverCommandAvailable 'IS_ADMIN_LOGGED_SYS(#)' + +/* ------------------------------------------- +Macro: FILE_EXISTS + Check if a file exists + + Reports "false" if the file does not exist. + +Parameters: + FILE - Path to the file + +Example: + (begin example) + // print "true" if file exists + systemChat str FILE_EXISTS("\A3\ui_f\data\igui\cfg\cursors\weapon_ca.paa"); + (end) + +Author: + commy2 +------------------------------------------- */ +#define FILE_EXISTS(FILE) (fileExists (FILE)) diff --git a/include/x/cba/main/script_macros_config.hpp b/include/x/cba/main/script_macros_config.hpp new file mode 100644 index 00000000..6edf5a0f --- /dev/null +++ b/include/x/cba/main/script_macros_config.hpp @@ -0,0 +1,5 @@ +#define false 0 +#define true 1 + +#define private 0 +#define public 2 diff --git a/include/x/cba/main/script_macros_mission.hpp b/include/x/cba/main/script_macros_mission.hpp new file mode 100644 index 00000000..b836360e --- /dev/null +++ b/include/x/cba/main/script_macros_mission.hpp @@ -0,0 +1,82 @@ +#include "\x\cba\addons\main\script_macros_common.hpp" + +/* + Header: script_macros_mission.hpp + + Description: + Modifies script_common_macros.hpp for compatiblity with missions. + Some addon specific functionality might be lost. + + Authors: + Muzzleflash + + Changes from script_macros_mission.hpp: + Follows Standard: + Object variables: PREFIX_COMPONENT + Main-object variables: PREFIX_main + Paths: PREFIX\COMPONENT\SCRIPTNAME.sqf + Or if CUSTOM_FOLDER is defined: + CUSTOM_FOLDER\SCRIPTNAME.sqf + eg. six\sys_menu\fDate.sqf + + Usage: + Define PREFIX and COMPONENT, then include this file: + #include "\x\cba\addons\main\script_macros_mission.hpp" + +*/ + +/* + CUSTOM_FOLDER + + Custom folder to search for files in. Will not change variable names. + Default is PREFIX\COMPONENT + + Example: + (begin example) + #define CUSTOM_FOLDER MyPackage\ScriptA + (end) + + (begin example) + #define CUSTOM_FOLDER COMPONENT\functions + (end) + + +*/ + +#ifdef CUSTOM_FOLDER + #define PATHTO_SYS(var1,var2,var3) ##CUSTOM_FOLDER\##var3.sqf + #define PATHTOF_SYS(var1,var2,var3) ##CUSTOM_FOLDER\##var3 + #define PATHTOF2_SYS(var1,var2,var3) ##CUSTOM_FOLDER\##var3 +#else + #define PATHTO_SYS(var1,var2,var3) ##var1\##var2\##var3.sqf + #define PATHTOF_SYS(var1,var2,var3) ##var1\##var2\##var3 + #define PATHTOF2_SYS(var1,var2,var3) ##var1\##var2\##var3 +#endif + +/************************** REMOVAL OF MACROS ***********************/ + +#undef MAINPREFIX +#undef SUBPREFIX +#undef VERSION_AR +#undef VERSION_CONFIG + +#undef VERSIONING_SYS +#undef VERSIONING + +#undef PRELOAD_ADDONS + +#undef BWC_CONFIG + +#undef XEH_DISABLED +#undef XEH_PRE_INIT +#undef XEH_PRE_CINIT +#undef XEH_PRE_SINIT +#undef XEH_POST_INIT +#undef XEH_POST_CINIT +#undef XEH_POST_SINIT + +#undef PATHTO_FNC +#define PATHTO_FNC(func) class func {\ + file = QUOTE(DOUBLES(fnc,func).sqf);\ + RECOMPILE;\ +} diff --git a/include/x/cba/main/script_mod.hpp b/include/x/cba/main/script_mod.hpp new file mode 100644 index 00000000..4a0a3ee3 --- /dev/null +++ b/include/x/cba/main/script_mod.hpp @@ -0,0 +1,37 @@ +// COMPONENT should be defined in the script_component.hpp and included BEFORE this hpp +#define PREFIX cba + +// TODO: Consider Mod-wide or Component-narrow versions (or both, depending on wishes!) +// We will use the DATE for the BUILD# in the format YYMMDD - VM +#include "script_version.hpp" + +#define VERSION MAJOR.MINOR +#define VERSION_STR MAJOR.MINOR.PATCHLVL.BUILD +#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD + +// MINIMAL required version for the Mod. Components can specify others.. +#define REQUIRED_VERSION 2.02 + +/* +// Defined DEBUG_MODE_NORMAL in a few CBA_fncs to prevent looped logging :) +#ifndef DEBUG_MODE_NORMAL + #define DEBUG_MODE_FULL +#endif +*/ + +// Set a default debug mode for the component here (See documentation on how to default to each of the modes). +/* + #define DEBUG_ENABLED_COMMON + #define DEBUG_ENABLED_DIAGNOSTIC + #define DEBUG_ENABLED_EVENTS + #define DEBUG_ENABLED_HASHES + #define DEBUG_ENABLED_MAIN + #define DEBUG_ENABLED_NETWORK + #define DEBUG_ENABLED_STRINGS + #define DEBUG_ENABLED_VERSIONING +*/ + +// Remove CfgFunction adding headers and disable SCRIPT macro (comment out to enable for debugging) +#define SKIP_FUNCTION_HEADER // [Enable for release] +#define SKIP_SCRIPT_NAME // [Enable for release] +// #define RECOMPILE // [Disable for release] diff --git a/include/x/cba/main/script_resources.hpp b/include/x/cba/main/script_resources.hpp new file mode 100644 index 00000000..96094ba8 --- /dev/null +++ b/include/x/cba/main/script_resources.hpp @@ -0,0 +1,264 @@ +// Rsc +class RscText; +class RscTextSmall; +class RscTitle; +class RscProgress; +class RscProgressNotFreeze; +class RscPicture; +class RscHTML; +class RscButton; +class RscShortcutButton; +class RscButtonSmall; +class RscEdit; +class RscCombo; +class RscListBox; +class RscListNBox; +class RscXListBox; +class RscTree; +class RscSlider; +class RscSliderH; +class RscXSliderH; +class RscActiveText; +class RscStructuredText; +class RscControlsGroup; +class RscBackgroundStripeTop; +class RscBackgroundStripeBottom; +class RscDisplayBackgroundStripes; +class RscCinemaBorder; +class RscToolbox; +class RscXKeyShadow; +class RscXKey; +class RscMapControl; +class RscObject; +class RscStandardDisplay; +class RscLineBreak; +class RscCompass; +class RscWatch; +class RscMiniMap; +class RscMiniMapSmall; +class RscButtonImages; +class RscObjectives; +class RscMsgBox; +class RscMsgBox3; +class RscMap; +class RscDisplayChannel; +class RscDisplayChat; +class RscDisplayVoiceChat; +class RscDisplayMissionEditor; +class RscDisplayEditObject; +class RscDisplayMissionLoad; +class RscDisplayMissionSave; +class RscDisplayScriptingHelp; +class RscDisplayCapture; +class RscDisplayInterruptEditorPreview; +class RscDisplayInterruptEditor3D; +class RscDisplayAddonActions; +class RscDisplayNewMod; +class RscDisplayInsertMarker; +class RscDisplayDebug; +class RscChatListDefault; +class RscChatListMission; +class RscChatListBriefing; +class RscChatListMap; +class RscTitlesText; +class RscIGText; +class RscIGProgress; +class RscDisplayHintC; +class RscDisplayHintCEx; +class RscInGameUI; +class RscTitles; +class RscDisplayLoading; +class RscDisplayLoadMission; +class RscDisplayNotFreeze; +class RscDisplayNotFreezeBig; +class RscDisplayStart; +class RscDisplayEditDiaryRecord; +class RscDisplayDiary; +class RscDisplayMainMap; +class RscDisplayMain; +class RscDisplaySingleplayer; +class RscDisplaySingleMission; +class RscDisplayCampaignLoad; +class RscDisplayRevert; +class RscDisplaySelectDifficulty; +class RscDisplayDifficultySelect; +class RscDisplayGetReady; +class RscDisplayGear; +class RscDisplayGearWeapon; +class RscDisplayArtillery; +class RscDisplayEmpty; +class RscDisplayMission; +class RscDisplayIntro; +class RscDisplayOutro; +class RscDisplayAward; +class RscDisplayCampaign; +class RscDisplayMissionEnd; +class RscDisplayTeamSwitch; +class RscDisplayInterrupt; +class RscDisplayInterruptRevert; +class RscDisplaySelectSave; +class RscDisplayMPInterrupt; +class RscDisplayDebriefing; +class RscDisplayMissionFail; +class RscDisplayLogin; +class RscDisplayNewUser; +class RscDisplayModLauncher; +class RscDisplayOptions; +class RscDisplayOptionsInGame; +class RscDisplayOptionsVideo; +class RscDisplayOptionsAudio; +class RscDisplayMicSensitivityOptions; +class RscDisplayGameOptions; +class RscDisplayDifficulty; +class RscListBoxKeys; +class RscDisplayConfigure; +class RscDisplayConfigureAction; +class RscDisplayConfigureControllers; +class RscDisplayCustomizeController; +class RscDisplayCredits; +class RscDisplaySelectIsland; +class RscDisplayCustomArcade; +class RscDisplayArcadeMap; +class RscDisplayArcadeUnit; +class RscDisplayArcadeModules; +class RscDisplayArcadeGroup; +class RscDisplayArcadeWaypoint; +class RscDisplayArcadeMarker; +class RscDisplayArcadeSensor; +class RscDisplayArcadeEffects; +class RscDisplayTemplateSave; +class RscDisplayTemplateLoad; +class RscDisplayIntel; +class RscDisplayXWizardTemplate; +class RscDisplayXWizardIntel; +class RscDisplayXWizardIntelName; +class RscDisplayXWizardIntelIsland; +class RscDisplayXWizardIntelWeather; +class RscDisplayXWizardIntelTime; +class RscDisplayXWizardUnit; +class RscDisplayXWizardUnitSelect; +class RscDisplayXWizardUnitSelectCustom; +class RscDisplayXWizardMap; +class RscDisplayXWizardMapInsertUnit; +class RscDisplayXWizardMapInsertWaypoint; +class RscDisplayXWizardParams; +class RscDisplayXWizardParameter; +class RscDisplayESRBOnline; +class RscDisplayMultiplayer; +class RscDisplayHostSettings; +class RscDisplayRemoteMissions; +class RscDisplayRemoteMissionVoted; +class RscDisplayServer; +class RscDisplayClient; +class RscDisplayMultiplayerSetup; +class RscDisplayMultiplayerSetupParams; +class RscDisplayMultiplayerSetupParameter; +class RscDisplayPassword; +class RscDisplayPort; +class RscDisplayIPAddress; +class RscDisplayFilter; +class RscDisplayMPPlayers; +class RscDisplayClientWait; +class RscDisplayServerGetReady; +class RscDisplayClientGetReady; +class RscMPSetupMessage; +class RscDisplayDedicatedServerSettings; +class RscDisplayDedicatedServer; +class RscPendingInvitation; +class RscPendingInvitationInGame; +class RscXTitle; +class RscXBackgroundAll; +class RscXNotepad; +class RscXNotepadSett; +class RscDisplayEditProfile; +class RscDisplayProfileFace; +class RscDisplayProfileVoice; +class RscDisplayProfileController; +class RscDisplayProfileControllerWheel; +class RscDisplayProfileControllerJoystick; +class RscDisplayProfileAudio; +class RscDisplayProfileVideo; +class RscDisplayEditProfileInGame; +class RscDisplayVoiceMask; +class RscXMPNotepad; +class RscDisplayLive; +class RscDisplayMPType; +class RscDisplayOptiMatchFilter; +class RscDisplayQuickMatch; +class RscDisplayPlayers; +class RscDisplayStatistics; +class RscDisplayStatisticsCurrent; +class RscDisplayInteruptReceiving; +class RscDisplayCampaignSelect; +class RscDisplayMovieInterrupt; +class RscGroupRootMenu; +class RscMainMenu; +class RscSubmenu; +class RscMoveHigh; +class RscMoveDir; +class RscReply; +class RscCallSupport; +class RscStatus; +class RscWatchDir; +class RscWatchMoreDir; +class RscMoveDist; +class RscFormations; +class RscCombatMode; +class RscTeam; +class RscSelectTeam; +class RscRadio; +class RscMenuBasicLevel; +class RscSplashText; +class RscLine; +class RscTextMainMenu; +class RscPictureKeepAspect; +class RscGearButtonTest; +class RscIGUIShortcutButton; +class RscGearShortcutButton; +class RscShortcutButtonMainMenu; +class RscShortcutButtonMain; +class RscShortcutButtonDiaryMap; +class RscShortcutButtonWizard; +class RscButton_small; +class RscButtonTextOnly; +class RscProgressBackground; +class RscLoadingText; +class RscIGUIListBox; +class RscIGUIListNBox; +class RscFrame; +class RscBackground; +class RscTextWIP; +class RscIGUIText; +class RscOpticsText; +class RscOpticsValue; +class RscIGUIValue; +class RscDisplayBuyGear; +class RscDisplayBuyUnits; +class RscArmorySelectIsland; +class RscCameraControl; +class RscFunctionsViewer; +class RscConfigEditor_Main; +class RscDisplayWFVoting; +class RscDisplayWFCity; +class RscDisplaySelectProfile; +class RscAnimatedLetters; +class RscHCGroupRootMenu; +class RscHCMainMenu; +class RscHCMoveHigh; +class RscHCWatchDir; +class RscHCCombatMode; +class RscHCSpeedMode; +class RscHCFormations; +class RscHCTeam; +class RscHCSelectTeam; +class RscHCReply; +class RscHCWPRootMenu; +class RscHCWPType; +class RscHCWPCombatMode; +class RscHCWPFormations; +class RscHCWPSpeedMode; +class RscHCWPWait; +class RscDisplayDSinterface; +class RscLibrary_Main; +class RscLibrary_Challenge; +class RscLibrary_Load; diff --git a/include/x/cba/main/script_version.hpp b/include/x/cba/main/script_version.hpp new file mode 100644 index 00000000..9d74eb59 --- /dev/null +++ b/include/x/cba/main/script_version.hpp @@ -0,0 +1,4 @@ +#define MAJOR 3 +#define MINOR 15 +#define PATCHLVL 3 +#define BUILD 000000 diff --git a/include/x/tmf/assigngear/$PBOPREFIX$ b/include/x/tmf/assigngear/$PBOPREFIX$ new file mode 100644 index 00000000..374cd1bb --- /dev/null +++ b/include/x/tmf/assigngear/$PBOPREFIX$ @@ -0,0 +1 @@ +x\tmf\addons\assigngear \ No newline at end of file diff --git a/include/x/tmf/assigngear/loadouts/macros.inc b/include/x/tmf/assigngear/loadouts/macros.inc new file mode 100644 index 00000000..20dc6f68 --- /dev/null +++ b/include/x/tmf/assigngear/loadouts/macros.inc @@ -0,0 +1,20 @@ +#define LIST_1(var1) var1 +#define LIST_2(var1) var1,var1 +#define LIST_3(var1) var1,var1,var1 +#define LIST_4(var1) var1,var1,var1,var1 +#define LIST_5(var1) var1,var1,var1,var1,var1 +#define LIST_6(var1) var1,var1,var1,var1,var1,var1 +#define LIST_7(var1) var1,var1,var1,var1,var1,var1,var1 +#define LIST_8(var1) var1,var1,var1,var1,var1,var1,var1,var1 +#define LIST_9(var1) var1,var1,var1,var1,var1,var1,var1,var1,var1 +#define LIST_10(var1) var1,var1,var1,var1,var1,var1,var1,var1,var1,var1 +#define LIST_11(var1) var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1 +#define LIST_12(var1) var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1 +#define LIST_13(var1) var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1 +#define LIST_14(var1) var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1 +#define LIST_15(var1) var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1 +#define LIST_16(var1) var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1 +#define LIST_17(var1) var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1 +#define LIST_18(var1) var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1 +#define LIST_19(var1) var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1 +#define LIST_20(var1) var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1,var1 diff --git a/mod.cpp b/mod.cpp index 7c6bacc9..14d32a9b 100644 --- a/mod.cpp +++ b/mod.cpp @@ -1,4 +1,4 @@ -name = "Teamwork"; +name = "Teamwork v0.0.0"; picture = "\x\tmf\addons\common\UI\logo_tmf_ca.paa"; actionName = "Website"; action = "http://teamonetactical.com/wiki/doku.php?id=tmf:start"; @@ -10,4 +10,4 @@ tooltipOwned = "Teamwork Owned"; overview = "Teamwork is a mission making framework. It focuses on harnessing the full power of the 3D editor. Our goal is to make mission making is more accessible and easier."; author = "TMF Team"; overviewPicture = "\x\tmf\addons\common\UI\logo_tmf_ca.paa"; -overviewText = "Teamwork"; \ No newline at end of file +overviewText = "Teamwork"; From a11297439272be8e2eec35185e69a7f4d224fed3 Mon Sep 17 00:00:00 2001 From: Freddo Date: Fri, 16 Apr 2021 10:31:35 +0200 Subject: [PATCH 2/5] Update hemtt config Copied straight from CBA --- .hemtt/base.toml | 56 +++++++++++++++++++++++++++++++++++++++++++++--- version.txt | 1 - 2 files changed, 53 insertions(+), 4 deletions(-) delete mode 100644 version.txt diff --git a/.hemtt/base.toml b/.hemtt/base.toml index 9e657a99..c512c8f2 100644 --- a/.hemtt/base.toml +++ b/.hemtt/base.toml @@ -3,6 +3,56 @@ prefix = "tmf" author = "TMF Team" template = "cba" mainprefix = "x" -files = ["mod.cpp"] -folder_optionals = true -sig_version = 3 +files = [ + "mod.cpp", + "README.md", + "logo_tmf_ca.paa", + "tmf_template.vr" +] + +version = "3.0.0" + +modname = "{{name}}" +key_name = "{{prefix}}_{{version}}" +authority = "{{prefix}}_{{version}}-{{git \"id 8\"}}" + +check = [ + "!version_set" +] +releasebuild = [ + "@zip TMF_v{{semver.major}}.{{semver.minor}}.{{semver.patch}}", + "!version_unset" +] + +[header_exts] +version = "{{git \"id 8\"}}" + +[scripts.version_set] +steps_linux = [ + "echo Setting version", + "sed -i -r -s 's/[0-9]+\\.[0-9]+\\.[0-9]+/{{semver.major}}.{{semver.minor}}.{{semver.patch}}/g' mod.cpp", + "sed -i -r -s 's/#define BUILD 000000/#define BUILD {{date \"%y%m%d\"}}/g' addons/main/script_version.hpp" +] +steps_windows = [ + "echo Setting version", + "powershell -Command foreach ($f in 'mod.cpp') {(Get-Content $f) -replace '[0-9]+\\.[0-9]+\\.[0-9]+', '{{semver.major}}.{{semver.minor}}.{{semver.patch}}' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}", + "powershell -Command foreach ($f in 'addons/main/script_version.hpp') {(Get-Content $f) -replace '#define BUILD 000000', '#define BUILD {{date \"%y%m%d\"}}' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}" +] +only_release = true +show_output = true + +[scripts.version_unset] +steps_linux = [ + "echo 'Unsetting version'", + "sed -i -r -s 's/{{semver.major}}.{{semver.minor}}.{{semver.patch}}/0.0.0/g' mod.cpp", + "sed -i -r -s 's/#define BUILD {{date \"%y%m%d\"}}/#define BUILD 000000/g' addons/main/script_version.hpp", + "echo '-> README.md version ready for commit (ignore until release)!'" +] +steps_windows = [ + "echo Unsetting version", + "powershell -Command foreach ($f in 'mod.cpp') {(Get-Content $f) -replace '{{semver.major}}.{{semver.minor}}.{{semver.patch}}', '0.0.0' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}", + "powershell -Command foreach ($f in 'addons/main/script_version.hpp') {(Get-Content $f) -replace '#define BUILD {{date \"%y%m%d\"}}', '#define BUILD 000000' -join \"`n\" ^| Set-Content -NoNewline $f; Add-Content -NoNewline \"`n\" $f}", + "echo -^> README.md version ready for commit (ignore until release)!" +] +only_release = true +show_output = true diff --git a/version.txt b/version.txt deleted file mode 100644 index 3eefcb9d..00000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -1.0.0 From fe7a4573ab5c6ce639c1db68fb7a905dc3e42853 Mon Sep 17 00:00:00 2001 From: Freddo Date: Fri, 16 Apr 2021 10:44:27 +0200 Subject: [PATCH 3/5] Corrected 3den path also removed redundant files --- addons/acre2/Cfg3DEN.hpp | 58 +- addons/acre2/ui_scripts/BabelSettings.sqf | 140 ++--- addons/acre2/ui_scripts/RadioChannels.sqf | 258 ++++----- addons/assigngear/Cfg3DEN.hpp | 6 +- addons/assigngear/config.cpp | 4 +- .../fnc_gui_vehicleGear_selector.sqf | 6 +- addons/autotest/Cfg3DEN.hpp | 34 +- addons/briefing/Cfg3DEN.hpp | 30 +- .../briefing/ui_scripts/BriefingSettings.sqf | 140 ++--- addons/common/Cfg3DEN.hpp | 4 +- addons/marker/Cfg3DEN.hpp | 2 +- addons/orbat/Cfg3DEN.hpp | 4 +- addons/respawn/Cfg3DEN.hpp | 4 +- addons/teamcolour/Cfg3DEN.hpp | 4 +- include/a3/3DEN/UI/Attributes/AmmoBox.sqf | 534 ------------------ .../UI/Displays/Display3DENEditAttributes.sqf | 20 - include/a3/3DEN/UI/Displays/display3DEN.sqf | 32 -- .../a3/3DEN/UI/Displays/display3DENCopy.sqf | 29 - .../Displays/display3DENEditComposition.sqf | 11 - .../UI/Displays/display3DENMissionStats.sqf | 100 ---- .../a3/3DEN/UI/Displays/display3DENNew.sqf | 71 --- .../a3/3DEN/UI/Displays/display3DENPlace.sqf | 39 -- .../UI/Displays/display3DENRequiredAddons.sqf | 18 - .../a3/3DEN/UI/Displays/display3DENSave.sqf | 41 -- .../3DEN/UI/Displays/display3DENTutorial.sqf | 121 ---- .../3DEN/UI/Displays/display3DENUpdates.sqf | 119 ---- .../UI/DisplaysTemp/RscDisplayInterrupt.sqf | 464 --------------- .../UI/DisplaysTemp/RscDisplayLoading.sqf | 345 ----------- include/a3/{3DEN => 3den}/UI/dikCodes.inc | 0 include/a3/{3DEN => 3den}/UI/macroExecs.inc | 0 .../a3/{3DEN => 3den}/UI/macroExecs.inc.old | 0 include/a3/{3DEN => 3den}/UI/macros.inc | 0 include/a3/{3DEN => 3den}/UI/macros.inc.old | 0 include/a3/{3DEN => 3den}/UI/resincl.inc | 0 34 files changed, 347 insertions(+), 2291 deletions(-) delete mode 100644 include/a3/3DEN/UI/Attributes/AmmoBox.sqf delete mode 100644 include/a3/3DEN/UI/Displays/Display3DENEditAttributes.sqf delete mode 100644 include/a3/3DEN/UI/Displays/display3DEN.sqf delete mode 100644 include/a3/3DEN/UI/Displays/display3DENCopy.sqf delete mode 100644 include/a3/3DEN/UI/Displays/display3DENEditComposition.sqf delete mode 100644 include/a3/3DEN/UI/Displays/display3DENMissionStats.sqf delete mode 100644 include/a3/3DEN/UI/Displays/display3DENNew.sqf delete mode 100644 include/a3/3DEN/UI/Displays/display3DENPlace.sqf delete mode 100644 include/a3/3DEN/UI/Displays/display3DENRequiredAddons.sqf delete mode 100644 include/a3/3DEN/UI/Displays/display3DENSave.sqf delete mode 100644 include/a3/3DEN/UI/Displays/display3DENTutorial.sqf delete mode 100644 include/a3/3DEN/UI/Displays/display3DENUpdates.sqf delete mode 100644 include/a3/3DEN/UI/DisplaysTemp/RscDisplayInterrupt.sqf delete mode 100644 include/a3/3DEN/UI/DisplaysTemp/RscDisplayLoading.sqf rename include/a3/{3DEN => 3den}/UI/dikCodes.inc (100%) rename include/a3/{3DEN => 3den}/UI/macroExecs.inc (100%) rename include/a3/{3DEN => 3den}/UI/macroExecs.inc.old (100%) rename include/a3/{3DEN => 3den}/UI/macros.inc (100%) rename include/a3/{3DEN => 3den}/UI/macros.inc.old (100%) rename include/a3/{3DEN => 3den}/UI/resincl.inc (100%) diff --git a/addons/acre2/Cfg3DEN.hpp b/addons/acre2/Cfg3DEN.hpp index d094987d..cb07d5d9 100644 --- a/addons/acre2/Cfg3DEN.hpp +++ b/addons/acre2/Cfg3DEN.hpp @@ -1,6 +1,6 @@ -#include "\a3\3DEN\UI\macros.inc" -#include "\a3\3DEN\UI\resincl.inc" +#include "\a3\3den\UI\macros.inc" +#include "\a3\3den\UI\resincl.inc" class ctrlDefault; class ctrlDefaultText;// : ctrlDefault; @@ -14,7 +14,7 @@ class RscButtonMenu; class RscText; -class cfgScriptPaths +class cfgScriptPaths { TMF_acre2 = "x\tmf\addons\acre2\ui_scripts\"; //" }; @@ -136,7 +136,7 @@ class Cfg3DEN control = "None"; // UI control base class displayed in Edit Attributes window, points to Cfg3DEN >> Attributes expression = "[_this,'TMF_Network',_value] call tmf_common_fnc_initGroupVar;";// expression = "_this setVariable ['TMF_Network',_value,true];"; wikiType = "[[Number]]"; - defaultValue = -1; + defaultValue = -1; }; class TMF_Channellist { @@ -217,16 +217,16 @@ class Cfg3DEN { class Title; class Toolbox; //class Toolbox: Title - + class TMF_AcreAddRadioActions : Toolbox { scriptName = "AcreAddRadioActions"; scriptPath = "TMF_acre2"; onLoad = "['onLoad',_this,'AcreAddRadioActions','TMF_acre2',false] call (uinamespace getvariable 'BIS_fnc_initDisplay');"; // 3rd param is the path PATH\scriptName.sqf onUnload = "['onUnload',_this,'AcreAddRadioActions','TMF_acre2',false] call (uinamespace getvariable 'BIS_fnc_initDisplay');"; - + attributeLoad = "['attributeLoad',_this] call (uinamespace getvariable 'AcreAddRadioActions_script');"; attributeSave = "['attributeSave',_this] call (uinamespace getvariable 'AcreAddRadioActions_script');"; - + w = (ATTRIBUTE_TITLE_W + ATTRIBUTE_CONTENT_W) * GRID_W; h = 6 * SIZE_M * GRID_H; class Controls @@ -237,7 +237,7 @@ class Cfg3DEN style = ST_RIGHT; w = ATTRIBUTE_TITLE_W * GRID_W; x = 0; - h = 1 * SIZE_M * GRID_H; + h = 1 * SIZE_M * GRID_H; y = 0; colorBackground[] = {0,0,0,0}; tooltip = "These radios will be available for selection (via scroll wheel action) for the first 5 minutes after the player has spawned."; @@ -267,7 +267,7 @@ class Cfg3DEN }; }; - + class BabelSettings : Toolbox { scriptName = "BabelSettings"; @@ -277,7 +277,7 @@ class Cfg3DEN attributeLoad = "['attributeLoad',_this] call (uinamespace getvariable 'BabelSettings_script');"; attributeSave = "['attributeSave',_this] call (uinamespace getvariable 'BabelSettings_script');"; - + w = (ATTRIBUTE_TITLE_W + ATTRIBUTE_CONTENT_W) * GRID_W; h = 16 * SIZE_M * GRID_H; class Controls @@ -286,11 +286,11 @@ class Cfg3DEN { text = "Languages:"; w = ((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W)/2) * GRID_W; - h = 1 * SIZE_M * GRID_H; + h = 1 * SIZE_M * GRID_H; y = 0; x = SIZE_M * GRID_W; colorBackground[] = {0,0,0,0}; - }; + }; class SpeakersTitle : LangTitle { text = "Language speakers:"; @@ -399,7 +399,7 @@ class Cfg3DEN x = (((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W) - SIZE_M ) * GRID_W / 7)*3.9375 + SIZE_M * GRID_W; action = "['languageDelClickCancel',_this] call (uinamespace getvariable 'BabelSettings_script');"; }; - + class EditLanguageTitle : LangTitle { idc = 313201; @@ -409,7 +409,7 @@ class Cfg3DEN w = ((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W) - SIZE_M ) * GRID_W; colorBackground[] = {0.1,0.1,0.1,1}; }; - + class EditLanguageShortTitle : LangTitle { idc = 313202; @@ -448,26 +448,26 @@ class Cfg3DEN attributeLoad = "['attributeLoad', _this, _value] call (uinamespace getvariable 'RadioChannels_script');"; attributeSave = "['attributeSave',_this] call (uinamespace getvariable 'RadioChannels_script');"; - + w = (ATTRIBUTE_TITLE_W + ATTRIBUTE_CONTENT_W) * GRID_W; h = (32 * SIZE_M + 1) * GRID_H; - + //Attribute_Title_W = left side? Attribute_content_W = right Side? // SIZE_M <- size of margin (relatively big-ish) class Controls { - + class Title0: ctrlStatic { text = "Radio network allocation:"; w = ((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W)/2) * GRID_W; - h = 1 * SIZE_M * GRID_H; + h = 1 * SIZE_M * GRID_H; y = 0; x = SIZE_M * GRID_W; colorBackground[] = {0,0,0,0}; tooltip = "Each network is a collection of radio channels. The network number is displayed on the right side below. To assign a different network select the entity below and press the number on your keyboard for the network number you wish to assign."; }; - + class NetworkTree : ctrlTree { idc = 189438; @@ -481,7 +481,7 @@ class Cfg3DEN action = "['presetTreeClick',_this] call (uinamespace getvariable 'RadioChannels_script');"; onTreeDblClick = "['presetTreeDoubleClick',_this] call (uinamespace getvariable 'RadioChannels_script');"; }; - + class MyLine:RscText { style = ST_LINE; @@ -491,7 +491,7 @@ class Cfg3DEN y = SIZE_M * GRID_H * 12.4; w = (((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W+SIZE_M)) * GRID_W); }; - + class networkButton : RscButtonMenu { idc = 1502; @@ -506,18 +506,18 @@ class Cfg3DEN action = "['networkToggleButton',_this] call (uinamespace getvariable 'RadioChannels_script');"; tooltip = "Toggle through the radio networks."; }; - + class Title1: Title0 { text = "Channels of selected network:"; w = ((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W)/2) * GRID_W; - h = 1 * SIZE_M * GRID_H; + h = 1 * SIZE_M * GRID_H; y = SIZE_M * GRID_H * 14; x = SIZE_M * GRID_W; colorBackground[] = {0,0,0,0}; tooltip = ""; }; - + class Title2 : Title1 { text = "Entities present on selected channel:"; @@ -633,7 +633,7 @@ class Cfg3DEN x = (((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W) - SIZE_M ) * GRID_W / 7)*3.9375 + SIZE_M * GRID_W; action = "['channelDelClickCancel',_this] call (uinamespace getvariable 'RadioChannels_script');"; }; - + class EditChannelTitle : Title1 { idc = 313201; @@ -644,7 +644,7 @@ class Cfg3DEN colorBackground[] = {0.1,0.1,0.1,1}; tooltip = ""; }; - + class EditChannelShortTitle : Title1 { idc = 313202; @@ -744,7 +744,7 @@ class Cfg3DEN //style = ST_LEFT + ST_MULTI; // Style checked = 0; // Default state - + colorText[] = {COLOR_TEXT_RGBA}; // Text and frame color colorSelect[] = {0,0,0,1}; // Text selection color sizeEx = SIZEEX_PURISTA(SIZEEX_M); // Text size @@ -812,10 +812,10 @@ class Cfg3DEN onMouseHolding = ""; onCheckedChanged = ""; - + }; }; }; - + }; }; diff --git a/addons/acre2/ui_scripts/BabelSettings.sqf b/addons/acre2/ui_scripts/BabelSettings.sqf index 2b36622f..b8b404ad 100644 --- a/addons/acre2/ui_scripts/BabelSettings.sqf +++ b/addons/acre2/ui_scripts/BabelSettings.sqf @@ -11,7 +11,7 @@ params ["_mode",["_params",[]]]; fn_removeUnitFromLang = { params ["_channel", "_unit"]; - + _list = (_unit get3DENAttribute "TMF_BabelLanguages") params ["_value"]; if (_value isEqualType []) then { //Is default do nothing @@ -36,7 +36,7 @@ fn_removeGroupFromLang = { _group set3DENAttribute ["TMF_BabelLanguages",str _value]; }; - + _list = (_group get3DENAttribute "TMF_BabelLanguages") params ["_value"]; if (_value isEqualType []) then { //is default do nothing @@ -61,7 +61,7 @@ switch _mode do { cacheAllPlayerGroups = allGroups select {{_x in _playableUnits} count (units _x) > 0}; BabelArray = ("TMF_MissionAcre2Attributes" get3DENMissionAttribute "TMF_AcreBabelSettings"); if (BabelArray isEqualType "") then { BabelArray = call compile BabelArray;}; - if (isNil "BabelArray") then { + if (isNil "BabelArray") then { BabelArray = [ ["English",[west]], ["Russian",[east]], @@ -87,15 +87,15 @@ switch _mode do { _ctrlGroup ctrladdeventhandler ["setfocus",{with uinamespace do {BabelSettings_ctrlGroup = _this select 0;};}]; _ctrlGroup ctrladdeventhandler ["killfocus",{with uinamespace do {BabelSettings_ctrlGroup = nil;};}]; - - + + { (_ctrlGroup controlsGroupCtrl _x) ctrlShow false; } forEach (EDIT_CHANNEL_IDCS); { (_ctrlGroup controlsGroupCtrl _x) ctrlShow true; } forEach (BEHIND_EDIT_CHANNELS_IDCS); - + ["refreshLangList"] call BabelSettings_script; }; @@ -119,63 +119,63 @@ switch _mode do { case "refreshLangList": { if (isNil "BabelSettings_ctrlGroup") exitWith {}; BabelCurrentLang = 0; - + private _ctrlLangList = BabelSettings_ctrlGroup controlsGroupCtrl 101; _ctrlLangList lnbSetColumnsPos [0,5,5]; - + lnbClear _ctrlLangList; { _x params ["_name"]; _ctrlLangList lnbaddrow [_name, "", ""]; } forEach BabelArray; - - if (count BabelArray > 0) then { + + if (count BabelArray > 0) then { _ctrlLangList lnbSetCurSelRow 0; BabelCurrentLang = 0; } else { _ctrlLangList lnbSetColumnsPos [0,5,5]; _ctrlLangList lnbaddrow ["No Languages","",""]; BabelCurrentLang = -1; }; - + ["refreshLangTree"] call BabelSettings_script; }; - - + + case "refreshLangTree": { - + if (isNil "BabelSettings_ctrlGroup") exitWith {}; - + _ctrlTree = BabelSettings_ctrlGroup controlsGroupCtrl 189437; tvClear _ctrlTree; - + if (BabelCurrentLang == -1) exitWith {}; BabelCurrentLang = lnbCurSelRow (BabelSettings_ctrlGroup controlsGroupCtrl 101); - + (BabelArray select BabelCurrentLang) params ["","_langConditions"]; - - + + BabelLang_data = []; - - + + fn_langTreeProcessUnit = { - params ["_ctrlTree", "_treeRoot", "_doSpeak", "_unit"]; + params ["_ctrlTree", "_treeRoot", "_doSpeak", "_unit"]; private _roleDesc = ((_unit get3DENAttribute "description") select 0); private _color = (side _unit) call TMF_common_fnc_sideToColor; - + if (_roleDesc == "") then { _roleDesc = getText (configfile >> "CfgVehicles" >> (typeOf _unit) >> "displayName"); }; private _unitIdx = _ctrlTree tvAdd [ _treeRoot, _roleDesc]; private _location = _treeRoot + [_unitIdx]; - _ctrlTree tvSetValue [_location, BabelLang_data pushBack _unit]; + _ctrlTree tvSetValue [_location, BabelLang_data pushBack _unit]; private _icon = getText (configFile >> "CfgVehicleIcons" >> getText (configFile >> "CfgVehicles" >> (typeOf _unit) >> "icon")); if (_icon == "") then { _icon = "\a3\3DEN\Data\Cfg3DEN\Object\iconPlayer_ca.paa"; //default player icon }; _ctrlTree tvSetPicture [_location, _icon]; _ctrlTree tvSetPictureColor [_location, _color]; - - + + if (!_doSpeak) then { private _unitChanList = (_unit get3DENAttribute "TMF_BabelLanguages") select 0; if (_unitChanList isEqualType "") then { @@ -183,7 +183,7 @@ switch _mode do { }; if (BabelCurrentLang in _unitChanList) then { _doSpeak = true; - }; + }; }; private _returnCode = 3; if (_doSpeak) then { @@ -192,20 +192,20 @@ switch _mode do { } else { _ctrlTree tvSetPictureRight [_location, "x\tmf\addons\acre2\ui\bable_off.paa"]; }; - + //0: All, Partial: 1, Leader: 2, None: 3 _returnCode }; - + fn_langTreeProcessGroup = { params ["_ctrlTree", "_treeRoot", "_doSpeak", "_group"]; - + private _side = side _group; private _color = _side call TMF_common_fnc_sideToColor; private _grpIdx = _ctrlTree tvAdd [ _treeRoot, groupID _group]; private _location = _treeRoot + [_grpIdx]; private _grpIcon = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa"; - + //Found in (configfile >> "Cfg3DEN" >> "Group" >> "Draw" >> "textureCivilian") call { if (_side == west) exitWith { _grpIcon = "\a3\Ui_f\data\Map\Markers\NATO\b_unknown.paa";}; @@ -213,11 +213,11 @@ switch _mode do { if (_side == guerilla) exitWith { _grpIcon = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa";}; if (_side == civilian) exitWith { _grpIcon = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa";}; }; - + _ctrlTree tvSetPicture [_location, _grpIcon]; _ctrlTree tvSetPictureColor [_location, _color]; _ctrlTree tvSetValue [_location, BabelLang_data pushBack _group]; - + if (!_doSpeak) then { private _grpChanList = (_group get3DENAttribute "TMF_BabelLanguages") select 0; if (_grpChanList isEqualType "") then { @@ -226,11 +226,11 @@ switch _mode do { if (BabelCurrentLang in _grpChanList) then { _doSpeak = true; }; - }; - + }; + private _hasSpeaker = false; { - if ([_ctrlTree, _location, _doSpeak, _x] call fn_langTreeProcessUnit != 3) then { + if ([_ctrlTree, _location, _doSpeak, _x] call fn_langTreeProcessUnit != 3) then { _hasSpeaker = true; }; } forEach (units _group); @@ -249,37 +249,37 @@ switch _mode do { _ctrlTree tvExpand _location; }; }; - - _returnCode + + _returnCode }; - + fn_langTreeProcessFaction = { params ["_ctrlTree", "_treeRoot", "_doSpeak", "_faction"]; BabelCurrentLang = lnbCurSelRow (BabelSettings_ctrlGroup controlsGroupCtrl 101); - + (BabelArray select BabelCurrentLang) params ["","_langConditions"]; - + if (!_doSpeak and {_faction in _langConditions}) then { _doSpeak = true; }; - + private _factionIdx = _ctrlTree tvAdd [ _treeRoot,getText (configfile >> "CfgFactionClasses" >> _faction >> "displayName")]; private _location = _treeRoot + [_factionIdx]; - + _ctrlTree tvSetValue [_location, BabelLang_data pushBack _faction]; - + private _factionImg = getText (configfile >> "CfgFactionClasses" >> _faction >> "icon"); _ctrlTree tvSetPicture [_location, _factionImg]; - - private _hasSpeaker = false; + + private _hasSpeaker = false; { if ([_ctrlTree, _location, _doSpeak, _x] call fn_langTreeProcessGroup != 3) then { _hasSpeaker = true; }; } forEach (cacheAllPlayerGroups select {(faction (leader _x)) == _faction}); - + private _returnCode = 3; - + if (_doSpeak) then { _ctrlTree tvSetPictureRight [_location, "x\tmf\addons\acre2\ui\bable_on.paa"]; _returnCode = 0; @@ -295,20 +295,20 @@ switch _mode do { }; _returnCode }; - - + + private _sides = []; {_sides pushBackUnique (side _x);} forEach cacheAllPlayerGroups; { private _side = _x; private _doSpeak = false; private _location = [(_ctrlTree tvAdd [[], _side call TMF_common_fnc_sideToString])]; - + _ctrlTree tvSetPicture [_location, _side call TMF_common_fnc_sideToTexture]; _ctrlTree tvSetValue [_location, BabelLang_data pushBack _side]; if (_side in _langConditions) then { _doSpeak = true; }; - + //Collect factions for side. _factions = []; { @@ -318,7 +318,7 @@ switch _mode do { { if ([_ctrlTree, _location, _doSpeak, _x] call fn_langTreeProcessFaction != 3) then { _hasSpeaker = true; }; } forEach _factions; - + if (_doSpeak) then { _ctrlTree tvSetPictureRight [_location, "x\tmf\addons\acre2\ui\bable_on.paa"]; } else { @@ -340,7 +340,7 @@ switch _mode do { BabelArray deleteAt _curSel; ["refreshLangList"] call BabelSettings_script; - ["save"] call BabelSettings_script; + ["save"] call BabelSettings_script; }; }; case "langAddClick": { @@ -351,7 +351,7 @@ switch _mode do { { (BabelSettings_ctrlGroup controlsGroupCtrl _x) ctrlShow false; } forEach (BEHIND_EDIT_CHANNELS_IDCS); - + BabelLanguagesEditMode = 0; (BabelSettings_ctrlGroup controlsGroupCtrl 313206) ctrlSetText ""; ctrlSetFocus (BabelSettings_ctrlGroup controlsGroupCtrl 313206); @@ -361,17 +361,17 @@ switch _mode do { with uiNamespace do { private _curSel = lnbCurSelRow (BabelSettings_ctrlGroup controlsGroupCtrl 101); if (_curSel == -1) exitWith {}; - + private _languages = (BabelArray select _curSel); _languages params ["_name"]; - + { (BabelSettings_ctrlGroup controlsGroupCtrl _x) ctrlShow true; } forEach (EDIT_CHANNEL_IDCS); { (BabelSettings_ctrlGroup controlsGroupCtrl _x) ctrlShow false; } forEach (BEHIND_EDIT_CHANNELS_IDCS); - + BabelLanguagesEditMode = 1; (BabelSettings_ctrlGroup controlsGroupCtrl 313206) ctrlSetText _name; @@ -384,15 +384,15 @@ switch _mode do { if (BabelLanguagesEditMode == 1) then { private _curSel = lnbCurSelRow (BabelSettings_ctrlGroup controlsGroupCtrl 101); if (_curSel == -1) exitWith {}; - + private _languages = (BabelArray select _curSel); _languages set [0,ctrlText (BabelSettings_ctrlGroup controlsGroupCtrl 313206)]; // ShortName - + } else { BabelArray pushBack [ctrlText (BabelSettings_ctrlGroup controlsGroupCtrl 313206),[]]; }; - + ["refreshLangList"] call BabelSettings_script; { (BabelSettings_ctrlGroup controlsGroupCtrl _x) ctrlShow false; @@ -418,11 +418,11 @@ switch _mode do { private _ctrlTree = (BabelSettings_ctrlGroup controlsGroupCtrl 189437); private _treeSel = tvCurSel _ctrlTree; private _entity = BabelLang_data select (_ctrlTree tvValue _treeSel); - + // currentChannel private _curSel = lnbCurSelRow (BabelSettings_ctrlGroup controlsGroupCtrl 101); private _condition = (BabelArray select _curSel) select 1; - + if (_entity isEqualType east or _entity isEqualType "") then { _condition pushBackUnique _entity; } else { @@ -437,23 +437,23 @@ switch _mode do { }; }; }; - + ["refreshLangTree"] call BabelSettings_script; ["save"] call BabelSettings_script; }; }; - + case "langTreeRemove": { with uiNamespace do { private _ctrlTree = (BabelSettings_ctrlGroup controlsGroupCtrl 189437); private _treeSel = tvCurSel _ctrlTree; private _entity = BabelLang_data select (_ctrlTree tvValue _treeSel); - + // currentChannel private _curSel = lnbCurSelRow (BabelSettings_ctrlGroup controlsGroupCtrl 101); private _langEntry = (BabelArray select _curSel); private _condition = _langEntry select 1; - + if (_entity isEqualType east or _entity isEqualType "") then { _langEntry set [1,_condition - [_entity]]; if (_entity isEqualType east) then { @@ -466,7 +466,7 @@ switch _mode do { }; }; } forEach (_condition); - + //remove groups { [_curSel, _x] call fn_removeGroupFromLang; @@ -486,12 +486,12 @@ switch _mode do { [_curSel,_entity] call fn_removeUnitFromLang; }; }; - + ["refreshLangTree"] call BabelSettings_script; ["save"] call BabelSettings_script; }; }; - + case "save": { //RadioChannelArray private _array = + (uiNamespace getVariable "BabelArray"); diff --git a/addons/acre2/ui_scripts/RadioChannels.sqf b/addons/acre2/ui_scripts/RadioChannels.sqf index 31b22fb7..363dc497 100644 --- a/addons/acre2/ui_scripts/RadioChannels.sqf +++ b/addons/acre2/ui_scripts/RadioChannels.sqf @@ -14,7 +14,7 @@ params ["_mode",["_params",[]]]; fn_removeUnitFromChannel = { params ["_channel", "_unit"]; - + _list = (_unit get3DENAttribute "TMF_Channellist") params ["_value"]; if (_value isEqualType []) then { //Is default do nothing @@ -39,7 +39,7 @@ fn_removeGroupFromChannel = { _group set3DENAttribute ["TMF_ChannellistLeader",str _value]; }; - + _list = (_group get3DENAttribute "TMF_Channellist") params ["_value"]; if (_value isEqualType []) then { //is default do nothing @@ -96,7 +96,7 @@ fn_networkTreeHandleKey = { }; }; if (_thing isEqualType "") then { - + private _sideNum = getNumber (configfile >> "CfgFactionClasses" >> _thing >> "side"); private _side = _sideNum call TMF_common_fnc_numToSide; @@ -110,7 +110,7 @@ fn_networkTreeHandleKey = { set3DENAttributes [[units _x, "TMF_Network", -1], [[_x],"TMF_Network", -1]]; set3DENAttributes [[units _x, "TMF_Channellist", "[]"], [[_x],"TMF_Channellist", "[]"], [[_x],"TMF_ChannellistLeader", "[]"]]; } forEach (cacheAllPlayerGroups select {(faction (leader _x)) == _thing}); - + if (_networkNumber <= (count RadioChannelArray)) then { ((RadioChannelArray select (_networkNumber -1)) select 0) pushBack _thing; } else { @@ -129,7 +129,7 @@ fn_networkTreeHandleKey = { _channel params ["_condition"]; _channel set [0,_condition - [_faction, _side]]; } forEach RadioChannelArray; - + set3DENAttributes [[units _thing, "TMF_Network", -1], [[_thing],"TMF_Network",(_networkNumber-1)]]; set3DENAttributes [[units _thing, "TMF_Channellist", "[]"], [[_thing],"TMF_Channellist", "[]"], [[_thing],"TMF_Channellist", "[]"], [[_thing],"TMF_ChannellistLeader", "[]"]]; @@ -144,15 +144,15 @@ fn_networkTreeHandleKey = { _channel params ["_condition"]; _channel set [0,_condition - [_faction, _side]]; } forEach RadioChannelArray; - + set3DENAttributes [[[_thing],"TMF_Network", (_networkNumber-1)], [[group _thing],"TMF_Network",-1]]; set3DENAttributes [[[_thing], "TMF_Channellist", "[]"], [[group _thing],"TMF_Channellist", "[]"], [[group _thing],"TMF_ChannellistLeader", "[]"]]; - + }; - + //FUTURE Consider erasing CHANNEL_LISTS on preset change? - + //Force re-render? ["refreshNetworkTree"] call RadioChannels_script; ["refreshChannelList"] call RadioChannels_script; @@ -165,7 +165,7 @@ switch _mode do { private _playableUnits = playableUnits; _playableUnits pushBackUnique player; cacheAllPlayerGroups = allGroups select {{_x in _playableUnits} count (units _x) > 0}; - + RadioChannelArray = ("TMF_MissionAcre2Attributes" get3DENMissionAttribute "TMF_AcreSettings"); if (RadioChannelArray isEqualType "") then { RadioChannelArray = call compile RadioChannelArray;}; if (isNil "RadioChannelArray") then { @@ -174,7 +174,7 @@ switch _mode do { ["Alpha","Alpha Squad Net","ACRE_PRC343",["blu_f"]], ["Bravo","Bravo Squad Net","ACRE_PRC343",[]], ["Charlie","Charlie Squad Net","ACRE_PRC343",[]], - ["1PLT-COM","Platoon Command Net","ACRE_PRC148",[]] + ["1PLT-COM","Platoon Command Net","ACRE_PRC148",[]] ]], [[east],[]], [[resistance],[]], @@ -210,25 +210,25 @@ switch _mode do { _ctrlGroup ctrladdeventhandler ["setfocus",{with uinamespace do {RadioChannels_ctrlGroup = _this select 0;};}]; _ctrlGroup ctrladdeventhandler ["killfocus",{with uinamespace do {RadioChannels_ctrlGroup = nil;};}]; - - + + ["refreshNetworkTree"] call RadioChannels_script; ["refreshChannelList"] call RadioChannels_script; - + //Tree EH for keyboard number presses _ctrlTree = _ctrlGroup controlsGroupCtrl 189438; _ctrlTree ctrladdeventhandler ["keyDown",{with uinamespace do {['keydown',[RadioChannels_ctrlGroup,_this select 1,_this select 2,_this select 3],objnull] call RadioChannels_script;};}]; - + { (_ctrlGroup controlsGroupCtrl _x) ctrlShow false; } forEach (EDIT_CHANNEL_IDCS); { (_ctrlGroup controlsGroupCtrl _x) ctrlShow true; } forEach (BEHIND_EDIT_CHANNELS_IDCS); - - + + }; case "keydown": { // Handle key press on tree. @@ -236,7 +236,7 @@ switch _mode do { if !(isnil "_ctrlGroup") then { _ctrlTree = _ctrlGroup controlsGroupCtrl 189438; - + switch _key do { case DIK_1: { _ctrlTree = _ctrlGroup controlsGroupCtrl 189438; @@ -284,7 +284,7 @@ switch _mode do { //Attribute loading is done in onLoad instead. }; case "attributeSave": { - + private _array = + (uiNamespace getVariable "RadioChannelArray"); { private _network = _x; @@ -303,21 +303,21 @@ switch _mode do { } forEach (_condition); } forEach (_channels); } forEach _array; - + private _string = str _array; _string }; case "refreshChannelList": { if (isNil "RadioChannels_ctrlGroup") exitWith {}; - + private _ctrlChannelList = RadioChannels_ctrlGroup controlsGroupCtrl 101; private _hasChannels = false; lnbClear _ctrlChannelList; - + if (RadioCurrentNetwork < count RadioChannelArray) then { (RadioChannelArray select RadioCurrentNetwork) params ["","_channels"]; _ctrlChannelList lnbSetColumnsPos [0,0.005,0.33]; - + { _hasChannels = true; _x params ["_shortName", "_longName", "_radioClassname", "_condition", "_shared"]; @@ -327,9 +327,9 @@ switch _mode do { _ctrlChannelList lnbSetPicture [[_lnbIdx,1],_icon]; } forEach _channels; }; - + //Update cursor var. - if (_hasChannels) then { + if (_hasChannels) then { _ctrlChannelList lnbSetCurSelRow 0; RadioCurrentNetworkChannel = 0; } else { _ctrlChannelList lnbSetColumnsPos [0,1,1]; @@ -340,51 +340,51 @@ switch _mode do { }; RadioCurrentNetworkChannel = -1; }; - + ["refreshChannelTree"] call RadioChannels_script; }; - - + + case "refreshChannelTree": { if (isNil "RadioChannels_ctrlGroup") exitWith {}; - + private _ctrlTree = RadioChannels_ctrlGroup controlsGroupCtrl 189437; tvClear _ctrlTree; - - - + + + if (RadioCurrentNetworkChannel == -1) exitWith {}; RadioCurrentNetworkChannel = lnbCurSelRow (RadioChannels_ctrlGroup controlsGroupCtrl 101); - + (RadioChannelArray select RadioCurrentNetwork) params ["_conditions","_channels"]; - + private _channel = (_channels select RadioCurrentNetworkChannel); _channel params ["","","","_channelConditions"]; - - + + RadioNetworkChannel_data = []; - - + + fn_channelTreeProcessUnit = { - params ["_ctrlTree", "_treeRoot", "_giveRadio", "_unit"]; + params ["_ctrlTree", "_treeRoot", "_giveRadio", "_unit"]; private _roleDesc = ((_x get3DENAttribute "description") select 0); - + private _color = (side _unit) call TMF_common_fnc_sideToColor; - + if (_roleDesc == "") then { _roleDesc = getText (configfile >> "CfgVehicles" >> (typeOf _unit) >> "displayName"); }; private _unitIdx = _ctrlTree tvAdd [ _treeRoot, _roleDesc]; private _location = _treeRoot + [_unitIdx]; - _ctrlTree tvSetValue [_location, RadioNetworkChannel_data pushBack _unit]; + _ctrlTree tvSetValue [_location, RadioNetworkChannel_data pushBack _unit]; private _icon = getText (configFile >> "CfgVehicleIcons" >> getText (configFile >> "CfgVehicles" >> (typeOf _unit) >> "icon")); if (_icon == "") then { _icon = "\a3\3DEN\Data\Cfg3DEN\Object\iconPlayer_ca.paa"; //default player icon }; _ctrlTree tvSetPicture [_location,_icon]; _ctrlTree tvSetPictureColor [_location, _color]; - - + + if (!_giveRadio) then { private _unitChanList = (_unit get3DENAttribute "TMF_Channellist") select 0; if (_unitChanList isEqualType "") then { @@ -393,7 +393,7 @@ switch _mode do { //private _unitChanList = (call compile ((_unit get3DENAttribute "TMF_Channellist") select 0)); if (RadioCurrentNetworkChannel in _unitChanList) then { _giveRadio = true; - }; + }; }; private _returnCode = 3; if (_giveRadio) then { @@ -402,20 +402,20 @@ switch _mode do { } else { _ctrlTree tvSetPictureRight [_location, "x\tmf\addons\acre2\ui\RadioIcon_None_Small.paa"]; }; - + //0: All, Partial: 1, Leader: 2, None: 3 _returnCode }; - + fn_channelTreeProcessGroup = { params ["_ctrlTree", "_treeRoot", "_giveRadio", "_group"]; - + private _side = side _group; private _color = _side call TMF_common_fnc_sideToColor; private _grpIdx = _ctrlTree tvAdd [ _treeRoot, groupID _group]; private _location = _treeRoot + [_grpIdx]; private _grpIcon = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa"; - + //Found in (configfile >> "Cfg3DEN" >> "Group" >> "Draw" >> "textureCivilian") call { if (_side == west) exitWith { _grpIcon = "\a3\Ui_f\data\Map\Markers\NATO\b_unknown.paa";}; @@ -423,11 +423,11 @@ switch _mode do { if (_side == guerilla) exitWith { _grpIcon = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa";}; if (_side == civilian) exitWith { _grpIcon = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa";}; }; - + _ctrlTree tvSetPicture [_location, _grpIcon]; _ctrlTree tvSetPictureColor [_location, _color]; _ctrlTree tvSetValue [_location, RadioNetworkChannel_data pushBack _group]; - + private _giveLeader = false; if (!_giveRadio) then { private _grpChanList = (_group get3DENAttribute "TMF_Channellist") select 0; @@ -443,14 +443,14 @@ switch _mode do { }; if (RadioCurrentNetworkChannel in _grpChanList) then { _giveLeader = true; - }; + }; }; }; - - + + private _gaveSomeoneARadio = false; { - if ([_ctrlTree, _location, _giveRadio, _x] call fn_channelTreeProcessUnit != 3) then { + if ([_ctrlTree, _location, _giveRadio, _x] call fn_channelTreeProcessUnit != 3) then { _gaveSomeoneARadio = true; }; } forEach (units _group); @@ -474,38 +474,38 @@ switch _mode do { }; }; }; - - _returnCode + + _returnCode }; - + fn_channelTreeProcessFaction = { params ["_ctrlTree", "_treeRoot", "_giveRadio", "_faction"]; - + (RadioChannelArray select RadioCurrentNetwork) params ["_conditions","_channels"]; private _channel = (_channels select RadioCurrentNetworkChannel); _channel params ["","","","_channelConditions"]; - + if (!_giveRadio and {_faction in _channelConditions}) then { _giveRadio = true; }; - + private _factionIdx = _ctrlTree tvAdd [ _treeRoot,getText (configfile >> "CfgFactionClasses" >> _faction >> "displayName")]; private _location = _treeRoot + [_factionIdx]; - + _ctrlTree tvSetValue [_location, RadioNetworkChannel_data pushBack _faction]; - + private _factionImg = getText (configfile >> "CfgFactionClasses" >> _faction >> "icon"); _ctrlTree tvSetPicture [_location, _factionImg]; - - private _gaveSomeoneARadio = false; + + private _gaveSomeoneARadio = false; { if ([_ctrlTree, _location, _giveRadio, _x] call fn_channelTreeProcessGroup != 3) then { _gaveSomeoneARadio = true; }; } forEach (cacheAllPlayerGroups select {(faction (leader _x)) == _faction}); - + private _returnCode = 3; - + if (_giveRadio) then { _ctrlTree tvSetPictureRight [_location, "x\tmf\addons\acre2\ui\RadioIcon_Radio_Small.paa"]; _returnCode = 0; @@ -521,24 +521,24 @@ switch _mode do { }; _returnCode }; - + private _sides = []; { private _condition = _x; - if (_x isEqualType east) then { + if (_x isEqualType east) then { private _side = _x; - - + + if (_sides pushBackUnique _side != -1) then { private _giveRadio = false; private _location = [(_ctrlTree tvAdd [[], _side call TMF_common_fnc_sideToString])]; - + _ctrlTree tvSetPicture [_location, _side call TMF_common_fnc_sideToTexture]; _ctrlTree tvSetValue [_location, RadioNetworkChannel_data pushBack _side]; if (_side in _channelConditions) then { _giveRadio = true; }; - + //Collect factions for side. _factions = []; { @@ -548,7 +548,7 @@ switch _mode do { { if ([_ctrlTree, _location, _giveRadio, _x] call fn_channelTreeProcessFaction != 3) then { _gaveSomeoneARadio = true; }; } forEach _factions; - + if (_giveRadio) then { _ctrlTree tvSetPictureRight [_location, "x\tmf\addons\acre2\ui\RadioIcon_Radio_Small.paa"]; } else { @@ -567,7 +567,7 @@ switch _mode do { }; } forEach _conditions; - + { private _group = _x; if (_sides find (side _group) == -1) then { @@ -584,26 +584,26 @@ switch _mode do { }; }; } forEach cacheAllPlayerGroups; - + }; - - + + case "refreshNetworkTree": { - + if (isNil "RadioChannels_ctrlGroup") exitWith {}; - + _ctrlTree = RadioChannels_ctrlGroup controlsGroupCtrl 189438; tvClear _ctrlTree; - + RadioNetwork_data = []; - + _sides = []; _factions = []; { private _group = _x; private _side = (side _x); private _color = _side call TMF_common_fnc_sideToColor; - + private _sideIdx = _sides find _side; private _networkNumber = -1; scopeName "condSideSearch"; @@ -620,21 +620,21 @@ switch _mode do { //Find Side if (_sideIdx == -1) then { - private _sideText = _side call TMF_common_fnc_sideToString; - private _sideIcon = _side call TMF_common_fnc_sideToTexture; - + private _sideText = _side call TMF_common_fnc_sideToString; + private _sideIcon = _side call TMF_common_fnc_sideToTexture; + _ctrlTree tvAdd [[], _sideText]; _sideIdx = _sides pushBack _side; - + _ctrlTree tvSetPicture [[_sideIdx], _sideIcon]; _ctrlTree tvSetValue [[_sideIdx], RadioNetwork_data pushBack _side]; - + if (_networkNumber != -1) then { _ctrlTree tvSetPictureRight [[_sideIdx], (_networkNumber+1) call TMF_common_fnc_numToTexture]; } else { _ctrlTree tvExpand [_sideIdx]; }; - + //Add Faction _factions pushBack []; }; @@ -642,8 +642,8 @@ switch _mode do { private _faction = toLower (faction (leader _x)); private _sideFactions = _factions select _sideIdx; private _factionIdx = _sideFactions find _faction; - - + + if (_networkNumber == -1) then { { _x params ["_condition"]; @@ -656,27 +656,27 @@ switch _mode do { } forEach _condition; } forEach RadioChannelArray; }; - - + + if (_factionIdx == -1) then { _factionIdx = _ctrlTree tvAdd [ [_sideIdx],getText (configfile >> "CfgFactionClasses" >> _faction >> "displayName")]; _sideFactions pushBack _faction; _ctrlTree tvSetValue [[_sideIdx, _factionIdx], RadioNetwork_data pushBack _faction]; - + private _factionImg = getText (configfile >> "CfgFactionClasses" >> _faction >> "icon"); _ctrlTree tvSetPicture [[_sideIdx,_factionIdx],_factionImg]; - + if (_networkNumber != -1) then { _ctrlTree tvSetPictureRight [[_sideIdx, _factionIdx], (_networkNumber+1) call TMF_common_fnc_numToTexture]; } else { _ctrlTree tvExpand [_sideIdx, _factionIdx]; }; }; - - + + private _grpIdx = _ctrlTree tvAdd [ [_sideIdx, _factionIdx],groupID _x]; private _grpIcon = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa"; - + //Found in (configfile >> "Cfg3DEN" >> "Group" >> "Draw" >> "textureCivilian") call { if (_side == west) exitWith { _grpIcon = "\a3\Ui_f\data\Map\Markers\NATO\b_unknown.paa";}; @@ -684,11 +684,11 @@ switch _mode do { if (_side == guerilla) exitWith { _grpIcon = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa";}; if (_side == civilian) exitWith { _grpIcon = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa";}; }; - + _ctrlTree tvSetPicture [[_sideIdx, _factionIdx, _grpIdx], _grpIcon]; _ctrlTree tvSetPictureColor [[_sideIdx, _factionIdx, _grpIdx], _color]; _ctrlTree tvSetValue [[_sideIdx, _factionIdx, _grpIdx], RadioNetwork_data pushBack _group]; - + if (_networkNumber != -1) then { _ctrlTree tvSetPictureRight [[_sideIdx, _factionIdx, _grpIdx], (_networkNumber+1) call TMF_common_fnc_numToTexture]; } else { @@ -697,11 +697,11 @@ switch _mode do { _ctrlTree tvSetPictureRight [[_sideIdx, _factionIdx, _grpIdx], (_networkNumber+1) call TMF_common_fnc_numToTexture]; }; }; - + private _preUnitNetworkNumber = _networkNumber; { _networkNumber = _preUnitNetworkNumber; - + private _roleDesc = ((_x get3DENAttribute "description") select 0); if (_roleDesc == "") then { _roleDesc = getText (configfile >> "CfgVehicles" >> (typeOf _x) >> "displayName"); @@ -714,7 +714,7 @@ switch _mode do { _ctrlTree tvSetPicture [[_sideIdx, _factionIdx, _grpIdx, _unitIdx],_icon]; _ctrlTree tvSetPictureColor [[_sideIdx, _factionIdx, _grpIdx, _unitIdx], _color]; _ctrlTree tvSetValue [[_sideIdx, _factionIdx, _grpIdx, _unitIdx], RadioNetwork_data pushBack _x]; - + if (_networkNumber != -1) then { _ctrlTree tvSetPictureRight [[_sideIdx, _factionIdx, _grpIdx, _unitIdx], (_networkNumber+1) call TMF_common_fnc_numToTexture]; } else { @@ -725,7 +725,7 @@ switch _mode do { }; } forEach (units _x); } forEach cacheAllPlayerGroups; - + }; case "networkToggleButton": { with uiNamespace do { @@ -737,7 +737,7 @@ switch _mode do { }; _ctrl ctrlSetText format["< Configure Network %1 >", (RadioCurrentNetwork+1)]; - + ["refreshChannelList"] call RadioChannels_script; }; }; @@ -746,7 +746,7 @@ switch _mode do { if (RadioCurrentNetwork >= count RadioChannelArray) exitWith {}; private _curSel = lnbCurSelRow (RadioChannels_ctrlGroup controlsGroupCtrl 101); if (_curSel == -1) exitWith {}; - + private _radioChannels = (RadioChannelArray select RadioCurrentNetwork) select 1; _radioChannels deleteAt _curSel; // Update all channel lists for units/groups on same preset. @@ -789,20 +789,20 @@ switch _mode do { } forEach _groups; ["refreshChannelList"] call RadioChannels_script; - ["save"] call RadioChannels_script; + ["save"] call RadioChannels_script; }; }; case "channelAddClick": { with uiNamespace do { if (RadioCurrentNetwork >= count RadioChannelArray) exitWith {}; - + { (RadioChannels_ctrlGroup controlsGroupCtrl _x) ctrlShow true; } forEach (EDIT_CHANNEL_IDCS); { (RadioChannels_ctrlGroup controlsGroupCtrl _x) ctrlShow false; } forEach (BEHIND_EDIT_CHANNELS_IDCS); - + RadioChannelsEditMode = 0; (RadioChannels_ctrlGroup controlsGroupCtrl 313206) ctrlSetText ""; (RadioChannels_ctrlGroup controlsGroupCtrl 313207) ctrlSetText ""; @@ -813,20 +813,20 @@ switch _mode do { case "channelEditClick": { with uiNamespace do { if (RadioCurrentNetwork >= count RadioChannelArray) exitWith {}; - + private _curSel = lnbCurSelRow (RadioChannels_ctrlGroup controlsGroupCtrl 101); if (_curSel == -1) exitWith {}; - + private _radioChannels = (RadioChannelArray select RadioCurrentNetwork) select 1; (_radioChannels select _curSel) params ["_shortName", "_longName", "_radio", "", "_shared"]; - + { (RadioChannels_ctrlGroup controlsGroupCtrl _x) ctrlShow true; } forEach (EDIT_CHANNEL_IDCS); { (RadioChannels_ctrlGroup controlsGroupCtrl _x) ctrlShow false; } forEach (BEHIND_EDIT_CHANNELS_IDCS); - + RadioChannelsEditMode = 1; (RadioChannels_ctrlGroup controlsGroupCtrl 313206) ctrlSetText _shortName; (RadioChannels_ctrlGroup controlsGroupCtrl 313207) ctrlSetText _longName; @@ -841,7 +841,7 @@ switch _mode do { if (RadioChannelsEditMode == 1) then { private _curSel = lnbCurSelRow (RadioChannels_ctrlGroup controlsGroupCtrl 101); if (_curSel == -1) exitWith {}; - + private _radioChannels = (RadioChannelArray select RadioCurrentNetwork) select 1; (_radioChannels select _curSel) set [0,ctrlText (RadioChannels_ctrlGroup controlsGroupCtrl 313206)]; // ShortName @@ -858,7 +858,7 @@ switch _mode do { private _radioChannels = (RadioChannelArray select RadioCurrentNetwork) select 1; _radioChannels pushBack _newChanData; }; - + ["refreshChannelList"] call RadioChannels_script; { (RadioChannels_ctrlGroup controlsGroupCtrl _x) ctrlShow false; @@ -884,12 +884,12 @@ switch _mode do { private _ctrlTree = (RadioChannels_ctrlGroup controlsGroupCtrl 189437); private _treeSel = tvCurSel _ctrlTree; private _entity = RadioNetworkChannel_data select (_ctrlTree tvValue _treeSel); - + // currentChannel private _curSel = lnbCurSelRow (RadioChannels_ctrlGroup controlsGroupCtrl 101); private _radioChannel = (((RadioChannelArray select RadioCurrentNetwork) select 1) select _curSel); private _condition = _radioChannel select 3; - + if (_entity isEqualType east or _entity isEqualType "") then { _condition pushBackUnique _entity; } else { @@ -905,8 +905,8 @@ switch _mode do { }; }; - - + + ["refreshChannelTree"] call RadioChannels_script; ["save"] call RadioChannels_script; }; @@ -916,12 +916,12 @@ switch _mode do { private _ctrlTree = (RadioChannels_ctrlGroup controlsGroupCtrl 189437); private _treeSel = tvCurSel _ctrlTree; private _entity = RadioNetworkChannel_data select (_ctrlTree tvValue _treeSel); - + // currentChannel private _curSel = lnbCurSelRow (RadioChannels_ctrlGroup controlsGroupCtrl 101); private _radioChannel = (((RadioChannelArray select RadioCurrentNetwork) select 1) select _curSel); private _condition = _radioChannel select 3; - + if (_entity isEqualType grpNull) then { _list = (_entity get3DENAttribute "TMF_ChannellistLeader") params ["_value"]; if (_value isEqualType []) then { @@ -932,7 +932,7 @@ switch _mode do { _entity set3DENAttribute ["TMF_ChannellistLeader",str _value]; }; }; - + ["refreshChannelTree"] call RadioChannels_script; ["save"] call RadioChannels_script; }; @@ -942,12 +942,12 @@ switch _mode do { private _ctrlTree = (RadioChannels_ctrlGroup controlsGroupCtrl 189437); private _treeSel = tvCurSel _ctrlTree; private _entity = RadioNetworkChannel_data select (_ctrlTree tvValue _treeSel); - + // currentChannel private _curSel = lnbCurSelRow (RadioChannels_ctrlGroup controlsGroupCtrl 101); private _radioChannel = (((RadioChannelArray select RadioCurrentNetwork) select 1) select _curSel); private _condition = _radioChannel select 3; - + if (_entity isEqualType east or _entity isEqualType "") then { _radioChannel set [3,_condition - [_entity]]; if (_entity isEqualType east) then { @@ -960,7 +960,7 @@ switch _mode do { }; }; } forEach (_condition); - + //remove groups { [_curSel, _x] call fn_removeGroupFromChannel; @@ -980,12 +980,12 @@ switch _mode do { [_curSel,_entity] call fn_removeUnitFromChannel; }; }; - + ["refreshChannelTree"] call RadioChannels_script; ["save"] call RadioChannels_script; }; }; - + case "save": { //RadioChannelArray @@ -1007,9 +1007,9 @@ switch _mode do { } forEach (_condition); } forEach (_channels); } forEach _array; - + private _string = str _array; - + set3DENMissionAttributes [["teamworkMissionAcreAttributes", "TMF_AcreSettings", _string]]; }; }; diff --git a/addons/assigngear/Cfg3DEN.hpp b/addons/assigngear/Cfg3DEN.hpp index 9b1be149..ea9805da 100644 --- a/addons/assigngear/Cfg3DEN.hpp +++ b/addons/assigngear/Cfg3DEN.hpp @@ -1,5 +1,5 @@ -#include "\a3\3DEN\UI\macros.inc" -#include "\a3\3DEN\UI\resincl.inc" +#include "\a3\3den\UI\macros.inc" +#include "\a3\3den\UI\resincl.inc" class ctrlCombo; class ctrlStatic; class ctrlToolbox; @@ -71,7 +71,7 @@ class Cfg3DEN class GVAR(vehicleGear) { displayName = "TMF: Vehicle Gear"; collapsed = 0; - class Attributes + class Attributes { class GVAR(vehicle) { diff --git a/addons/assigngear/config.cpp b/addons/assigngear/config.cpp index 3d068c23..e36b056c 100644 --- a/addons/assigngear/config.cpp +++ b/addons/assigngear/config.cpp @@ -1,6 +1,6 @@ #include "script_component.hpp" -#include "\a3\3DEN\UI\macros.inc" -#include "\a3\3DEN\UI\macroExecs.inc" +#include "\a3\3den\UI\macros.inc" +#include "\a3\3den\UI\macroExecs.inc" #include "\a3\ui_f\hpp\defineCommon.inc" class CfgPatches diff --git a/addons/assigngear/functions/fnc_gui_vehicleGear_selector.sqf b/addons/assigngear/functions/fnc_gui_vehicleGear_selector.sqf index cee00229..b83f46c4 100644 --- a/addons/assigngear/functions/fnc_gui_vehicleGear_selector.sqf +++ b/addons/assigngear/functions/fnc_gui_vehicleGear_selector.sqf @@ -7,7 +7,7 @@ * Internal Use Only */ #include "\a3\3den\UI\dikCodes.inc" -#include "\a3\3DEN\UI\resincl.inc" +#include "\a3\3den\UI\resincl.inc" disableSerialization; params ["_mode", "_args"]; TRACE_2("UI", _mode, _args); @@ -204,7 +204,7 @@ switch _mode do { }; private _ctrlList = _ctrlGroup controlsGroupCtrl IDC_VEHICLEGEAR_LIST; private _rowIndex = lnbCurSelRow _ctrlList; - private _value = ((_ctrlList lnbValue [_rowIndex, 0]) + _amount) max 0; + private _value = ((_ctrlList lnbValue [_rowIndex, 0]) + _amount) max 0; _ctrlList lnbSetValue [[_rowIndex, 0], _value]; _ctrlList lnbSetText [[_rowIndex, 2], str _value]; @@ -223,4 +223,4 @@ switch _mode do { _cache set [2, []]; ['filterChanged', [ _ctrlGroup, _currentFilter ]] call FUNC(gui_vehicleGear_selector); }; -}; \ No newline at end of file +}; diff --git a/addons/autotest/Cfg3DEN.hpp b/addons/autotest/Cfg3DEN.hpp index 5d8ccdef..b24fe3a9 100644 --- a/addons/autotest/Cfg3DEN.hpp +++ b/addons/autotest/Cfg3DEN.hpp @@ -1,6 +1,6 @@ -#include "\a3\3DEN\UI\macros.inc" -#include "\a3\3DEN\UI\resincl.inc" +#include "\a3\3den\UI\macros.inc" +#include "\a3\3den\UI\resincl.inc" class ctrlDefault; @@ -15,7 +15,7 @@ class RscText; class RscPicture; /* -class cfgScriptPaths +class cfgScriptPaths { TMF_briefing = "x\tmf\addons\briefing\ui_scripts\"; }; @@ -90,20 +90,20 @@ class Cfg3DEN }; }; }; - + //FULLPAGE -> https://community.bistudio.com/wiki/Eden_Editor:_Scenario_Attributes - + // "Multiplayer" get3DENMissionAttribute "maxplayers" // OR minplayers // "Multiplayer" get3DENMissionAttribute "gametype" // "DM" - https://community.bistudio.com/wiki/Multiplayer_Game_Types - + //"Multiplayer" get3DENMissionAttribute "IntelOverviewText" // Summary - + // "Scenario" get3DENMissionAttribute "Author" //"Scenario" get3DENMissionAttribute "IntelBriefingName" - + class Attributes { - + class Default; class Title : Default { @@ -142,7 +142,7 @@ class Cfg3DEN x = ATTRIBUTE_TITLE_W * GRID_W; h = SIZE_M * GRID_H; w = (ATTRIBUTE_CONTENT_W -(1.5* SIZE_M)) * GRID_W; - + }; class Picture : RscPicture { @@ -189,7 +189,7 @@ class Cfg3DEN x = ATTRIBUTE_TITLE_W * GRID_W; h = SIZE_M * GRID_H; w = (ATTRIBUTE_CONTENT_W -(1.5* SIZE_M)) * GRID_W; - + }; class Picture : RscPicture { @@ -333,13 +333,13 @@ class Cfg3DEN }; }; }; - + class Toolbox; //class Toolbox: Title - + class TMF_autoTest_Test : Toolbox { attributeLoad = "_this call tmf_autotest_fnc_autotest"; attributeSave = "true"; - + w = (ATTRIBUTE_TITLE_W + ATTRIBUTE_CONTENT_W) * GRID_W; h = 24 * SIZE_M * GRID_H; class Controls @@ -350,7 +350,7 @@ class Cfg3DEN style = ST_RIGHT; w = ATTRIBUTE_TITLE_W * GRID_W; x = 0; - h = 1 * SIZE_M * GRID_H; + h = 1 * SIZE_M * GRID_H; y = 0; colorBackground[] = {0,0,0,0}; tooltip = ""; @@ -380,7 +380,7 @@ class Cfg3DEN }; }; - + }; - + }; diff --git a/addons/briefing/Cfg3DEN.hpp b/addons/briefing/Cfg3DEN.hpp index c6c2ca00..0b4b6735 100644 --- a/addons/briefing/Cfg3DEN.hpp +++ b/addons/briefing/Cfg3DEN.hpp @@ -1,6 +1,6 @@ -#include "\a3\3DEN\UI\macros.inc" -#include "\a3\3DEN\UI\resincl.inc" +#include "\a3\3den\UI\macros.inc" +#include "\a3\3den\UI\resincl.inc" class ctrlDefault; class ctrlDefaultText;// : ctrlDefault; @@ -13,7 +13,7 @@ class RscButtonMenu; class RscText; -class cfgScriptPaths +class cfgScriptPaths { TMF_briefing = "x\tmf\addons\briefing\ui_scripts\"; //" - Escape for VS code linter }; @@ -81,7 +81,7 @@ class Cfg3DEN }; }; }; - + }; }; // Configuration of all objects @@ -141,8 +141,8 @@ class Cfg3DEN { class Title; class Toolbox; //class Toolbox: Title - - + + class BriefingSettings : Toolbox { scriptName = "BriefingSettings"; @@ -152,7 +152,7 @@ class Cfg3DEN attributeLoad = "['attributeLoad',_this] call (uinamespace getvariable 'BriefingSettings_script');"; attributeSave = "['attributeSave',_this] call (uinamespace getvariable 'BriefingSettings_script');"; - + w = (ATTRIBUTE_TITLE_W + ATTRIBUTE_CONTENT_W) * GRID_W; h = 16 * SIZE_M * GRID_H; class Controls @@ -161,11 +161,11 @@ class Cfg3DEN { text = "Briefings:"; w = ((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W)/2) * GRID_W; - h = 1 * SIZE_M * GRID_H; + h = 1 * SIZE_M * GRID_H; y = 0; x = SIZE_M * GRID_W; colorBackground[] = {0,0,0,0}; - }; + }; class BriefeesTitle : BriefTitle { text = "Those to be briefed:"; @@ -274,7 +274,7 @@ class Cfg3DEN x = (((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W) - SIZE_M ) * GRID_W / 6)*3.5 + SIZE_M * GRID_W; action = "['BriefingDelClickCancel',_this] call (uinamespace getvariable 'BriefingSettings_script');"; }; - + class EditBriefingTitle : BriefTitle { idc = 313201; @@ -284,7 +284,7 @@ class Cfg3DEN w = ((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W) - SIZE_M ) * GRID_W; colorBackground[] = {0.1,0.1,0.1,1}; }; - + class EditBriefingShortTitle : BriefTitle { idc = 313202; @@ -311,8 +311,8 @@ class Cfg3DEN h = SIZE_M * GRID_H; w = ((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W) - (4 * SIZE_M) ) * GRID_W; }; - - class EditBriefingSciptName : EditBriefingShortTitle + + class EditBriefingSciptName : EditBriefingShortTitle { idc = 313207; text = "Script location:"; @@ -320,7 +320,7 @@ class Cfg3DEN y = 5.3 * SIZE_M * GRID_H; w = ((ATTRIBUTE_TITLE_W+ATTRIBUTE_CONTENT_W) - SIZE_M ) * GRID_W; }; - + class EditBriefingScript : EditBriefingShort { idc = 313211; @@ -329,6 +329,6 @@ class Cfg3DEN }; }; - + }; }; diff --git a/addons/briefing/ui_scripts/BriefingSettings.sqf b/addons/briefing/ui_scripts/BriefingSettings.sqf index 7de7141f..ce5376a8 100644 --- a/addons/briefing/ui_scripts/BriefingSettings.sqf +++ b/addons/briefing/ui_scripts/BriefingSettings.sqf @@ -7,7 +7,7 @@ params ["_mode",["_params",[]]]; fn_removeUnitFromBrief = { params ["_channel", "_unit"]; - + _list = (_unit get3DENAttribute "TMF_Briefinglist") params ["_value"]; if (_value isEqualType []) then { //Is default do nothing @@ -32,7 +32,7 @@ fn_removeGroupFromBrief = { _group set3DENAttribute ["TMF_Briefinglist",str _value]; }; - + _list = (_group get3DENAttribute "TMF_Briefinglist") params ["_value"]; if (_value isEqualType []) then { //is default do nothing @@ -63,7 +63,7 @@ switch _mode do { } forEach _playableUnits; BriefingArray = ("TMF_MissionBriefingAttributes" get3DENMissionAttribute "TMF_Briefing"); if (BriefingArray isEqualType "") then { BriefingArray = call compile BriefingArray;}; - if (isNil "BriefingArray") then { + if (isNil "BriefingArray") then { BriefingArray = [ ["West",[west],"briefing\briefing_west.sqf"], ["East",[east],"briefing\briefing_east.sqf"], @@ -90,15 +90,15 @@ switch _mode do { _ctrlGroup ctrladdeventhandler ["setfocus",{with uinamespace do {BriefingSettings_ctrlGroup = _this select 0;};}]; _ctrlGroup ctrladdeventhandler ["killfocus",{with uinamespace do {BriefingSettings_ctrlGroup = nil;};}]; - - + + { (_ctrlGroup controlsGroupCtrl _x) ctrlShow false; } forEach (EDIT_CHANNEL_IDCS); { (_ctrlGroup controlsGroupCtrl _x) ctrlShow true; } forEach (BEHIND_EDIT_CHANNELS_IDCS); - + ["refreshBriefList"] call BriefingSettings_script; }; @@ -122,63 +122,63 @@ switch _mode do { case "refreshBriefList": { if (isNil "BriefingSettings_ctrlGroup") exitWith {}; BriefingCurrentBrief = 0; - + private _ctrlBriefList = BriefingSettings_ctrlGroup controlsGroupCtrl 101; _ctrlBriefList lnbSetColumnsPos [0,5,5]; - + lnbClear _ctrlBriefList; { _x params ["_name"]; _ctrlBriefList lnbaddrow [_name, "", ""]; } forEach BriefingArray; - - if (count BriefingArray > 0) then { + + if (count BriefingArray > 0) then { _ctrlBriefList lnbSetCurSelRow 0; BriefingCurrentBrief = 0; } else { _ctrlBriefList lnbSetColumnsPos [0,5,5]; _ctrlBriefList lnbaddrow ["No Briefings","",""]; BriefingCurrentBrief = -1; }; - + ["refreshBriefTree"] call BriefingSettings_script; }; - - + + case "refreshBriefTree": { - + if (isNil "BriefingSettings_ctrlGroup") exitWith {}; - + _ctrlTree = BriefingSettings_ctrlGroup controlsGroupCtrl 189437; tvClear _ctrlTree; - + if (BriefingCurrentBrief == -1) exitWith {}; BriefingCurrentBrief = lnbCurSelRow (BriefingSettings_ctrlGroup controlsGroupCtrl 101); - + (BriefingArray select BriefingCurrentBrief) params ["","_BriefConditions"]; - - + + BriefingTree_data = []; - - + + fn_BriefTreeProcessUnit = { - params ["_ctrlTree", "_treeRoot", "_doSpeak", "_unit"]; + params ["_ctrlTree", "_treeRoot", "_doSpeak", "_unit"]; private _roleDesc = ((_unit get3DENAttribute "description") select 0); private _color = (side _unit) call TMF_common_fnc_sideToColor; - + if (_roleDesc == "") then { _roleDesc = getText (configfile >> "CfgVehicles" >> (typeOf _unit) >> "displayName"); }; private _unitIdx = _ctrlTree tvAdd [ _treeRoot, _roleDesc]; private _location = _treeRoot + [_unitIdx]; - _ctrlTree tvSetValue [_location, BriefingTree_data pushBack _unit]; + _ctrlTree tvSetValue [_location, BriefingTree_data pushBack _unit]; private _icon = getText (configFile >> "CfgVehicleIcons" >> getText (configFile >> "CfgVehicles" >> (typeOf _unit) >> "icon")); if (_icon == "") then { _icon = "\a3\3DEN\Data\Cfg3DEN\Object\iconPlayer_ca.paa"; //default player icon }; _ctrlTree tvSetPicture [_location, _icon]; _ctrlTree tvSetPictureColor [_location, _color]; - - + + if (!_doSpeak) then { private _unitChanList = (_unit get3DENAttribute "TMF_Briefinglist") select 0; if (_unitChanList isEqualType "") then { @@ -186,7 +186,7 @@ switch _mode do { }; if (BriefingCurrentBrief in _unitChanList) then { _doSpeak = true; - }; + }; }; private _returnCode = 3; if (_doSpeak) then { @@ -195,14 +195,14 @@ switch _mode do { } else { _ctrlTree tvSetPictureRight [_location, "x\tmf\addons\briefing\UI\plus_small_ca.paa"]; }; - + //0: All, Partial: 1, Leader: 2, None: 3 _returnCode }; - + fn_BriefTreeProcessGroup = { params ["_ctrlTree", "_treeRoot", "_doSpeak", "_group"]; - + private _side = side _group; private _render = _side != sideLogic; // Do not render for Zeus Group private _location = +_treeRoot; @@ -211,7 +211,7 @@ switch _mode do { private _grpIdx = _ctrlTree tvAdd [ _treeRoot, groupID _group]; _location = _location + [_grpIdx]; private _grpIcon = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa"; - + //Found in (configfile >> "Cfg3DEN" >> "Group" >> "Draw" >> "textureCivilian") call { if (_side == west) exitWith { _grpIcon = "\a3\Ui_f\data\Map\Markers\NATO\b_unknown.paa";}; @@ -219,12 +219,12 @@ switch _mode do { if (_side == guerilla) exitWith { _grpIcon = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa";}; if (_side == civilian) exitWith { _grpIcon = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa";}; }; - + _ctrlTree tvSetPicture [_location, _grpIcon]; _ctrlTree tvSetPictureColor [_location, _color]; _ctrlTree tvSetValue [_location, BriefingTree_data pushBack _group]; }; - + if (!_doSpeak) then { private _grpChanList = (_group get3DENAttribute "TMF_Briefinglist") select 0; if (_grpChanList isEqualType "") then { @@ -233,8 +233,8 @@ switch _mode do { if (BriefingCurrentBrief in _grpChanList) then { _doSpeak = true; }; - }; - + }; + private _hasSpeaker = false; private _units = units _group; if (_side == sideLogic) then { @@ -245,7 +245,7 @@ switch _mode do { }; }; { - if ([_ctrlTree, _location, _doSpeak, _x] call fn_BriefTreeProcessUnit != 3) then { + if ([_ctrlTree, _location, _doSpeak, _x] call fn_BriefTreeProcessUnit != 3) then { _hasSpeaker = true; }; } forEach _units; @@ -270,41 +270,41 @@ switch _mode do { }; }; }; - - _returnCode + + _returnCode }; - + fn_BriefTreeProcessFaction = { params ["_ctrlTree", "_treeRoot", "_doSpeak", "_faction"]; BriefingCurrentBrief = lnbCurSelRow (BriefingSettings_ctrlGroup controlsGroupCtrl 101); - + (BriefingArray select BriefingCurrentBrief) params ["","_BriefConditions"]; - + private _render = _faction != ""; private _location = +_treeRoot; if (!_doSpeak and {_faction in _BriefConditions}) then { _doSpeak = true; }; - + if (_render) then { private _factionIdx = _ctrlTree tvAdd [ _treeRoot,getText (configfile >> "CfgFactionClasses" >> _faction >> "displayName")]; _location = _location + [_factionIdx]; - + _ctrlTree tvSetValue [_location, BriefingTree_data pushBack _faction]; - + private _factionImg = getText (configfile >> "CfgFactionClasses" >> _faction >> "icon"); _ctrlTree tvSetPicture [_location, _factionImg]; }; - - private _hasSpeaker = false; + + private _hasSpeaker = false; { if ([_ctrlTree, _location, _doSpeak, _x] call fn_BriefTreeProcessGroup != 3) then { _hasSpeaker = true; }; } forEach (cacheAllPlayerGroups select {(faction (leader _x)) == _faction}); - + private _returnCode = 3; - + if (_doSpeak) then { if (_render) then { _ctrlTree tvSetPictureRight [_location, "x\tmf\addons\briefing\UI\check_small_ca.paa"]; @@ -326,20 +326,20 @@ switch _mode do { }; _returnCode }; - - + + private _sides = []; {_sides pushBackUnique (side _x);} forEach cacheAllPlayerGroups; { private _side = _x; private _doSpeak = false; private _location = [(_ctrlTree tvAdd [[], _side call TMF_common_fnc_sideToString])]; - + _ctrlTree tvSetPicture [_location, _side call TMF_common_fnc_sideToTexture]; _ctrlTree tvSetValue [_location, BriefingTree_data pushBack _side]; if (_side in _BriefConditions) then { _doSpeak = true; }; - + //Collect factions for side. _factions = []; { @@ -349,7 +349,7 @@ switch _mode do { { if ([_ctrlTree, _location, _doSpeak, _x] call fn_BriefTreeProcessFaction != 3) then { _hasSpeaker = true; }; } forEach _factions; - + if (_doSpeak) then { _ctrlTree tvSetPictureRight [_location, "x\tmf\addons\briefing\UI\check_small_ca.paa"]; } else { @@ -371,7 +371,7 @@ switch _mode do { BriefingArray deleteAt _curSel; ["refreshBriefList"] call BriefingSettings_script; - ["save"] call BriefingSettings_script; + ["save"] call BriefingSettings_script; }; }; case "BriefAddClick": { @@ -382,7 +382,7 @@ switch _mode do { { (BriefingSettings_ctrlGroup controlsGroupCtrl _x) ctrlShow false; } forEach (BEHIND_EDIT_CHANNELS_IDCS); - + BriefingSettingsEditMode = 0; (BriefingSettings_ctrlGroup controlsGroupCtrl 313206) ctrlSetText ""; ctrlSetFocus (BriefingSettings_ctrlGroup controlsGroupCtrl 313206); @@ -392,17 +392,17 @@ switch _mode do { with uiNamespace do { private _curSel = lnbCurSelRow (BriefingSettings_ctrlGroup controlsGroupCtrl 101); if (_curSel == -1) exitWith {}; - + private _Briefings = (BriefingArray select _curSel); _Briefings params ["_name","","_script"]; - + { (BriefingSettings_ctrlGroup controlsGroupCtrl _x) ctrlShow true; } forEach (EDIT_CHANNEL_IDCS); { (BriefingSettings_ctrlGroup controlsGroupCtrl _x) ctrlShow false; } forEach (BEHIND_EDIT_CHANNELS_IDCS); - + BriefingSettingsEditMode = 1; (BriefingSettings_ctrlGroup controlsGroupCtrl 313206) ctrlSetText _name; (BriefingSettings_ctrlGroup controlsGroupCtrl 313211) ctrlSetText _script; @@ -416,16 +416,16 @@ switch _mode do { if (BriefingSettingsEditMode == 1) then { private _curSel = lnbCurSelRow (BriefingSettings_ctrlGroup controlsGroupCtrl 101); if (_curSel == -1) exitWith {}; - + private _Briefings = (BriefingArray select _curSel); _Briefings set [0,ctrlText (BriefingSettings_ctrlGroup controlsGroupCtrl 313206)]; // ShortName _Briefings set [2,ctrlText (BriefingSettings_ctrlGroup controlsGroupCtrl 313211)]; // ShortName - + } else { BriefingArray pushBack [ctrlText (BriefingSettings_ctrlGroup controlsGroupCtrl 313206),[],ctrlText (BriefingSettings_ctrlGroup controlsGroupCtrl 313211)]; }; - + ["refreshBriefList"] call BriefingSettings_script; { (BriefingSettings_ctrlGroup controlsGroupCtrl _x) ctrlShow false; @@ -451,11 +451,11 @@ switch _mode do { private _ctrlTree = (BriefingSettings_ctrlGroup controlsGroupCtrl 189437); private _treeSel = tvCurSel _ctrlTree; private _entity = BriefingTree_data select (_ctrlTree tvValue _treeSel); - + // currentChannel private _curSel = lnbCurSelRow (BriefingSettings_ctrlGroup controlsGroupCtrl 101); private _condition = (BriefingArray select _curSel) select 1; - + if (_entity isEqualType east or _entity isEqualType "") then { _condition pushBackUnique _entity; } else { @@ -470,23 +470,23 @@ switch _mode do { }; }; }; - + ["refreshBriefTree"] call BriefingSettings_script; ["save"] call BriefingSettings_script; }; }; - + case "BriefTreeRemove": { with uiNamespace do { private _ctrlTree = (BriefingSettings_ctrlGroup controlsGroupCtrl 189437); private _treeSel = tvCurSel _ctrlTree; private _entity = BriefingTree_data select (_ctrlTree tvValue _treeSel); - + // currentChannel private _curSel = lnbCurSelRow (BriefingSettings_ctrlGroup controlsGroupCtrl 101); private _BriefEntry = (BriefingArray select _curSel); private _condition = _BriefEntry select 1; - + if (_entity isEqualType east or _entity isEqualType "") then { _BriefEntry set [1,_condition - [_entity]]; if (_entity isEqualType east) then { @@ -499,7 +499,7 @@ switch _mode do { }; }; } forEach (_condition); - + //remove groups { [_curSel, _x] call fn_removeGroupFromBrief; @@ -519,12 +519,12 @@ switch _mode do { [_curSel,_entity] call fn_removeUnitFromBrief; }; }; - + ["refreshBriefTree"] call BriefingSettings_script; ["save"] call BriefingSettings_script; }; }; - + case "save": { //RadioChannelArray private _array = + (uiNamespace getVariable "BriefingArray"); diff --git a/addons/common/Cfg3DEN.hpp b/addons/common/Cfg3DEN.hpp index 13da4649..eb1e918b 100644 --- a/addons/common/Cfg3DEN.hpp +++ b/addons/common/Cfg3DEN.hpp @@ -1,5 +1,5 @@ -#include "\a3\3DEN\UI\macros.inc" -#include "\a3\3DEN\UI\resincl.inc" +#include "\a3\3den\UI\macros.inc" +#include "\a3\3den\UI\resincl.inc" class Cfg3DEN { diff --git a/addons/marker/Cfg3DEN.hpp b/addons/marker/Cfg3DEN.hpp index 355810ca..a55c2dbf 100644 --- a/addons/marker/Cfg3DEN.hpp +++ b/addons/marker/Cfg3DEN.hpp @@ -1,4 +1,4 @@ -#include "\a3\3DEN\UI\macros.inc" +#include "\a3\3den\UI\macros.inc" class Cfg3DEN { diff --git a/addons/orbat/Cfg3DEN.hpp b/addons/orbat/Cfg3DEN.hpp index bbb0703f..63ef702c 100644 --- a/addons/orbat/Cfg3DEN.hpp +++ b/addons/orbat/Cfg3DEN.hpp @@ -1,6 +1,6 @@ -#include "\a3\3DEN\UI\resincl.inc" -#include "\a3\3DEN\UI\macros.inc" +#include "\a3\3den\UI\resincl.inc" +#include "\a3\3den\UI\macros.inc" #define GROUP_MARKER_PREVIEW "x\tmf\addons\orbat\textures\empty.paa", \ "x\tmf\addons\orbat\textures\yellow_inf.paa", \ diff --git a/addons/respawn/Cfg3DEN.hpp b/addons/respawn/Cfg3DEN.hpp index 768c98bf..61079baa 100644 --- a/addons/respawn/Cfg3DEN.hpp +++ b/addons/respawn/Cfg3DEN.hpp @@ -1,3 +1,3 @@ -#include "\a3\3DEN\UI\resincl.inc" -#include "\a3\3DEN\UI\macros.inc" +#include "\a3\3den\UI\resincl.inc" +#include "\a3\3den\UI\macros.inc" diff --git a/addons/teamcolour/Cfg3DEN.hpp b/addons/teamcolour/Cfg3DEN.hpp index 79006d9d..0eeb4d7f 100644 --- a/addons/teamcolour/Cfg3DEN.hpp +++ b/addons/teamcolour/Cfg3DEN.hpp @@ -1,4 +1,4 @@ -#include "\a3\3DEN\UI\macros.inc" +#include "\a3\3den\UI\macros.inc" class ctrlToolbox; @@ -66,4 +66,4 @@ class Cfg3DEN }; }; }; -}; \ No newline at end of file +}; diff --git a/include/a3/3DEN/UI/Attributes/AmmoBox.sqf b/include/a3/3DEN/UI/Attributes/AmmoBox.sqf deleted file mode 100644 index be4cfeae..00000000 --- a/include/a3/3DEN/UI/Attributes/AmmoBox.sqf +++ /dev/null @@ -1,534 +0,0 @@ -#include "\a3\3DEN\UI\dikCodes.inc" - -#define VALUE_NUMBER "#(argb,1,1,1)color(0,0,0,0)" -#define COLUMNS 3 - -#define SYMBOL_VIRTUAL_0 "-" -#define SYMBOL_VIRTUAL_1 "∞" - -params ["_mode", "_params"]; - -switch _mode do -{ - case "onLoad": - { - //--- Selected ammobox - private _entity = get3DENSelected "object" select 0; - - //--- Get current cargo - private _cargo = - [ - getweaponcargo _entity, - getmagazinecargo _entity, - getitemcargo _entity, - getbackpackcargo _entity - ]; - - //--- Get virtual cargo (only when no default cargo is present) - AmmoBox_type = 0; - if ({count (_x select 0) > 0} count _cargo == 0) then - { - private _virtualCargo = - [ - _entity call bis_fnc_getVirtualWeaponCargo, - _entity call bis_fnc_getVirtualMagazineCargo, - _entity call bis_fnc_getVirtualItemCargo, - _entity call bis_fnc_getVirtualBackpackCargo - ]; - - //--- Virtual cargo is empty as well, keep default cargo selected - if ({count (_x select 0) > 0} count _virtualCargo == 0) exitwith {}; - - AmmoBox_type = 1; - { - _xCargo = _cargo select _foreachindex; - { - _index = (_xCargo select 0) find _x; - if (_index < 0) then { - (_xCargo select 0) pushback _x; - (_xCargo select 1) pushback 1; - }; - } foreach _x; - } foreach _virtualCargo; - }; - - RscAttributeInventory_cargo = [[],[]]; - { - RscAttributeInventory_cargo set [0,(RscAttributeInventory_cargo select 0) + (_x select 0)]; - RscAttributeInventory_cargo set [1,(RscAttributeInventory_cargo select 1) + (_x select 1)]; - } foreach _cargo; - - _classes = RscAttributeInventory_cargo select 0; - {_classes set [_foreachindex,tolower _x];} foreach _classes; - - //--- Get limits -/* - _cfgEntity = configfile >> "cfgvehicles" >> typeof _entity; - _cfgTransportMaxBackpacks = getnumber (_cfgEntity >> "transportMaxBackpacks"); - _cfgTransportMaxMagazines = getnumber (_cfgEntity >> "transportMaxMagazines"); - _cfgTransportMaxWeapons = getnumber (_cfgEntity >> "transportMaxWeapons"); - RscAttributeInventory_loadBackpack = if (_cfgTransportMaxBackpacks > 0) then {1 / _cfgTransportMaxBackpacks} else {1e10}; - RscAttributeInventory_loadMagazine = if (_cfgTransportMaxMagazines > 0) then {1 / _cfgTransportMaxMagazines} else {1e10}; - RscAttributeInventory_loadWeapon = if (_cfgTransportMaxWeapons > 0) then {1 / _cfgTransportMaxWeapons} else {1e10}; -*/ - - //--- Init UI - _ctrlGroup = _params select 0; - (ctrlparent _ctrlGroup) displayaddeventhandler ["keydown",{with uinamespace do {['keydown',[AmmoBox_ctrlGroup,_this select 1,_this select 2,_this select 3],objnull] call AmmoBox_script;};}]; - //_ctrlGroup ctrladdeventhandler ["keydown",{with uinamespace do {['keydown',_this,objnull] call AmmoBox_script;};}]; - _ctrlGroup ctrladdeventhandler ["setfocus",{with uinamespace do {AmmoBox_ctrlGroup = _this select 0;};}]; - _ctrlGroup ctrladdeventhandler ["killfocus",{with uinamespace do {AmmoBox_ctrlGroup = nil;};}]; - - _ctrlType = _ctrlGroup controlsGroupCtrl 103; - _ctrlType ctrladdeventhandler ["toolboxselchanged",{with uinamespace do {['typeChanged',_this,objnull] call AmmoBox_script;};}]; - _ctrlType lbsetcursel AmmoBox_type; - ["typeChanged",[_ctrlType,AmmoBox_type],objnull] call AmmoBox_script; - - _ctrlFilter = _ctrlGroup controlsGroupCtrl 100; - _ctrlFilter ctrladdeventhandler ["toolboxselchanged",{with uinamespace do {['filterChanged',_this,objnull] call AmmoBox_script;};}]; - ["filterChanged",[_ctrlFilter,0],objnull] call AmmoBox_script; - - _ctrlList = _ctrlGroup controlsGroupCtrl 101; - _ctrlList ctrladdeventhandler ["lbselchanged",{with uinamespace do {["listSelect",[ctrlparentcontrolsgroup (_this select 0)],objnull] call AmmoBox_script;};}]; - _ctrlList ctrladdeventhandler ["lbdblclick",{with uinamespace do {["listModify",[ctrlparentcontrolsgroup (_this select 0),+1],objnull] call AmmoBox_script;};}]; - - _ctrlArrowLeft = _ctrlGroup controlsGroupCtrl 313102; - _ctrlArrowLeft ctrladdeventhandler ["buttonclick",{with uinamespace do {["listModify",[ctrlparentcontrolsgroup (_this select 0),-1],objnull] call AmmoBox_script;};}]; - _ctrlArrowRight = _ctrlGroup controlsGroupCtrl 313103; - _ctrlArrowRight ctrladdeventhandler ["buttonclick",{with uinamespace do {["listModify",[ctrlparentcontrolsgroup (_this select 0),+1],objnull] call AmmoBox_script;};}]; - - _ctrlButtonCustom = _ctrlGroup controlsGroupCtrl 104; - _ctrlButtonCustom ctrlsettext localize "str_disp_arcmap_clear"; - _ctrlButtonCustom ctrladdeventhandler ["buttonclick",{with uinamespace do {["clear",[ctrlparentcontrolsgroup (_this select 0)],objnull] call AmmoBox_script;};}]; - - if (isNil "AmmoBox_list") then - { - [ctrlparentcontrolsgroup (_params select 0)] spawn - { - disableserialization; - startLoadingScreen ["","RscDisplayLoadMission"]; - - //--- Get weapons and magazines from curator addons - private _types = - [ - ["AssaultRifle","Shotgun","Rifle","SubmachineGun"], - ["MachineGun"], - ["SniperRifle"], - ["Launcher","MissileLauncher","RocketLauncher"], - ["Handgun"], - ["UnknownWeapon"], - ["AccessoryMuzzle","AccessoryPointer","AccessorySights","AccessoryBipod"], - ["Uniform"], - ["Vest"], - ["Backpack"], - ["Headgear","Glasses"], - ["Binocular","Compass","FirstAidKit","GPS","LaserDesignator","Map","Medikit","MineDetector","NVGoggles","Radio","Toolkit","Watch","UAVTerminal"] - ]; - - private _CfgWeapons = configfile >> "CfgWeapons"; - private _list = [[],[],[],[],[],[],[],[],[],[],[],[]]; - - //--- Weapons, magazines and items - private _magazines = []; //--- Store magazines in an array and mark duplicates, so nthey don't appear in the list of all items - - private _glassesArray = "true" configClasses (configFile >> "CfgGlasses"); - private _weaponsArray = "true" configClasses _CfgWeapons; - private _vehiclesArray = "true" configClasses (configFile >> "CfgVehicles"); - - private _k = 1 / (count _weaponsArray + count _vehiclesArray + count _glassesArray); - private _progress = 0; - - private _fnc_progressLoadingScreen = - { - _progress = _progress + _k; - progressLoadingScreen _progress; - }; - - { - private _weaponCfg = _x; - private _weapon = toLower configName _weaponCfg; - - _weapon call bis_fnc_itemType params ["_weaponTypeCategory", "_weaponTypeSpecific"]; - - { - if (_weaponTypeSpecific in _x) exitWith - { - if !(_weaponTypeCategory isEqualTo "VehicleWeapon") then - { - private _weaponPublic = getNumber (_weaponCfg >> "scope") isEqualTo 2; - private _listType = _list select _forEachIndex; - - if (_weaponPublic) then - { - _listType pushback - [ - ([gettext (_weaponCfg >> "displayName")] + (((_weaponCfg >> "linkeditems") call bis_fnc_returnchildren) apply { getText (_CfgWeapons >> getText (_x >> "item") >> "displayName") })) joinString " + ", - _weapon, - getText (_weaponCfg >> "picture"), - parseNumber (getnumber (_weaponCfg >> "type") in [4096,131072]), - false - ]; - }; - - //--- Add magazines compatible with the weapon - if (_weaponPublic || _weapon in ["throw", "put"]) then - { - { - private _muzzle = if (_x == "this") then { _weaponCfg } else { _weaponCfg >> _x }; - private _magazinesList = getArray (_muzzle >> "magazines"); - - // Add magazines from magazine wells - { { _magazinesList append (getArray _x) } forEach configproperties [configFile >> "CfgMagazineWells" >> _x, "isArray _x"] } forEach getArray (_muzzle >> "magazineWell"); - - { - private _mag = toLower _x; - - if (_listType findIf { _x select 1 == _mag } < 0) then - { - private _magCfg = configFile >> "CfgMagazines" >> _mag; - - if (getNumber (_magCfg >> "scope") isEqualTo 2) then - { - _listType pushback - [ - getText (_magCfg >> "displayName"), - _mag, - getText (_magCfg >> "picture"), - 2, - _mag in _magazines - ]; - - _magazines pushback _mag; - }; - }; - } - forEach _magazinesList; - } - forEach getArray (_weaponCfg >> "muzzles"); - }; - }; - }; - } - forEach _types; - - call _fnc_progressLoadingScreen; - } - forEach _weaponsArray; - - //--- Backpacks - { - private _weaponCfg = _x; - private _weapon = toLower configName _weaponCfg; - - _weapon call bis_fnc_itemType params ["", "_weaponTypeSpecific"]; - - { - if (_weaponTypeSpecific in _x) exitWith - { - if (getnumber (_weaponCfg >> "scope") == 2) then - { - _list select _forEachIndex pushback - [ - gettext (_weaponCfg >> "displayName"), - _weapon, - gettext (_weaponCfg >> "picture"), - 3, - false - ]; - }; - }; - } - forEach _types; - - call _fnc_progressLoadingScreen; - } - forEach _vehiclesArray; - - //--- Glasses - { - private _weaponCfg = _x; - private _weapon = toLower configName _weaponCfg; - - if (getnumber (_weaponCfg >> "scope") == 2) then - { - _list select 10 pushback - [ - gettext (_weaponCfg >> "displayName"), - _weapon, - gettext (_weaponCfg >> "picture"), - 3, - false - ]; - }; - - call _fnc_progressLoadingScreen; - } - forEach _glassesArray; - - AmmoBox_list = _list; - - ["filterChanged", [_this select 0, AmmoBox_filter], objnull] call AmmoBox_script; - - endLoadingScreen; - }; - }; - }; - - case "typeChanged": - { - _ctrlType = _params select 0; - _ctrlGroup = ctrlparentcontrolsgroup _ctrlType; - _type = _params select 1; - AmmoBox_type = _type; - - _ctrlArrowLeft = _ctrlGroup controlsGroupCtrl 313102; - _ctrlArrowLeft ctrlsettext (if (_type > 0) then {SYMBOL_VIRTUAL_0} else {"-"}); - //_ctrlArrowLeft ctrlenable (_value > -1); - - _ctrlArrowRight = _ctrlGroup controlsGroupCtrl 313103; - _ctrlArrowRight ctrlsettext (if (_type > 0) then {SYMBOL_VIRTUAL_1} else {"+"}); - //_ctrlArrowRight ctrlenable (_value > -1); - - ["filterChanged",[_ctrlGroup,AmmoBox_filter],objnull] call AmmoBox_script; - }; - - case "filterChanged": - { - private _cursel = if (count _params > 1) then { _params select 1 } else { AmmoBox_filter }; - AmmoBox_filter = _cursel; - - private _ctrlGroup = ctrlparentcontrolsgroup (_params select 0); - private _ctrlList = _ctrlGroup controlsGroupCtrl 101; - //_ctrlLoad = _ctrlGroup controlsGroupCtrl 102; - //_ctrlFilterBackground = _ctrlGroup controlsGroupCtrl IDC_RSCATTRIBUTEINVENTORY_FILTERBACKGROUND; - private _list = uinamespace getvariable ["AmmoBox_list",[[],[],[],[],[],[],[],[],[],[],[],[]]]; - private _items = []; - - if (_cursel > 0) then - { - _items = _list select (_cursel - 1); //--- Process items in specific category - } - else - { - { _items append _x } foreach _list; //--- Process all items, and later pick the ones which are in the box - }; - - lnbclear _ctrlList; - - { - private _types = _x; - - { - _x params ["_displayName", "_class", "_picture", "_type", "_isDuplicate"]; - - if (_type in _types && (!_isDuplicate || _cursel > 0)) then - { - RscAttributeInventory_cargo params ["_classes", "_values"]; - - private _index = _classes find _class; - private _value = if (_index < 0) then - { - _index = count _classes; - _classes set [_index, _class]; - _values set [_index, 0]; - 0 - } else { - _values select _index - }; - - if ((_cursel == 0 && _value != 0) || (_cursel > 0)) then - { - private _valueText = if (AmmoBox_type > 0) then { [SYMBOL_VIRTUAL_0, SYMBOL_VIRTUAL_1] select (_value > 0) } else { str _value }; - private _lnbAdd = _ctrlList lnbaddrow ["",_displayName,_valueText,""]; - _ctrlList lnbsetdata [[_lnbAdd,0],_class]; - _ctrlList lnbsetvalue [[_lnbAdd,0],_value]; - _ctrlList lnbsetvalue [[_lnbAdd,1],_type]; - _ctrlList lnbsetpicture [[_lnbAdd,0],_picture]; - private _alpha = if (_value != 0) then {1} else {0.5}; - _ctrlList lnbsetcolor [[_lnbAdd,1],[1,1,1,_alpha]]; - _ctrlList lnbsetcolor [[_lnbAdd,2],[1,1,1,_alpha]]; - _ctrlList lbsettooltip [_lnbAdd,_displayName]; - - //if (_cursel == 0 && _value != 0) then - //{ - //_coef = switch _type do - //{ - //case 0: {RscAttributeInventory_loadWeapon}; - //case 1: {0}; - //case 2: {RscAttributeInventory_loadMagazine}; - //case 3: {RscAttributeInventory_loadBackpack}; - //default {0}; - //}; - //_ctrlLoad progresssetposition (progressposition _ctrlLoad + (_value max 0) * _coef); - //}; - }; - }; - } - foreach _items; - } - foreach [[0],[1,3],[2]]; // 0 - Weapons, 1 - Items, 2 - Magazines, 3 - Backpacks - - _ctrlList lnbSort [1, false]; - _ctrlList lnbsetcurselrow 0; - - ["listSelect",[_ctrlGroup],objnull] call AmmoBox_script; - }; - - case "listModify": - { - _ctrlGroup = _params select 0; - _add = _params select 1; - - _ctrlList = _ctrlGroup controlsGroupCtrl 101; - //_ctrlLoad = _ctrlGroup controlsGroupCtrl 102; - _cursel = lnbcurselrow _ctrlList; - _class = _ctrlList lnbdata [_cursel,0]; - _value = _ctrlList lbvalue (_cursel * COLUMNS); //--- ToDo: Use lnbValue once it's fixed - _type = _ctrlList lbvalue (_cursel * COLUMNS + 1); //--- ToDo: Use lnbValue once it's fixed - - _classes = RscAttributeInventory_cargo select 0; - _values = RscAttributeInventory_cargo select 1; - _index = _classes find _class; - if (_index >= 0) then { - //_coef = switch _type do { - //case 0: {RscAttributeInventory_loadWeapon}; - //case 1: {0}; - //case 2: {RscAttributeInventory_loadMagazine}; - //case 3: {RscAttributeInventory_loadBackpack}; - //default {0}; - //}; - - if (AmmoBox_type > 0) then { - _value = if (_add > 0) then {1} else {0}; - _ctrlList lnbsettext [[_cursel,2],if (_value > 0) then {SYMBOL_VIRTUAL_1} else {SYMBOL_VIRTUAL_0}]; - } else { - _value = (_value + _add) max 0; - //_load = progressposition _ctrlLoad + _add * _coef; - _load = 0; - if ((_load <= 1 && _value >= 0) || _value == 0) then { - //if (_value > 0 || (_value == 0 && _add < 0)) then {_ctrlLoad progresssetposition _load}; - _valueText = if (AmmoBox_type > 0) then {if (_value > 0) then {SYMBOL_VIRTUAL_1} else {SYMBOL_VIRTUAL_0}} else {str _value}; - _ctrlList lnbsettext [[_cursel,2],str _value]; - }; - }; - _values set [_index,_value]; - _ctrlList lnbsetvalue [[_cursel,0],_value]; - _alpha = if (_value != 0) then {1} else {0.5}; - _ctrlList lnbsetcolor [[_cursel,1],[1,1,1,_alpha]]; - _ctrlList lnbsetcolor [[_cursel,2],[1,1,1,_alpha]]; - ["listSelect",[_ctrlGroup],objnull] call AmmoBox_script; - }; - }; - - case "listSelect": - { - private ["_ctrlGroup","_ctrlList","_cursel","_value","_ctrlArrowLeft","_buttonText"]; - _ctrlGroup = _params select 0; - _ctrlList = _ctrlGroup controlsGroupCtrl 101; - _cursel = lnbcurselrow _ctrlList; - _value = _ctrlList lbvalue (_cursel * COLUMNS); //--- ToDo: Use lnbValue once it's fixed - }; - - case "clear": - { - _classes = RscAttributeInventory_cargo select 0; - _values = RscAttributeInventory_cargo select 1; - - if (AmmoBox_filter > 0) then { - //--- Clear items in selected category - _list = uinamespace getvariable ["AmmoBox_list",[[],[],[],[],[],[],[],[],[],[],[],[]]]; - _items = _list select (AmmoBox_filter - 1); - { - _class = _x select 1; - _classID = _classes find _class; - if (_classID >= 0) then { - _values set [_classID,0]; - }; - } foreach _items; - } else { - //--- Clear all - { - _values set [_foreachindex,0]; - } foreach _values; - }; - ["filterChanged",_params,objnull] call AmmoBox_script; - }; - - case "keydown": - { - _ctrlGroup = _params select 0; - if !(isnil "_ctrlGroup") then { - _key = _params select 1; - _ctrl = _params select 3; - switch _key do { - case DIK_LEFT; - case DIK_NUMPADMINUS: { - ["listModify",[ctrlparentcontrolsgroup (_params select 0),if (_ctrl) then {-5} else {-1}],objnull] call AmmoBox_script; - true - }; - case DIK_RIGHT; - case DIK_NUMPADPLUS: { - ["listModify",[ctrlparentcontrolsgroup (_params select 0),if (_ctrl) then {+5} else {+1}],objnull] call AmmoBox_script; - true - }; - default {false}; - }; - } else { - false - }; - }; - - case "attributeLoad": - { - }; - - case "attributeSave": - { - - //--- Sort items into categories and save. Will be loaded by BIS_fnc_initAmmoBox - _cargo = uinamespace getvariable ["RscAttributeInventory_cargo",[[],[]]]; - _cargoClasses = _cargo select 0; - _cargoValues = _cargo select 1; - _outputClasses = [[],[],[],[]]; // weapons, magazines, items, backpacks - _outputValues = [[],[],[],[]]; - _output = [[[],[]],[[],[]],[[],[]],[[],[]]]; - _isVirtual = (uinamespace getvariable ["AmmoBox_type",0]) > 0; - { - if (_x != 0) then { - _class = _cargoClasses select _foreachindex; - _index = switch true do { - case (getnumber (configfile >> "cfgweapons" >> _class >> "type") in [4096,131072]): { - _class = configname (configfile >> "cfgweapons" >> _class); - [2,6] select (_x < 0); - }; - case (isclass (configfile >> "cfgweapons" >> _class)): { - _class = configname (configfile >> "cfgweapons" >> _class); - [0,4] select (_x < 0); - }; - case (isclass (configfile >> "cfgmagazines" >> _class)): { - _class = configname (configfile >> "cfgmagazines" >> _class); - [1,5] select (_x < 0); - }; - case (isclass (configfile >> "cfgvehicles" >> _class)): { - _class = configname (configfile >> "cfgvehicles" >> _class); - [3,7] select (_x < 0); - }; - case (isclass (configfile >> "cfgglasses" >> _class)): { - _class = configname (configfile >> "cfgglasses" >> _class); - [2,6] select (_x < 0); - }; - default {-1}; - }; - if (_index >= 0) then { - (_outputClasses select _index) pushback _class; - (_outputValues select _index) pushback _x; - - _arrayType = _output select _index; - (_arrayType select 0) pushback _class; - if !(_isVirtual) then {(_arrayType select 1) pushback _x;}; - }; - }; - } foreach _cargoValues; - str [_output,_isVirtual] //--- Save as a string. Serialized array takes too much space. - }; -}; diff --git a/include/a3/3DEN/UI/Displays/Display3DENEditAttributes.sqf b/include/a3/3DEN/UI/Displays/Display3DENEditAttributes.sqf deleted file mode 100644 index 6d65d349..00000000 --- a/include/a3/3DEN/UI/Displays/Display3DENEditAttributes.sqf +++ /dev/null @@ -1,20 +0,0 @@ -#include "\a3\3DEN\UI\resincl.inc" - -_mode = _this select 0; -_params = _this select 1; -_class = _this select 2; - -switch _mode do { - - case "onLoad": { - _display = _params select 0; - _display call bis_fnc_3dentutorial; - [] call bis_fnc_3DENIntel; - }; - - case "onUnload": { - - //--- Engine restarts the scene after closing the intel window, restore the vision mode - -2 spawn bis_fnc_3DENVisionMode - }; -}; \ No newline at end of file diff --git a/include/a3/3DEN/UI/Displays/display3DEN.sqf b/include/a3/3DEN/UI/Displays/display3DEN.sqf deleted file mode 100644 index 68dcabab..00000000 --- a/include/a3/3DEN/UI/Displays/display3DEN.sqf +++ /dev/null @@ -1,32 +0,0 @@ -#include "\a3\3DEN\UI\dikCodes.inc" -#include "\a3\3DEN\UI\resincl.inc" - -#define COMMIT_TIME 0.1 - -_mode = [_this,0,"",[""]] call bis_fnc_param; -_params = [_this,1,[],[[]]] call bis_fnc_param; - -switch _mode do { - case "onLoad": { - _display = _params select 0; - - //--- Scene Init (ToDo: Move to engine?) - [_display] spawn { - disableserialization; - _display = _this select 0; - - //--- Register init event handlers - _inits = []; - { - _init = gettext (_x >> "init"); - if (_init != "") then {_inits pushback [[_display],compile _init];}; - } foreach configproperties [configfile >> "Cfg3DEN" >> "EventHandlers","isclass _x"]; - - //--- Call init event handlers - { - private ["_display","_inits"]; - (_x select 0) call (_x select 1); - } foreach _inits; - }; - }; -}; \ No newline at end of file diff --git a/include/a3/3DEN/UI/Displays/display3DENCopy.sqf b/include/a3/3DEN/UI/Displays/display3DENCopy.sqf deleted file mode 100644 index cd52ef3a..00000000 --- a/include/a3/3DEN/UI/Displays/display3DENCopy.sqf +++ /dev/null @@ -1,29 +0,0 @@ -#include "\a3\3DEN\UI\resincl.inc" - -_mode = _this select 0; -_params = _this select 1; -_class = _this select 2; - -switch _mode do { - - case "onLoad": { - _display = _params select 0; - - _ctrlTitle = _display displayctrl IDC_DISPLAY3DENCOPY_TITLE; - _ctrlEdit = _display displayctrl IDC_DISPLAY3DENCOPY_EDIT; - _ctrlEditFake = _display displayctrl IDC_DISPLAY3DENCOPY_EDITFAKE; - - _data = uinamespace getvariable ["Display3DENCopy_data",[]]; - _dataTitle = _data param [0,"",[""]]; - _dataEdit = _data param [1,"",[""]]; - - _ctrlTitle ctrlsettext _dataTitle; - _ctrlEdit ctrlsettext _dataEdit; - _ctrlEditFake ctrlsettext _dataEdit; - - _ctrlEditPos = ctrlposition _ctrlEdit; - _ctrlEditPos set [3,(ctrltextheight _ctrlEditFake) max (_ctrlEditPos select 3)]; - _ctrlEdit ctrlsetposition _ctrlEditPos; - _ctrlEdit ctrlcommit 0; - }; -}; \ No newline at end of file diff --git a/include/a3/3DEN/UI/Displays/display3DENEditComposition.sqf b/include/a3/3DEN/UI/Displays/display3DENEditComposition.sqf deleted file mode 100644 index 932ec4a7..00000000 --- a/include/a3/3DEN/UI/Displays/display3DENEditComposition.sqf +++ /dev/null @@ -1,11 +0,0 @@ -_mode = _this select 0; -_params = _this select 1; -_class = _this select 2; - -switch _mode do { - - case "onLoad": { - _display = _params select 0; - _display call bis_fnc_3dentutorial; - }; -}; \ No newline at end of file diff --git a/include/a3/3DEN/UI/Displays/display3DENMissionStats.sqf b/include/a3/3DEN/UI/Displays/display3DENMissionStats.sqf deleted file mode 100644 index 57898130..00000000 --- a/include/a3/3DEN/UI/Displays/display3DENMissionStats.sqf +++ /dev/null @@ -1,100 +0,0 @@ -#include "\a3\3DEN\UI\resincl.inc" - -params ["_mode","_params"]; - -if (_mode == "onLoad") exitwith { - _params params ["_display"]; - _ctrlStats = _display displayctrl IDC_DISPLAY3DENMISSIONSTATS_STATS; - - all3denentities params ["_objects","_groups","_triggers","_logics","_waypoints","_markers","_layers","_comments"]; - - { - _x params ["_text","_expression","_indent"]; - _value = count call compile _expression; - for "_i" from 1 to _indent do {_text = " " + _text;}; - _id = _ctrlStats lbadd _text; - _ctrlStats lbsetdata [_id,_expression]; - _ctrlStats lbsettextright [_id,str _value]; - if (_value == 0) then { - _ctrlStats lbsetcolor [_id,[1,1,1,0.25]]; - _ctrlStats lbsetcolorright [_id,[1,1,1,0.25]]; - }; - } foreach [ - [ - localize "str_3den_object_textPlural", - "_objects", - 0 - ], - [ - localize "str_team_switch_ai", - "_objects select {!isnull group _x}", - 1 - ], - [ - localize "STR_3DEN_Object_Attribute_ControlMP_displayName", - "_objects select {(_x get3denattribute 'ControlSP') # 0 || (_x get3denattribute 'ControlMP') # 0}", - 1 - ], - [ - localize "str_dn_vehicle", - "_objects select {isnull group _x && _x iskindof 'AllVehicles'}", - 1 - ], - [ - localize "str_3den_object_attribute_simpleobject_displayName", - "_objects select {(_x get3denattribute 'objectIsSimple') # 0}", - 1 - ], - [ - localize "STR_A3_RscDisplayCurator_modeGroups_tooltip",//localize "str_3den_group_textPlural", - "_groups", - 0 - ], - [ - localize "str_3den_trigger_textPlural", - "_triggers", - 0 - ], - [ - localize "str_3den_logic_textPlural", - "_logics", - 0 - ], - [ - localize "STR_3DEN_Logic_Mode_Module", - "_logics select {_x iskindof 'Module'}", - 1 - ], - [ - localize "str_3den_waypoint_textPlural", - "_waypoints", - 0 - ], - [ - localize "str_3den_marker_textPlural", - "_markers", - 0 - ], - [ - localize "str_3den_layer_textPlural", - "_layers", - 0 - ], - [ - localize "str_3den_comment_textPlural", - "_comments", - 0 - ] - ]; - _ctrlStats lbsetcursel 0; -}; - -if (_mode == "select") exitwith { - _params params ["_ctrlButton"]; - _display = ctrlparent _ctrlButton; - _ctrlStats = _display displayctrl IDC_DISPLAY3DENMISSIONSTATS_STATS; - - all3denentities params ["_objects","_groups","_triggers","_logics","_waypoints","_markers","_layers","_comments"]; - set3denselected call compile (_ctrlStats lbdata lbcursel _ctrlStats); - _display closedisplay 2; -}; \ No newline at end of file diff --git a/include/a3/3DEN/UI/Displays/display3DENNew.sqf b/include/a3/3DEN/UI/Displays/display3DENNew.sqf deleted file mode 100644 index 67710a57..00000000 --- a/include/a3/3DEN/UI/Displays/display3DENNew.sqf +++ /dev/null @@ -1,71 +0,0 @@ -#include "\a3\3DEN\UI\resincl.inc" - -_mode = _this select 0; -_params = _this select 1; -_class = _this select 2; - -switch _mode do { - - case "onLoad": { - - _display = _params select 0; - - _ctrlIslandBox = _display displayctrl IDC_DISPLAY3DENNEW_LIST; - _ctrlIslandBox ctrladdeventhandler ["lbselchanged","with uinamespace do {['lbselchanged',_this,''] call display3DENNew_script};"]; - ['lbselchanged',[_ctrlIslandBox,lbcursel _ctrlIslandBox],''] call display3DENNew_script; - - }; - case "lbselchanged": { - _ctrlIslandBox = _params select 0; - _cursel = _params select 1; - - //--- Init GUI - _display = ctrlparent _ctrlIslandBox; - _ctrlName = _display displayctrl IDC_DISPLAY3DENNEW_NAME; - _ctrlAuthor = _display displayctrl IDC_DISPLAY3DENNEW_AUTHOR; - _ctrlIslandPanorama = _display displayctrl IDC_DISPLAY3DENNEW_ISLANDPANORAMA; - _ctrlWorld = _display displayctrl IDC_DISPLAY3DENNEW_WORLD; - _ctrlWorldLng = _display displayctrl IDC_DISPLAY3DENNEW_WORLDLNG; - _ctrlWorldLat = _display displayctrl IDC_DISPLAY3DENNEW_WORLDLAT; - - //--- Set name - _world = _ctrlIslandBox lbdata _cursel; - _worldConfig = configfile >> "cfgworlds" >> _world; - _ctrlName ctrlsettext toupper (_ctrlIslandBox lbtext _cursel); - - //--- Set author - _author = gettext (_worldConfig >> "author"); - if (_author == "") then {_author = localize "STR_AUTHOR_UNKNOWN"}; - _author = if (_author == "") then {""} else {format [localize "STR_FORMAT_AUTHOR_SCRIPTED",_author]}; - _ctrlAuthor ctrlsettext _author; - - //--- Set picture - _picture = gettext (_worldConfig >> "pictureMap"); - if (_picture == "") then {_picture = gettext (configfile >> "display3DENNew" >> "defaultPicture")}; - _ctrlIslandPanorama ctrlsettext _picture; - - //--- Set lng/lat - if (_world != "vr") then { - _lng = getnumber (_worldConfig >> "longitude"); - _lat = getnumber (_worldConfig >> "latitude"); - _ctrlWorldPos = ctrlposition _ctrlWorld; - _posX = linearconversion [-180,180,_lng,_ctrlWorldPos select 0,(_ctrlWorldPos select 0) + (_ctrlWorldPos select 2)]; - _posY = linearconversion [-90,90,_lat,_ctrlWorldPos select 1,(_ctrlWorldPos select 1) + (_ctrlWorldPos select 3)]; - _ctrlWorldLngPos = ctrlposition _ctrlWorldLng; - _ctrlWorldLatPos = ctrlposition _ctrlWorldLat; - _ctrlWorldLngPos set [0,_posX]; - _ctrlWorldLatPos set [1,_posY]; - _ctrlWorldLng ctrlsetposition _ctrlWorldLngPos; - _ctrlWorldLat ctrlsetposition _ctrlWorldLatPos; - _ctrlWorldLng ctrlsetfade 0; - _ctrlWorldLat ctrlsetfade 0; - } else { - _ctrlWorldLng ctrlsetfade 1; - _ctrlWorldLat ctrlsetfade 1; - }; - _commitTime = if (ctrltext _ctrlWorldLng == ".") then {0.1} else {_ctrlWorldLng ctrlsettext "."; 0}; - _ctrlWorldLng ctrlcommit _commitTime; - _ctrlWorldLat ctrlcommit _commitTime; - }; - default {}; -}; \ No newline at end of file diff --git a/include/a3/3DEN/UI/Displays/display3DENPlace.sqf b/include/a3/3DEN/UI/Displays/display3DENPlace.sqf deleted file mode 100644 index 6a9e7778..00000000 --- a/include/a3/3DEN/UI/Displays/display3DENPlace.sqf +++ /dev/null @@ -1,39 +0,0 @@ -#include "\a3\3DEN\UI\resincl.inc" -#include "\a3\3DEN\UI\dikCodes.inc" - -_mode = _this select 0; -_params = _this select 1; -_class = _this select 2; - -switch _mode do { - - case "onLoad": { - ["placemode"] spawn bis_fnc_3DENInterface; - ["placesubmode"] spawn bis_fnc_3DENInterface; - ["placeempty"] spawn bis_fnc_3DENInterface; - - _display = _params select 0; - _display displayaddeventhandler ["keydown",{with uinamespace do {["keyDown",_this,""] call display3DENPlace_script;};}]; - }; - case "keyDown": - { - _display = _params select 0; - _key = _params select 1; - _ctrlModes = _display displayctrl IDC_DISPLAY3DEN_MODES; - _ctrlModeLabels = _display displayctrl IDC_DISPLAY3DEN_MODELABELS; - _cursel = switch _key do { - case DIK_F1: {0}; - case DIK_F2: {1}; - case DIK_F3: {2}; - //case DIK_F4: {}; - case DIK_F5: {3}; - case DIK_F6: {4}; - default {-1}; - }; - if (_cursel >= 0) then { - _ctrlModes lbsetcursel _cursel; - _ctrlModeLabels lbsetcursel _cursel; - }; - - }; -}; \ No newline at end of file diff --git a/include/a3/3DEN/UI/Displays/display3DENRequiredAddons.sqf b/include/a3/3DEN/UI/Displays/display3DENRequiredAddons.sqf deleted file mode 100644 index 66089f7f..00000000 --- a/include/a3/3DEN/UI/Displays/display3DENRequiredAddons.sqf +++ /dev/null @@ -1,18 +0,0 @@ -#include "\a3\3DEN\UI\resincl.inc" - -_mode = _this select 0; -_params = _this select 1; -_class = _this select 2; - -switch _mode do { - - case "onLoad": { - - _display = _params select 0; - _ctrlFilter = _display displayctrl IDC_DISPLAY3DENREQUIREDADDONS_FILTER; - _ctrlList = _display displayctrl IDC_DISPLAY3DENREQUIREDADDONS_LIST; - - [_ctrlFilter,_ctrlList,[0,0,1]] spawn bis_fnc_initListNBoxSorting; - ctrlsetfocus _ctrlList; - }; -}; \ No newline at end of file diff --git a/include/a3/3DEN/UI/Displays/display3DENSave.sqf b/include/a3/3DEN/UI/Displays/display3DENSave.sqf deleted file mode 100644 index ce10f9a6..00000000 --- a/include/a3/3DEN/UI/Displays/display3DENSave.sqf +++ /dev/null @@ -1,41 +0,0 @@ -#include "\a3\3DEN\UI\resincl.inc" - -_mode = _this select 0; -_params = _this select 1; -_class = _this select 2; - -switch _mode do { - - case "onLoad": { - //--- Restore the last sort order - _display = _params select 0; - uinamespace setvariable ["display3DENSave_display",_display]; - _selected = uinamespace getvariable ["display3DENSave_selected",[0,0]]; - _ctrlFilter = _display displayctrl IDC_DISPLAY3DENSAVE_FILTER; - _ctrlFilter lnbsetvalue [[0,_selected select 0],_selected select 1]; - - if (ctrltext (_display displayctrl 1) != localize "STR_3den_display3den_menubar_missionsave_text") then { // ToDo: Better Save variant detection, split into separate display perhaps? - { - (_display displayctrl _x) ctrlshow false; - } foreach [IDC_DISPLAY3DENSAVE_BINARIZETEXT,IDC_DISPLAY3DENSAVE_BINARIZE]; - }; - }; - case "onUnload": { - _display = _params select 0; - - // Save value of 'Binarize' attribute - if ((_params select 1) == IDC_OK) then { - "Scenario" set3DENMissionAttribute ["SaveBinarized",cbChecked (_display displayctrl IDC_DISPLAY3DENSAVE_BINARIZE)]; - }; - - //--- Save mission list sorting - _ctrlFilter = _display displayctrl IDC_DISPLAY3DENSAVE_FILTER; - _selected = [0,0]; - for '_i' from 0 to (lnbsize _ctrlFilter select 1) - 1 do { - _value = _ctrlFilter lnbvalue [0,_i]; - if (_value > -1) exitwith {_selected = [_i,_value];}; - }; - uinamespace setvariable ["display3DENSave_selected",_selected]; - uinamespace setvariable ["display3DENSave_display",nil]; - }; -}; \ No newline at end of file diff --git a/include/a3/3DEN/UI/Displays/display3DENTutorial.sqf b/include/a3/3DEN/UI/Displays/display3DENTutorial.sqf deleted file mode 100644 index 2c3f2c51..00000000 --- a/include/a3/3DEN/UI/Displays/display3DENTutorial.sqf +++ /dev/null @@ -1,121 +0,0 @@ -#include "\a3\3DEN\UI\resincl.inc" - -_mode = _this select 0; -_params = _this select 1; -_class = _this select 2; - -switch _mode do { - - case "onLoad": { - _fnc_treeselchanged = { - private ["_classCategory","_classSection"]; - _ctrlTree = _this select 0; - _path = _this select 1; - _cfg = if (count _path > 1) then { - _classCategory = _ctrlTree tvdata [_path select 0]; - _classSection = _ctrlTree tvdata _path; - configfile >> "Cfg3DEN" >> "Tutorials" >> _classCategory >> "Sections" >> _classSection; - } else { - _classCategory = _ctrlTree tvdata _path; - configfile >> "Cfg3DEN" >> "Tutorials" >> _classCategory; - }; - _display = ctrlparent _ctrlTree; - _ctrlButtonOK = _display displayctrl IDC_OK; - _ctrlButtonOK ctrlshow (isclass (_cfg >> "Steps")); - - //--- Mark as completed after clicking - if (count _path == 2) then { - _pathData = [_classCategory,_classSection]; - _completed = profilenamespace getvariable ["display3DENTutorial_completed",[]]; - if !(_pathData in _completed) then { - _completed pushback _pathData; - profilenamespace setvariable ["display3DENTutorial_completed",_completed]; - saveprofilenamespace; - }; - _ctrlTree = _display displayctrl IDC_DISPLAY3DENTUTORIAL_LIST; - _ctrlTree tvsetpicture [_path,gettext (configfile >> "display3DENTutorial" >> "pictureCompleted")]; - - //--- Reset notification icon - _count = 0; - { - _count = _count + count configproperties [_x >> "Sections","isclass _x"]; - } foreach configproperties [configfile >> "Cfg3DEN" >> "Tutorials","isclass _x"]; - if (count _completed >= _count) then { - _display3DEN = finddisplay IDD_DISPLAY3DEN; - _ctrlTutorials = _display3DEN displayctrl IDC_DISPLAY3DEN_TOOLBAR_HELP_TUTORIAL; - _ctrlTutorials ctrlsettext "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\help_tutorial_ca.paa"; - setstatvalue ["3DENModelStudent",1]; - }; - }; - }; - _fnc_buttonclick = { - _display = ctrlparent (_this select 0); - _ctrlTree = _display displayctrl IDC_DISPLAY3DENTUTORIAL_LIST; - _path = tvcursel _ctrlTree; - if (count _path > 1) then { - _classCategory = _ctrlTree tvdata [_path select 0]; - _classSection = _ctrlTree tvdata _path; - _display closedisplay IDC_OK; - [[_classCategory,_classSection]] call bis_fnc_3dentutorial; - }; - }; - - _display = _params select 0; - _ctrlTree = _display displayctrl IDC_DISPLAY3DENTUTORIAL_LIST; - _ctrlTree ctrladdeventhandler ["treeselchanged",_fnc_treeselchanged]; - _ctrlTree ctrladdeventhandler ["treedblclick",_fnc_buttonclick]; - _select = uinamespace getvariable ["display3DENTutorial_select",["",""]]; - _selectCategory = _select param [0,"",[""]]; - _selectClass = _select param [1,"",[""]]; - _selectPath = [0]; - _picture = gettext (configfile >> "display3DENTutorial" >> "picture"); - _pictureCompleted = gettext (configfile >> "display3DENTutorial" >> "pictureCompleted"); - _completed = profilenamespace getvariable ["display3DENTutorial_completed",[]]; - _count = 0; - { - _category = configname _x; - _indexCategory = _ctrlTree tvadd [[],toupper gettext (_x >> "displayName")]; - _ctrlTree tvsetpicture [[_indexCategory],gettext (_x >> "icon")]; - _ctrlTree tvsetdata [[_indexCategory],_category]; - _isSelected = _category == _selectCategory; - if (_isSelected) then {_selectPath set [0,_indexCategory];}; - { - _section = configname _x; - _indexSection = _ctrlTree tvadd [[_indexCategory],gettext (_x >> "displayName")]; - _ctrlTree tvsetpicture [[_indexCategory,_indexSection],if ([_category,_section] in _completed) then {_pictureCompleted} else {_picture}]; - _ctrlTree tvsetdata [[_indexCategory,_indexSection],_section]; - if (_isSelected && {_section == _selectClass}) then {_selectPath set [1,_indexSection];}; - _count = _count + 1; - } foreach configproperties [_x >> "Sections","isclass _x"]; - _ctrlTree tvexpand [_indexCategory]; - } foreach configproperties [configfile >> "Cfg3DEN" >> "Tutorials","isclass _x"]; - //_ctrlTree tvexpand [_selectPath select 0]; - _ctrlTree tvsetcursel _selectPath; - [_ctrlTree,_selectPath] call _fnc_treeselchanged; - - _ctrlButtonOK = _display displayctrl IDC_OK; - _ctrlButtonOK ctrladdeventhandler ["buttonclick",_fnc_buttonclick]; - - //--- Reset notification icon - if (count _completed >= _count) then { - _display3DEN = finddisplay IDD_DISPLAY3DEN; - _ctrlTutorials = _display3DEN displayctrl IDC_DISPLAY3DEN_TOOLBAR_HELP_TUTORIAL; - _ctrlTutorials ctrlsettext "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\help_tutorial_ca.paa"; - setstatvalue ["3DENModelStudent",1]; - }; - - //--- Terminate existing tutorial - [] spawn bis_fnc_3dentutorial; - }; - case "onUnload": { - _display = _params select 0; - _ctrlTree = _display displayctrl IDC_DISPLAY3DENTUTORIAL_LIST; - _path = tvcursel _ctrlTree; - _pathClass = if (count _path > 1) then { - [_ctrlTree tvdata [_path select 0],_ctrlTree tvdata _path] - } else { - [_ctrlTree tvdata _path] - }; - uinamespace setvariable ["display3DENTutorial_select",_pathClass]; - }; -}; \ No newline at end of file diff --git a/include/a3/3DEN/UI/Displays/display3DENUpdates.sqf b/include/a3/3DEN/UI/Displays/display3DENUpdates.sqf deleted file mode 100644 index 2df01dd9..00000000 --- a/include/a3/3DEN/UI/Displays/display3DENUpdates.sqf +++ /dev/null @@ -1,119 +0,0 @@ -#include "\a3\3DEN\UI\resincl.inc" - -_mode = _this select 0; -_params = _this select 1; -_class = _this select 2; - -switch _mode do { - - case "onLoad": { - _display = _params select 0; - - _lBSelChanged = { - _display = ctrlparent (_this select 0); - _data = (_this select 0) lbdata (_this select 1); - _cfg = configfile >> 'Cfg3DEN' >> 'Updates' >> _data; - _path = gettext (configfile >> 'Cfg3DEN' >> 'Updates' >> "path"); - _text = loadfile (_path + _data + ".hpp"); - - //--- Parse text - _textParsed = []; - _textFT = []; - _symbolAsterisk = toarray "*" select 0; - _symbolTilde = toarray "~" select 0; - _symbolCircumflex = toarray "^" select 0; - _symbolLine = toarray "|" select 0; - _arrayBR = toarray "
"; - _arrayBullet = toarray ""; - _arrayBoldOpen = toarray ""; - _arrayBoldClose = toarray ""; - _arrayThinOpen = toarray ""; - _arrayThinClose = toarray ""; - _arrayTitleOpen = toarray ""; - _arrayTitleClose = toarray ""; - - _isLineBreak = false; - _isBold = false; - _isThin = false; - _isTitle = false; - _isFT = false; - { - _symbol = switch _x do { - case 13: {_textParsed = _textParsed + _arrayBR;}; - case 10: {_isLineBreak = true;}; - case _symbolAsterisk: { - if (_isLineBreak) then { - _textParsed = _textParsed + _arrayBullet; - } else { - _tag = if !(_isBold) then {_arrayBoldOpen} else {_arrayBoldClose}; - _textParsed = _textParsed + _tag; - _isBold = !_isBold; - }; - }; - case _symbolCircumflex: { - _tag = if !(_isTitle) then {_arrayTitleOpen} else {_arrayTitleClose}; - _textParsed = _textParsed + _tag; - _isTitle = !_isTitle; - }; - case _symbolTilde: { - _tag = if !(_isThin) then {_arrayThinOpen} else {_arrayThinClose}; - _textParsed = _textParsed + _tag; - _isThin = !_isThin; - }; - case _symbolLine: { - _tag = if (_isFT) then {toarray format ["(#%1)",tostring _textFT];} else {[]}; - _textParsed = _textParsed + _tag; - _textFT = []; - _isFT = !_isFT; - }; - default { - _isLineBreak = false; - if (_isFT) then {_textFT pushback _x;} else {_textParsed pushback _x;}; - }; - }; - } foreach toarray _text; - - _ctrlGroup = _display displayctrl IDC_DISPLAY3DENUPDATES_GROUP; - - _ctrlContent = _display displayctrl IDC_DISPLAY3DENUPDATES_CONTENT; - _ctrlContent ctrlsetstructuredtext parsetext tostring _textParsed; - _ctrlContentPos = ctrlposition _ctrlContent; - _ctrlContentPos set [3,(ctrltextheight _ctrlContent) max (ctrlposition _ctrlGroup select 3)]; - _ctrlContent ctrlsetposition _ctrlContentPos; - _ctrlContent ctrlcommit 0; - }; - - //--- Fill the list - _ctrlList = _display displayctrl IDC_DISPLAY3DENUPDATES_LIST; - _cfgUpdates = configproperties [configfile >> "Cfg3DEN" >> "Updates","isclass _x"]; - _months = ["str_january","str_february","str_march","str_april","str_may","str_june","str_july","str_august","str_september","str_october","str_november","str_december"]; - { - _date = getarray (_x >> 'date'); - _year = _date select 0; - _month = _date select 1; - _day = _date select 2; - _index = _ctrlList lbadd format [ - "UPDATE" + " #%4 - %2 %3, %1", - _year, - localize (_months select (_month - 1)),//if (_month < 10) then {"0" + str _month} else {_month}, - _day,//if (_day < 10) then {"0" + str _day} else {_day}, - if (_foreachindex < 10) then {"0" + str (_foreachindex + 1)} else {_foreachindex + 1} - ]; - _ctrlList lbsetdata [_index,configname _x]; - } foreach _cfgUpdates; - lbsort [_ctrlList,"ASC"]; - _index = lbsize _ctrlList - 1; - _ctrlList lbsetcursel _index; - [_ctrlList,_index] call _lBSelChanged; - - //--- Change the content based on selected item - _ctrlList ctrladdeventhandler ["LBSelChanged",_lBSelChanged]; - - //--- Reset notifictaion icon - _display3DEN = finddisplay IDD_DISPLAY3DEN; - _ctrlUpdates = _display3DEN displayctrl IDC_DISPLAY3DEN_TOOLBAR_HELP_UPDATES; - _ctrlUpdates ctrlsettext "\a3\3DEN\Data\Displays\Display3DEN\ToolBar\help_updates_ca.paa"; - profilenamespace setvariable ['3DEN_Updates',count _cfgUpdates]; - saveprofilenamespace; - }; -}; \ No newline at end of file diff --git a/include/a3/3DEN/UI/DisplaysTemp/RscDisplayInterrupt.sqf b/include/a3/3DEN/UI/DisplaysTemp/RscDisplayInterrupt.sqf deleted file mode 100644 index cced5f05..00000000 --- a/include/a3/3DEN/UI/DisplaysTemp/RscDisplayInterrupt.sqf +++ /dev/null @@ -1,464 +0,0 @@ -#include "\A3\ui_f\hpp\defineCommonGrids.inc" - -_mode = _this select 0; -_params = _this select 1; -_class = _this select 2; - -#include "\a3\ui_f\scripts\gui\RscDebugConsole.sqf" -#include "\a3\ui_f\scripts\gui\RscFeedback.sqf" - -switch _mode do { - - case "onLoad": { - _display = _params select 0; - - //if( getNumber(configfile >> "isDemo") != 1 ) then //test - //{ - //--- E3 - Back to Hub button - if (getnumber (missionconfigfile >> "replaceAbortButton") > 0) then - { - //Maxwell button ON - move all buttons except Abort up --------------------------------------- - //Title background - _control = _display displayctrl 1050; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), (13.1 * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit 0; - - //Title - same position as title background - _control = _display displayctrl 523; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), (13.1 * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit 0; - - //Player's name - same position as title background - _control = _display displayctrl 109; - _control ctrlSetPosition [(6 * GUI_GRID_W + GUI_GRID_X), (13.1 * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit 0; - - //Continue button - _control = _display displayctrl 2; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), (14.2 * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit 0; - - //Save button - _control = _display displayctrl 103; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), (15.3 * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit 0; - - //Skip button - same position as Save - _control = _display displayctrl 1002; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), (15.3 * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit 0; - - //Revert - _control = _display displayctrl 119; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), (16.4 * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit 0; - - //Again - same position as Revert - _control = _display displayctrl 1003; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), (16.4 * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit 0; - - //Options button - _control = _display displayctrl 101; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), (17.5 * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit 0; - - //Field Manual button - _control = _display displayctrl 122; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), (18.6 * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit 0; - //Maxwell button ON - move all buttons except Abort up --------------------------------------- - - //Enable Maxwell button - _buttonBack = _display displayctrl 2408; - _buttonBack ctrlenable true; - _buttonBack ctrlsetfade 0; - _buttonBack ctrlcommit 0; - } - else - { - _buttonBack = _display displayctrl 2408; - _buttonBack ctrlenable false; - _buttonBack ctrlsetfade 1; - _buttonBack ctrlcommit 0; - }; - //}; - - _control = _display displayctrl 104; //Abort/Suspend button (text is changed from code according to enabled/disabled save) - if !(isnull finddisplay 313) then { - _control ctrlSetText toupper localize "STR_3DEN_RscDisplayInterrupt_ButtonAbort_3DEN_text"; - _control ctrlSetTooltip localize "STR_3DEN_RscDisplayInterrupt_ButtonAbort_3DEN_tooltip"; - } else { - if (str campaignConfigFile == "") then - { - //non campaign mission - if (savingEnabled) then - { - _control ctrlSetTooltip (localize "STR_TOOLTIP_MAIN_SUSPEND"); - } - else - { - _control ctrlSetTooltip (localize "STR_TOOLTIP_MAIN_ABORT"); - }; - } - else - { - //campaign mission - if (savingEnabled) then - { - _control ctrlSetTooltip (localize "STR_TOOLTIP_MAIN_SUSPEND_CAMPAIGN"); - } - else - { - _control ctrlSetTooltip (localize "STR_TOOLTIP_MAIN_ABORT_CAMPAIGN"); - }; - }; - }; - - //--- set player's name - (_display displayctrl 109) ctrlSetText profileName; - [_display, 109] call (uinamespace getvariable 'BIS_fnc_setIDCStreamFriendly'); - - //Title - _control = _display displayctrl 523; - _control ctrlSetText (toUpper (ctrlText _control)); - - //--- toUpper all button texts - //Continue - // _control = _display displayctrl 2; - // _control ctrlSetText (toUpper (ctrlText _control)); - //Save - // _control = _display displayctrl 103; - // _control ctrlSetText (toUpper (ctrlText _control)); - //Skip - // _control = _display displayctrl 1002; - // _control ctrlSetText (toUpper (ctrlText _control)); - //Revert - // _control = _display displayctrl 119; - // _control ctrlSetText (toUpper (ctrlText _control)); - //Again - // _control = _display displayctrl 1003; - // _control ctrlSetText (toUpper (ctrlText _control)); - //Options - // _control = _display displayctrl 101; - // _control ctrlSetText (toUpper (ctrlText _control)); - //Abort - // _control = _display displayctrl 104; - // _control ctrlSetText (toUpper (ctrlText _control)); - - - //Sets all texts toUpper - TEST - switched off - - // _classInsideControls = configfile >> "RscDisplayInterrupt" >> "controls"; - - // for "_i" from 0 to (count _classInsideControls - 1) do { //go to all subclasses - // _current = _classInsideControls select _i; - // if ( (isclass _current) && ( configName(_current) != "PlayersName") ) then { //do not toUpper Player's name - - ///search inside main controls class - // _idc = getnumber (_current >> "idc"); - // _control = _display displayctrl _idc; - // _control ctrlSetText (toUpper (ctrlText _control)); - - // }; - // }; - - // if( getNumber(configfile >> "isDemo") == 1 ) then - // { - // uiNamespace setVariable ["BIS_isCheatOptions", false]; - - // //disable options - // if(profileNamespace getvariable ["BIS_E3", false]) then - // { - // (_display displayctrl 101) ctrlEnable false; //Options - // } - // }; - - //Variable for tracking state of Options accordion (expanded/collapsed) - uiNamespace setVariable ["BIS_DisplayInterrupt_isOptionsExpanded", false]; - - //--- Options button - _button = _display displayctrl 101; - _button ctrladdeventhandler ["buttonclick","with uinamespace do {['optionsButton',_this,''] spawn RscDisplayInterrupt_script};"]; - - //TODO - implementovat promennou, ktera si bude pamatovat stav akordeonu (je potreba pri navratu z jineho dialogu do main menu) - (_display displayctrl 301) ctrlSetFade 1; //Video - (_display displayctrl 302) ctrlSetFade 1; //Audio - (_display displayctrl 303) ctrlSetFade 1; //Controls - (_display displayctrl 307) ctrlSetFade 1; //Game Options - - (_display displayctrl 301) ctrlCommit 0; - (_display displayctrl 302) ctrlCommit 0; - (_display displayctrl 303) ctrlCommit 0; - (_display displayctrl 307) ctrlCommit 0; - - //--- Hide all buttons from Options - must be here to enable proper focusing - (_display displayctrl 301) ctrlEnable false; //Video - (_display displayctrl 302) ctrlEnable false; //Audio - (_display displayctrl 303) ctrlEnable false; //Controls - (_display displayctrl 307) ctrlEnable false; //Game Options - - _versionCtrl = _display displayctrl 1005; - _trafficLightCtrl = _display displayctrl 121; - [_versionCtrl, _trafficLightCtrl] call bis_fnc_versionInfo; - - //--- Splendid camera - if (!isnil {missionnamespace getvariable "bis_fnc_camera_cam"}) then { - {(_display displayctrl _x) ctrlenable false;} foreach [103,119]; - }; - - [_params,'onload'] call compile preprocessFile '\A3\ui_f\scripts\pauseCutScene.sqf'; - [] call compile preprocessFile '\A3\ui_f\scripts\uiPostEffectBlur.sqf'; - ['Init', _params] call compile preprocessFileLineNumbers '\A3\ui_f\scripts\pauseLoadinit.sqf'; - - with missionNamespace do { [missionNamespace, "OnGameInterrupt", _params] call BIS_fnc_callScriptedEventHandler }; - }; - - - - //--- Options button - case "optionsButton": { - - _ctrl = _params select 0; - _display = ctrlparent _ctrl; - - _offset = 0; - if (getnumber (missionconfigfile >> "replaceAbortButton") > 0) then //MUF-test-removed: (getNumber(configfile >> "isDemo") != 1) && - { - _offset = 1.1; - }; - - //if options are expanded (Video Options button is shown), collapse it and vice versa - //if(ctrlFade (_display displayCtrl 301) < 0.5) then - _upperPartTime = 0.2; //0.05 for each button - _buttonsTime = 0.05; - - //hide buttons and collapse accordion - if(uiNamespace getvariable "BIS_DisplayInterrupt_isOptionsExpanded") then - { - //move down - background, title, player's name, play, editor, profile, options - - //Title background - _control = _display displayctrl 1050; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), ((14.2 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - //Title - same position as title background - _control = _display displayctrl 523; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), ((14.2 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - //Player's name - same position as title background - _control = _display displayctrl 109; - _control ctrlSetPosition [(6 * GUI_GRID_W + GUI_GRID_X), ((14.2 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - //Continue button - _control = _display displayctrl 2; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), ((15.3 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - //Save button - _control = _display displayctrl 103; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), ((16.4 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - //Skip button - same position as Save - _control = _display displayctrl 1002; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), ((16.4 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - //Revert - _control = _display displayctrl 119; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), ((17.5 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - //Again - same position as Revert - _control = _display displayctrl 1003; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), ((17.5 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - //Options button - _control = _display displayctrl 101; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), ((18.6 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - - (_display displayctrl 301) ctrlSetFade 1; //Video - (_display displayctrl 302) ctrlSetFade 1; //Audio - (_display displayctrl 303) ctrlSetFade 1; //Controls - (_display displayctrl 307) ctrlSetFade 1; //Game Options - - (_display displayctrl 301) ctrlCommit _buttonsTime; //Video - uiSleep _buttonsTime; - (_display displayctrl 302) ctrlCommit _buttonsTime; //Audio - uiSleep _buttonsTime; - (_display displayctrl 303) ctrlCommit _buttonsTime; //Controls - uiSleep _buttonsTime; - (_display displayctrl 307) ctrlCommit _buttonsTime; //Game - - (_display displayctrl 301) ctrlEnable false; //Video - (_display displayctrl 302) ctrlEnable false; //Audio - (_display displayctrl 303) ctrlEnable false; //Controls - (_display displayctrl 307) ctrlEnable false; //Game Options - - - uiNamespace setVariable ["BIS_DisplayInterrupt_isOptionsExpanded", false]; - //set focus to Options button - ctrlSetFocus (_display displayctrl 101); - } - else - { - //expand accordion and show buttons - - //Title background - _control = _display displayctrl 1050; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), ((9.8 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - //Title - same position as title background - _control = _display displayctrl 523; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), ((9.8 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - //Player's name - same position as title background - _control = _display displayctrl 109; - _control ctrlSetPosition [(6 * GUI_GRID_W + GUI_GRID_X), ((9.8 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - //Continue button - _control = _display displayctrl 2; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), ((10.9 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - //Save button - _control = _display displayctrl 103; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), ((12.0 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - //Skip button - same position as Save - _control = _display displayctrl 1002; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), ((12.0 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - //Revert - _control = _display displayctrl 119; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), ((13.1 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - //Again - same position as Revert - _control = _display displayctrl 1003; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), ((13.1 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - //Options button - _control = _display displayctrl 101; - _control ctrlSetPosition [(1 * GUI_GRID_W + GUI_GRID_X), ((14.2 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - _control ctrlCommit _upperPartTime; - - if (getnumber (missionconfigfile >> "replaceAbortButton") > 0) then - { - //Video button - _control = _display displayctrl 301; - _control ctrlSetPosition [(2 * GUI_GRID_W + GUI_GRID_X), ((15.3 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - - //Audio button - _control = _display displayctrl 302; - _control ctrlSetPosition [(2 * GUI_GRID_W + GUI_GRID_X), ((16.4 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - - //Controls button - _control = _display displayctrl 303; - _control ctrlSetPosition [(2 * GUI_GRID_W + GUI_GRID_X), ((17.5 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - - //Game button - _control = _display displayctrl 307; - _control ctrlSetPosition [(2 * GUI_GRID_W + GUI_GRID_X), ((18.6 - _offset) * GUI_GRID_H + GUI_GRID_Y)]; - }; - - //Enable and show buttons - (_display displayctrl 301) ctrlEnable true; //Video - (_display displayctrl 302) ctrlEnable true; //Audio - (_display displayctrl 303) ctrlEnable true; //Controls - (_display displayctrl 307) ctrlEnable true; //Game Options - - //--- Show all buttons from Options - (_display displayctrl 301) ctrlSetFade 0; //Video - (_display displayctrl 302) ctrlSetFade 0; //Audio - (_display displayctrl 303) ctrlSetFade 0; //Controls - (_display displayctrl 307) ctrlSetFade 0; //Game Options - - uiSleep 0.05; - - //From bottom to top - (_display displayctrl 307) ctrlCommit 0.15; //Game - uiSleep _buttonsTime; - (_display displayctrl 303) ctrlCommit 0.15; //Controls - uiSleep _buttonsTime; - (_display displayctrl 302) ctrlCommit 0.15; //Audio - uiSleep _buttonsTime; - (_display displayctrl 301) ctrlCommit 0.15; //Video - - uiNamespace setVariable ["BIS_DisplayInterrupt_isOptionsExpanded", true]; - //set focus to Options button - ctrlSetFocus (_display displayctrl 101); - }; - }; - - - case "onUnload": { - private ["_dummy"]; - _dummy = ['Unload', _params] call compile preprocessFile '\A3\ui_f\scripts\pauseOnUnload.sqf'; - _dummy = [_params,'unload'] call compile preprocessFile '\A3\ui_f\scripts\pauseCutScene.sqf'; - }; - - case "keyDown": { - _display = _params select 0; - _key = _params select 1; - - switch (_key) do { - - //--- F1 (open community debug console) - case 59: { - _display closedisplay 2; - createdialog 'RscDisplayDebugPublic'; - }; - - //--- H (Hide all elements and leave only effects overlay) - case 35: { - if (distributionregion == 0) then { - _fade = ctrlfade (_display displayctrl 2); - _fade = round (_fade + 1) % 2; - { - if (_x < 100000) then { - (_display displayctrl _x) ctrlsetfade _fade; - (_display displayctrl _x) ctrlcommit 0.2; - }; - } foreach ([configfile >> "RscDisplayInterrupt",0] call bis_fnc_displayControls); - }; - }; - }; - - //Normal Interrupt uses accordion, so cheat has no sense there. - // if( getNumber(configfile >> "isDemo") == 1 ) then - // { - // _shift = _params select 2; - // _ctrl = _params select 3; - // _alt = _params select 4; - - - // if (_ctrl && _shift && _alt) then { - - // if (_key == 0x18) then //CTRL + SHIFT + ALT + O (as Options) was pressed - // { - // //Show Options dialogue - - // //click on hidden Options button. If _DEMO is defined, in RscDisplayOptions.sqf Controls button will be clicked automatically - // uiNamespace setVariable ["BIS_isCheatOptions", true]; - // ctrlactivate (_display displayctrl 101); - // }; - // }; - // }; - }; - - default {}; -}; \ No newline at end of file diff --git a/include/a3/3DEN/UI/DisplaysTemp/RscDisplayLoading.sqf b/include/a3/3DEN/UI/DisplaysTemp/RscDisplayLoading.sqf deleted file mode 100644 index ca718664..00000000 --- a/include/a3/3DEN/UI/DisplaysTemp/RscDisplayLoading.sqf +++ /dev/null @@ -1,345 +0,0 @@ -#include "\A3\ui_f\hpp\defineResincl.inc" -#include "\A3\ui_f\hpp\defineResinclDesign.inc" - -disableserialization; - -_mode = _this select 0; -_params = _this select 1; -_class = _this select 2; - -switch _mode do { - - case "onLoad": { - _display = _params select 0; - RscDisplayLoading_display = _display; - - //--- Initial loading - maintain visual style of RscDisplayStart - if !(uinamespace getvariable ["BIS_initGame",false]) exitwith {}; - - /////////////////////////////////////////////////////////////////////////////////////////// - - //--- Hide start loading screen - _ctrlLoadingStart = _display displayctrl IDC_LOADINGSTART_LOADINGSTART; - _ctrlLoadingStart ctrlsetfade 1; - _ctrlLoadingStart ctrlcommit 0; - _pictureShot = ""; - - //--- Map - if (worldname != "") then { - _ctrlMap = _display displayctrl IDC_LOADING_MAP; - _ctrlMapName = _display displayctrl IDC_LOADING_MAPNAME; - _ctrlMapAuthor = _display displayctrl IDC_LOADING_MAPAUTHOR; - _ctrlMapDescription = _display displayctrl IDC_LOADING_MAPDESCRIPTION; - - _cfgWorld = configfile >> "cfgworlds" >> worldname; - _worldName = gettext (_cfgWorld >> "description"); - _pictureMap = gettext (_cfgWorld >> "pictureMap"); - if (_pictureMap == "") then {_pictureMap = "#(argb,8,8,3)color(1,1,1,0.2)";}; - _pictureShot = gettext (_cfgWorld >> "pictureShot"); - _loadingTexts = getarray (_cfgWorld >> "loadingTexts"); - _loadingText = if (count _loadingTexts > 0) then { - _loadingTexts select floor (((diag_ticktime / 10) % (count _loadingTexts))); - } else { - "" - }; - - //--- Randomized map Y coordinate - _worldType = uinamespace getvariable ["RscDisplayLoading_worldType",""]; - _ran = uinamespace getvariable ["RscDisplayLoading_ran",random 1]; - if (worldname != _worldType) then { - _ran = random 1; - uinamespace setvariable ["RscDisplayLoading_ran",_ran]; - uinamespace setvariable ["RscDisplayLoading_worldType",worldname]; - }; - _ctrlMapPos = ctrlposition _ctrlMap; - _ctrlMapPos set [1,linearconversion [0,1,_ran,(safezoneY + safezoneH - (_ctrlMapPos select 3)),safezoneY,true]]; - _ctrlMap ctrlsetposition _ctrlMapPos; - _ctrlMap ctrlcommit 0; - - //--- Set texts - _ctrlMap ctrlsettext _pictureMap; - _ctrlMapName ctrlsettext toupper _worldName; - _ctrlMapAuthor ctrlsettext _author; - _ctrlMapDescription ctrlsetstructuredtext parsetext _loadingText; - - [_cfgWorld,_ctrlMapAuthor] call bis_fnc_overviewauthor; - }; - - //--- Mission - _fnc_loadMission = { - - disableserialization; - _display = _this select 0; - _isMultiplayer = servertime > 0; - - _ctrlMissionType = _display displayctrl IDC_LOADING_MISSIONGAMETYPE; - _ctrlMissionName = _display displayctrl IDC_LOADING_MISSIONNAME; - _ctrlMissionAuthor = _display displayctrl IDC_LOADING_MISSIONAUTHOR; - _ctrlMissionPicture = _display displayctrl IDC_LOAD_MISSION_PICTURE; - _ctrlMissionProgress = _display displayctrl IDC_PROGRESS_TIME; - _ctrlMissionDescription = _display displayctrl IDC_LOADING_MISSIONDESCRIPTION; - _ctrlMissionDescriptionEngine = _display displayctrl IDC_LOAD_MISSION_NAME; - - //--- Picture - _loadingPicture = getmissionconfigvalue ["loadScreen",""];//gettext (missionconfigfile >> "loadScreen"); - if (_loadingPicture == "") then {_loadingPicture = getmissionconfigvalue ["overviewPicture",""]};//gettext (missionconfigfile >> "overviewPicture");}; //--- Use overview data - - //--- Mission name - _loadingName = getmissionconfigvalue ["onLoadName",""];//gettext (missionconfigfile >> "onLoadName"); - if (_loadingName == "") then { - _loadingName = if (briefingname != missionname) then {briefingname} else {""}; - }; - - //--- Description - //_loadingTextConfig = if (false) then {gettext (missionconfigfile >> "onLoadIntro")} else {gettext (missionconfigfile >> "onLoadMission")}; - _loadingTextConfig = getmissionconfigvalue ["onLoadMission",""]; - _loadingText = ctrltext _ctrlMissionDescriptionEngine; - if (_loadingText == "") then {_loadingText = _loadingTextConfig;}; //--- Use overview data - if (_loadingText in ["",localize "str_load_world"]) then {_loadingText = getmissionconfigvalue ["overviewText",""];};//gettext (missionconfigfile >> "overviewText");}; - - //--- MP type - _gameType = gettext (getMissionConfig "Header" >> "gameType");//gettext (missionconfigfile >> "Header" >> "gameType"); - _gameTypeName = gettext (configfile >> "CfgMPGameTypes" >> _gameType >> "name"); - if (_gameTypeName == "") then {_gameTypeName = gettext (configfile >> "CfgMPGameTypes" >> "Unknown" >> "name");}; - - //_showMission = if (false) then {missionconfigfile >> "onLoadIntroTime"} else {missionconfigfile >> "onLoadMissionTime"}; - //_showMission = if (isnumber _showMission) then {getnumber _showMission > 0} else {true}; - //if (_showMission && (_loadingText != "" || _loadingPicture != "")) then { - - //--- When loading a different terrain, current mission is sometimes still available. Check if it belongs to the terrain. - _last = uinamespace getvariable ["RscDisplayLoading_last",[worldname,missionname]]; - _lastWorld = _last select 0; - _lastMission = _last select 1; - _showMission = if (missionname == _lastMission) then {worldname == _lastWorld} else {true}; - uinamespace setvariable ["RscDisplayLoading_last",[worldname,missionname]]; - - //--- Get loading bars - _progressMap = _display displayctrl IDC_PROGRESS_PROGRESS; - if (isnull _progressMap) then {_display displayctrl IDC_CLIENT_PROGRESS}; - _progressMission = _display displayctrl IDC_LOADING_PROGRESSMISSION; - RscDisplayLoading_progress = _progressMap; - - //if (str missionconfigfile != "" && _showMission) then { - if (_loadingText != "" || {_loadingPicture != ""}) then { - _loadingName = _loadingName call (uinamespace getvariable "bis_fnc_localize"); - _loadingText = _loadingText call (uinamespace getvariable "bis_fnc_localize"); - - if (_loadingName == "") then {_loadingName = localize "STR_a3_rscdisplay_loading_noname";}; - if (_loadingPicture == "") then {_loadingPicture = _pictureShot;}; - - if (_gameTypeName != "" && _isMultiplayer) then { - _ctrlMissionType ctrlsettext toupper _gameTypeName; - } else { - _ctrlMissionType ctrlshow false; - }; - _ctrlMissionName ctrlsettext toupper _loadingName; - _ctrlMissionPicture ctrlsettext _loadingPicture; - _ctrlMissionDescription ctrlsetstructuredtext parsetext _loadingText; - - //--- Set height based on text - _ctrlMissionDescriptionPos = ctrlposition _ctrlMissionDescription; - _ctrlMissionDescriptionPos set [3,ctrltextheight _ctrlMissionDescription + 0.01]; - if (_loadingText == "") then {_ctrlMissionDescriptionPos set [3,0];}; - _ctrlMissionDescription ctrlsetposition _ctrlMissionDescriptionPos; - _ctrlMissionDescription ctrlcommit 0; - - _ctrlMissionPos = ctrlposition _ctrlMission; - _ctrlMissionPos set [3,(_ctrlMissionDescriptionPos select 1) + ((_ctrlMissionDescriptionPos select 3) min ((ctrlposition _ctrlMissionPicture select 3)))]; - _ctrlMission ctrlsetposition _ctrlMissionPos; - _ctrlMission ctrlcommit 0; - - [missionconfigfile,_ctrlMissionAuthor] call bis_fnc_overviewauthor; - - - //DLC notification-------------------------------------------------------------------- - - //DLC asset was found in mission.sqm, DLC is available and unowned => show DLC loading screen. - //Info is selected randomly among the non-owned DLCs + DLC Bundle - _missionDLCs = []; - { - _appId = getNumber(configfile >> "CfgMods" >> _x >> "appId"); - _missionDLCs = _missionDLCs + [_appId]; - } foreach (getMissionDlcs); //Take all not owned DLCs and check whether they were released already. If yes, count them as not owned - - _notOwnedDLCs = []; - _showDLCLoading = false; - - { - if((isDlcAvailable _x) && (_x in _missionDLCs)) then - { - _notOwnedDLCs = _notOwnedDLCs + [_x]; - _showDLCLoading = true; - }; - } foreach (getDlcs 2); //Take all not owned DLCs and check whether they were released already. If yes, count them as not owned - - if(_showDLCLoading) then - { - _selectedDLCAppId = uinamespace getvariable ['BIS_RscDisplayLoading_SelectedDLCAppId', 0]; - - if(_selectedDLCAppId == 0) then - { - //_notOwnedDLCs is non-empty => add DLC Bundle - //Bundles were meanwhile retired as products - //_notOwnedDLCs = _notOwnedDLCs + [getNumber(configfile >> "CfgMods" >> "DLCBundle" >> "appId")]; - //Randomly select one of the non-owned DLCs and read info from it - _selectedDLC = floor(random (count _notOwnedDLCs)); - _selectedDLCAppId = _notOwnedDLCs select _selectedDLC; - uinamespace setvariable ["BIS_RscDisplayLoading_SelectedDLCAppId", _selectedDLCAppId]; - }; - - { //For each class from cfgMods - if(getNumber(_x >> "appId") == _selectedDLCAppId) then - { - _dlcColor = getArray(_x >> "dlcColor"); - - if(count _dlcColor != 4) then - { - _dlcColor = [ - (profilenamespace getvariable ['GUI_BCG_RGB_R',0.77]), - (profilenamespace getvariable ['GUI_BCG_RGB_G',0.51]), - (profilenamespace getvariable ['GUI_BCG_RGB_B',0.08]), - 1]; - }; - - //name - _ctrl = _display displayctrl IDC_LOADING_DLCNAME; - _ctrl ctrlSetText getText(_x >> "name"); - _ctrl ctrlSetTextColor _dlcColor; - //author - _ctrl = _display displayctrl IDC_LOADING_DLCAUTHOR; - _ctrl ctrlSetText (format [localize "STR_FORMAT_AUTHOR_SCRIPTED", getText(_x >> "author")]); - _ctrl ctrlSetTextColor _dlcColor; - //stripe - _ctrl = _display displayctrl IDC_LOADING_DLCSTRIPE; - _ctrl ctrlSetTextColor _dlcColor; - //logo - _ctrl = _display displayctrl IDC_LOADING_DLCICON; - _ctrl ctrlSetText getText(_x >> "logo"); - //picture background - _ctrl = _display displayctrl IDC_LOADING_DLCPICTUREBACK; - _ctrl ctrlSetBackgroundColor _dlcColor; - //picture - _ctrl = _display displayctrl IDC_LOADING_DLCPICTURE; - _ctrl ctrlSetText getText(_x >> "overviewPicture"); - //description - _ctrl = _display displayctrl IDC_LOADING_DLCDESCRIPTION; - _ctrl ctrlSetStructuredText (parseText getText(_x >> "overviewText")); - }; - } foreach ((configfile >> "CfgMods") call bis_fnc_returnChildren); - }; - - //--- Set height of description based on text - _ctrlDLCDescription = _display displayctrl IDC_LOADING_DLCDESCRIPTION; - _ctrlDLCDescriptionPos = ctrlposition _ctrlDLCDescription; - _ctrlDLCDescriptionPos set [3, (ctrltextheight _ctrlDLCDescription) + 0.01]; //TODO-add proper grid - _ctrlDLCDescription ctrlsetposition _ctrlDLCDescriptionPos; - _ctrlDLCDescription ctrlcommit 0; - - //Show/hide DLC part of loading screen - { - (_display displayctrl _x) ctrlshow _showDLCLoading; - } - forEach - [ - IDC_LOADING_DLCPICTUREBACK, - IDC_LOADING_DLCPICTURE, - IDC_LOADING_DLCDESCRIPTION, - IDC_LOADING_DLCNAME, - IDC_LOADING_DLCAUTHOR, - IDC_LOADING_DLCSTRIPE, - IDC_LOADING_DLCICON - ]; - - //DLC notification-------------------------------------------------------------------- - - - //--- Mission loading bar - _progressMapPos = ctrlposition _progressMap; - _progressMissionPos = ctrlposition _progressMission; - if (missionnamespace getvariable ["RscDisplayLoading_progressMission",false]) then { - - //--- Mission loading - make the terrain bar full and animate only the mission bar - _progressMap ctrlsetposition _progressMissionPos; - _progressMap ctrlcommit 0; - _progressMission ctrlsetposition _progressMapPos; - _progressMission ctrlcommit 0; - _progressMission progresssetposition 1; - } else { - - //--- When loading a different map, a rogue loading screen without progress bar appears. Move the progress bar by script. - _limit = [1,2] select _isMultiplayer; - if (count (uinamespace getvariable "loading_displays") > _limit) then { - _progressMap ctrlshow false; - _progressMission ctrlsetposition _progressMapPos; - _progressMission ctrlcommit 0; - _progressMission progresssetposition 0.33; - } else { - _progressMission ctrlshow false; - }; - }; - } else { - _ctrlMission ctrlsetfade 1; - _ctrlMission ctrlcommit 0; - }; - }; - - _ctrlMission = _display displayctrl IDC_LOADING_MISSION; - if (!(isnull _ctrlMission)) then { - [_display,0] call _fnc_loadMission; - //[_display,1] spawn _fnc_loadMission; //--- Spawn it for detecting text passed to the scripted loading, not used in the engine loading - }; - - //--- Disclaimer - Moved here to prevent showing Lite Disclaimer when starting/shutting down the game - if (getnumber (configfile >> "CfgMods" >> "gamma") == 1) then - { - _ctrlDisclaimer = _display displayctrl IDC_LOADING_DISCLAIMER; - _ctrlDisclaimerName = _display displayctrl IDC_LOADING_DISCLAIMERNAME; - _ctrlDisclaimerDescription = _display displayctrl IDC_LOADING_DISCLAIMERDESCRIPTION; - _productVersionArray = productversion; - _versionNr = ctrltext ((finddisplay 0) displayctrl 118); - - if (_productVersionArray select 4 == "Development") then - { - _disclaimerName = format ["%1 - %2", localize "STR_A3_RSCDISPLAY_LOADING_DEV", _versionNr]; - - if(_productVersionArray select 5) then - { - //Modded dev - _disclaimerName = _disclaimerName + ""; - }; - - _ctrlDisclaimerName ctrlSetStructuredText parseText _disclaimerName; - _ctrlDisclaimerDescription ctrlsetstructuredtext parsetext localize "STR_A3_RSCDISPLAY_LOADING_DEVINFO"; - _ctrlDisclaimerDescription ctrlsettextcolor [1,1,1,1]; - [_ctrlDisclaimerDescription,0.01] call bis_fnc_ctrlFitToTextHeight; - _ctrlDisclaimer ctrlshow true; - } - else - { - if(_productVersionArray select 5) then - { - //Modded stable - _ctrlDisclaimerName ctrlSetStructuredText parseText format ["%1 - %2%3", localize "STR_A3_RSCDISPLAY_LOADING_STABLE", - _versionNr, - ""]; - - _ctrlDisclaimerDescription ctrlsetstructuredtext parsetext localize "STR_A3_RSCDISPLAY_LOADING_MODDEDINFO"; - _ctrlDisclaimerDescription ctrlsettextcolor [1,1,1,1]; - [_ctrlDisclaimerDescription,0.01] call bis_fnc_ctrlFitToTextHeight; - _ctrlDisclaimer ctrlshow true; - } - else - { - _ctrlDisclaimer ctrlshow false; - }; - }; - }; - - //--- Track mission time -/* - if (str _display == "Display #101") then { - [] call bis_fnc_trackMissionTime; - }; -*/ - }; -}; \ No newline at end of file diff --git a/include/a3/3DEN/UI/dikCodes.inc b/include/a3/3den/UI/dikCodes.inc similarity index 100% rename from include/a3/3DEN/UI/dikCodes.inc rename to include/a3/3den/UI/dikCodes.inc diff --git a/include/a3/3DEN/UI/macroExecs.inc b/include/a3/3den/UI/macroExecs.inc similarity index 100% rename from include/a3/3DEN/UI/macroExecs.inc rename to include/a3/3den/UI/macroExecs.inc diff --git a/include/a3/3DEN/UI/macroExecs.inc.old b/include/a3/3den/UI/macroExecs.inc.old similarity index 100% rename from include/a3/3DEN/UI/macroExecs.inc.old rename to include/a3/3den/UI/macroExecs.inc.old diff --git a/include/a3/3DEN/UI/macros.inc b/include/a3/3den/UI/macros.inc similarity index 100% rename from include/a3/3DEN/UI/macros.inc rename to include/a3/3den/UI/macros.inc diff --git a/include/a3/3DEN/UI/macros.inc.old b/include/a3/3den/UI/macros.inc.old similarity index 100% rename from include/a3/3DEN/UI/macros.inc.old rename to include/a3/3den/UI/macros.inc.old diff --git a/include/a3/3DEN/UI/resincl.inc b/include/a3/3den/UI/resincl.inc similarity index 100% rename from include/a3/3DEN/UI/resincl.inc rename to include/a3/3den/UI/resincl.inc From 8803449f2f15c45b8201df7452bb1025d99b38b1 Mon Sep 17 00:00:00 2001 From: Freddo Date: Fri, 16 Apr 2021 20:05:42 +0200 Subject: [PATCH 4/5] De-exec/eval'd UI macros Less than ideal method, but it works nevertheless. --- addons/acre2/Cfg3DEN.hpp | 2 +- addons/assigngear/UI/gearSelector.hpp | 20 ++++----- addons/common/Cfg3DEN.hpp | 2 +- include/a3/3den/UI/macroExecs.inc | 3 ++ include/a3/3den/UI/macros.inc | 59 +++++++++++++++++++++++++-- 5 files changed, 70 insertions(+), 16 deletions(-) diff --git a/addons/acre2/Cfg3DEN.hpp b/addons/acre2/Cfg3DEN.hpp index cb07d5d9..49c5515b 100644 --- a/addons/acre2/Cfg3DEN.hpp +++ b/addons/acre2/Cfg3DEN.hpp @@ -747,7 +747,7 @@ class Cfg3DEN colorText[] = {COLOR_TEXT_RGBA}; // Text and frame color colorSelect[] = {0,0,0,1}; // Text selection color - sizeEx = SIZEEX_PURISTA(SIZEEX_M); // Text size + sizeEx = SIZEEX_PURISTA_M; // Text size font = FONT_NORMAL; // Font from CfgFontFamilies shadow = 1; // Shadow (0 - none, 1 - directional, color affected by colorShadow, 2 - black outline) diff --git a/addons/assigngear/UI/gearSelector.hpp b/addons/assigngear/UI/gearSelector.hpp index 7f69adbf..c168cae4 100644 --- a/addons/assigngear/UI/gearSelector.hpp +++ b/addons/assigngear/UI/gearSelector.hpp @@ -11,7 +11,7 @@ class GVAR(RscGearSelector) : RscStandardDisplay { y = CENTER_Y - GRID_H * 15; w = 50 * GRID_W; h = SIZE_M * GRID_H; - sizeEx = SIZEEX_PURISTA(SIZEEX_M); + sizeEx = SIZEEX_PURISTA_M; }; class TitleIcon : RscPicture { text = QPATHTOEF(common,UI\logo_tmf_small_ca.paa); @@ -29,7 +29,7 @@ class GVAR(RscGearSelector) : RscStandardDisplay { y = CENTER_Y - GRID_H * 9; w = 60 * GRID_W; h = SIZE_S * GRID_H; - sizeEx = SIZEEX_PURISTA(SIZEEX_S); + sizeEx = SIZEEX_PURISTA_S; }; class Category : RscCombo { idc = IDC_RSCGEARSELECTOR_CATEGORY; @@ -38,7 +38,7 @@ class GVAR(RscGearSelector) : RscStandardDisplay { y = CENTER_Y - GRID_H * 5; w = 56 * GRID_W; h = SIZE_S * GRID_H; - sizeEx = SIZEEX_PURISTA(SIZEEX_S); + sizeEx = SIZEEX_PURISTA_S; onLBSelChanged = QUOTE( \ params [ARR_2('_ctrl', '_selectedIndex')]; \ @@ -53,7 +53,7 @@ class GVAR(RscGearSelector) : RscStandardDisplay { y = CENTER_Y - GRID_H * 1; w = 60 * GRID_W; h = SIZE_S * GRID_H; - sizeEx = SIZEEX_PURISTA(SIZEEX_S); + sizeEx = SIZEEX_PURISTA_S; }; class Faction : RscCombo { idc = IDC_RSCGEARSELECTOR_FACTION; @@ -62,7 +62,7 @@ class GVAR(RscGearSelector) : RscStandardDisplay { y = CENTER_Y + GRID_H * 3; w = 56 * GRID_W; h = SIZE_S * GRID_H; - sizeEx = SIZEEX_PURISTA(SIZEEX_S); + sizeEx = SIZEEX_PURISTA_S; onLBSelChanged = QUOTE( \ params [ARR_2('_ctrl', '_selectedIndex')]; \ @@ -77,7 +77,7 @@ class GVAR(RscGearSelector) : RscStandardDisplay { y = CENTER_Y + GRID_H * 7; w = 60 * GRID_W; h = SIZE_S * GRID_H; - sizeEx = SIZEEX_PURISTA(SIZEEX_S); + sizeEx = SIZEEX_PURISTA_S; }; class Role : RscCombo{ idc = IDC_RSCGEARSELECTOR_ROLE; @@ -86,7 +86,7 @@ class GVAR(RscGearSelector) : RscStandardDisplay { y = CENTER_Y + GRID_H * 11; w = 56 * GRID_W; h = SIZE_S * GRID_H; - sizeEx = SIZEEX_PURISTA(SIZEEX_S); + sizeEx = SIZEEX_PURISTA_S; }; class ButtonCancel : RscButtonMenuCancel { @@ -94,7 +94,7 @@ class GVAR(RscGearSelector) : RscStandardDisplay { y = CENTER_Y + GRID_H * 17; w = (59 / 3) * GRID_W; h = SIZE_M * GRID_H; - sizeEx = SIZEEX_PURISTA(SIZEEX_S); + sizeEx = SIZEEX_PURISTA_S; }; class ButtonRandom : RscButtonMenu { text = "Random"; @@ -109,7 +109,7 @@ class GVAR(RscGearSelector) : RscStandardDisplay { y = CENTER_Y + GRID_H * 17; w = (59 / 3) * GRID_W; h = SIZE_M * GRID_H; - sizeEx = SIZEEX_PURISTA(SIZEEX_S); + sizeEx = SIZEEX_PURISTA_S; }; class ButtonOK : RscButtonMenuOK { idc = IDC_RSCGEARSELECTOR_SUBMIT; @@ -123,7 +123,7 @@ class GVAR(RscGearSelector) : RscStandardDisplay { y = CENTER_Y + GRID_H * 17; w = (59 / 3) * GRID_W; h = SIZE_M * GRID_H; - sizeEx = SIZEEX_PURISTA(SIZEEX_S); + sizeEx = SIZEEX_PURISTA_S; }; }; class controlsBackground { diff --git a/addons/common/Cfg3DEN.hpp b/addons/common/Cfg3DEN.hpp index eb1e918b..f5499af3 100644 --- a/addons/common/Cfg3DEN.hpp +++ b/addons/common/Cfg3DEN.hpp @@ -48,7 +48,7 @@ class Cfg3DEN colorBackground[] = {0.1,0.1,0.95}; colorPreview[] = {1,1,1}; colorPreviewBackground[] = {0.1,0.1,0.95}; - sizeEx = SIZEEX_PURISTA(SIZEEX_M); // Text size + sizeEx = SIZEEX_PURISTA_M; // Text size font = FONT_NORMAL; // Font from CfgFontFamilies text = ""; lineSpacing = 1; // When ST_MULTI style is used, this defines distance between lines (1 is text height) diff --git a/include/a3/3den/UI/macroExecs.inc b/include/a3/3den/UI/macroExecs.inc index 2249791b..b7b06071 100644 --- a/include/a3/3den/UI/macroExecs.inc +++ b/include/a3/3den/UI/macroExecs.inc @@ -1,3 +1,5 @@ +// HEMTT doesn't support __EXEC __EVAL +#ifdef ALLOW_EXECEVAL __EXEC(\ _fnc_sizeEx = {\ _pixelScale = 20 * pixelScale;\ @@ -54,3 +56,4 @@ __EXEC(\ _fnc_colorHEXtoRGBA_4 = {[_this,4] call _fnc_colorHEXtoRGBA};\ _fnc_colorHEXtoRGBA_6 = {[_this,6] call _fnc_colorHEXtoRGBA};\ ) +#endif diff --git a/include/a3/3den/UI/macros.inc b/include/a3/3den/UI/macros.inc index e22efc36..cb96f5d5 100644 --- a/include/a3/3den/UI/macros.inc +++ b/include/a3/3den/UI/macros.inc @@ -37,10 +37,61 @@ #define FONT_CODE "LucidaConsoleB" #define FONT_SYSTEM "TahomaB" -#define SIZEEX_PURISTA(SIZEPX) __EVAL([SIZEPX,1.8,[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,34,35,37,46]] call _fnc_sizeEx) -#define SIZEEX_ETELKA(SIZEPX) __EVAL([SIZEPX,1.55,[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,34,35,37,46]] call _fnc_sizeEx) -#define SIZEEX_TAHOMA(SIZEPX) __EVAL([SIZEPX,1.6,[16]] call _fnc_sizeEx) -#define SIZEEX_LUCIDA(SIZEPX) __EVAL([SIZEPX,1.6,[8,11]] call _fnc_sizeEx) +// HEMTT doesn't support __EXEC __EVAL +#ifdef ALLOW_EXECEVAL + #define SIZEEX_PURISTA(SIZEPX) __EVAL([SIZEPX,1.8,[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,34,35,37,46]] call _fnc_sizeEx) + #define SIZEEX_ETELKA(SIZEPX) __EVAL([SIZEPX,1.55,[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,34,35,37,46]] call _fnc_sizeEx) + #define SIZEEX_TAHOMA(SIZEPX) __EVAL([SIZEPX,1.6,[16]] call _fnc_sizeEx) + #define SIZEEX_LUCIDA(SIZEPX) __EVAL([SIZEPX,1.6,[8,11]] call _fnc_sizeEx) + + #define SIZEEX_PURISTA_XS SIZEEX_PURISTA(SIZEEX_XS) + #define SIZEEX_PURISTA_S SIZEEX_PURISTA(SIZEEX_S) + #define SIZEEX_PURISTA_M SIZEEX_PURISTA(SIZEEX_M) + #define SIZEEX_PURISTA_L SIZEEX_PURISTA(SIZEEX_L) + #define SIZEEX_PURISTA_XL SIZEEX_PURISTA(SIZEEX_XL) + + #define SIZEEX_ETELKA_XS SIZEEX_ETELKA(SIZEEX_XS) + #define SIZEEX_ETELKA_S SIZEEX_ETELKA(SIZEEX_S) + #define SIZEEX_ETELKA_M SIZEEX_ETELKA(SIZEEX_M) + #define SIZEEX_ETELKA_L SIZEEX_ETELKA(SIZEEX_L) + #define SIZEEX_ETELKA_XL SIZEEX_ETELKA(SIZEEX_XL) + + #define SIZEEX_TAHOMA_XS SIZEEX_TAHOMA(SIZEEX_XS) + #define SIZEEX_TAHOMA_S SIZEEX_TAHOMA(SIZEEX_S) + #define SIZEEX_TAHOMA_M SIZEEX_TAHOMA(SIZEEX_M) + #define SIZEEX_TAHOMA_L SIZEEX_TAHOMA(SIZEEX_L) + #define SIZEEX_TAHOMA_XL SIZEEX_TAHOMA(SIZEEX_XL) + + #define SIZEEX_LUCIDA_XS SIZEEX_LUCIDA(SIZEEX_XS) + #define SIZEEX_LUCIDA_S SIZEEX_LUCIDA(SIZEEX_S) + #define SIZEEX_LUCIDA_M SIZEEX_LUCIDA(SIZEEX_M) + #define SIZEEX_LUCIDA_L SIZEEX_LUCIDA(SIZEEX_L) + #define SIZEEX_LUCIDA_XL SIZEEX_LUCIDA(SIZEEX_XL) +#else + #define SIZEEX_PURISTA_XS 2.88 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + #define SIZEEX_PURISTA_S 3.96 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + #define SIZEEX_PURISTA_M 4.32 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + #define SIZEEX_PURISTA_L 4.86 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + #define SIZEEX_PURISTA_XL 5.58 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + + #define SIZEEX_ETELKA_XS 2.945 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + #define SIZEEX_ETELKA_S 3.875 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + #define SIZEEX_ETELKA_M 4.495 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + #define SIZEEX_ETELKA_L 4.805 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + #define SIZEEX_ETELKA_XL 5.735 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + + #define SIZEEX_TAHOMA_XS 2.56 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + #define SIZEEX_TAHOMA_S 2.56 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + #define SIZEEX_TAHOMA_M 2.56 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + #define SIZEEX_TAHOMA_L 2.56 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + #define SIZEEX_TAHOMA_XL 2.56 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + + #define SIZEEX_LUCIDA_XS 1.76 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + #define SIZEEX_LUCIDA_S 1.76 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + #define SIZEEX_LUCIDA_M 1.76 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + #define SIZEEX_LUCIDA_L 1.76 * (1 / (getResolution select 3)) * pixelGrid * 0.5 + #define SIZEEX_LUCIDA_XL 1.76 * (1 / (getResolution select 3)) * pixelGrid * 0.5 +#endif #define SIZEEX_XS 3.0 #define SIZEEX_S 4.0 From cc6c1d59670ab77a84a12aa1fecd2d67693de1c6 Mon Sep 17 00:00:00 2001 From: Freddo Date: Fri, 16 Apr 2021 20:45:32 +0200 Subject: [PATCH 5/5] Add .gitmodules --- .gitmodules | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..73af6dc6 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,2 @@ +[submodule ".hemtt/template"] + url = https://github.com/hemtt/cba