mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
manual merge
This commit is contained in:
commit
0064f5739c
@ -27,15 +27,8 @@ if (isServer) then {
|
||||
["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call EFUNC(common,addEventHandler);
|
||||
["SetSurrendered", {_this call FUNC(setSurrendered)}] call EFUNC(common,addEventHandler);
|
||||
|
||||
//TODO: Medical Integration Events???
|
||||
|
||||
// [_unit, "knockedOut", {
|
||||
// if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleKnockedOut};
|
||||
// }] call ACE_Core_fnc_addCustomEventhandler;
|
||||
|
||||
// [_unit, "wokeUp", {
|
||||
// if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleWokeUp};
|
||||
// }] call ACE_Core_fnc_addCustomEventhandler;
|
||||
//Medical Integration Events???
|
||||
["medical_onUnconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call EFUNC(common,addEventHandler);
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
|
@ -19,10 +19,9 @@ PREP(doUnloadCaptive);
|
||||
PREP(handleGetIn);
|
||||
PREP(handleGetOut);
|
||||
PREP(handleKilled);
|
||||
PREP(handleKnockedOut);
|
||||
PREP(handleOnUnconscious);
|
||||
PREP(handlePlayerChanged);
|
||||
PREP(handleUnitInitPost);
|
||||
PREP(handleWokeUp);
|
||||
PREP(handleZeusDisplayChanged);
|
||||
PREP(moduleSurrender);
|
||||
PREP(setHandcuffed);
|
||||
|
@ -51,7 +51,7 @@ if (_state) then {
|
||||
_unit setVariable [QGVAR(escortedUnit), objNull, true];
|
||||
};
|
||||
};
|
||||
[_escortFnc, 0.2, [_unit, _target, _actionID]] call CBA_fnc_addPerFrameHandler;
|
||||
[_escortFnc, 0, [_unit, _target, _actionID]] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
} else {
|
||||
_unit setVariable [QGVAR(isEscorting), false, true];
|
||||
|
@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Author: commy2, PabstMirror
|
||||
* Handles when a unit gets knocked out. Ends surrendering.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [bob, true] call ACE_captives_fnc_handleKnockedOut
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
|
||||
//ToDo: Waiting on medical integration
|
||||
|
||||
PARAMS_1(_unit);
|
||||
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then { //If surrendering, stop
|
||||
[_unit, false] call FUNC(setSurrendered);
|
||||
};
|
36
addons/captives/functions/fnc_handleOnUnconscious.sqf
Normal file
36
addons/captives/functions/fnc_handleOnUnconscious.sqf
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Author: commy2, PabstMirror
|
||||
* Handles the "medical_onUnconscious" event
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 0: Is Unconsisisiouses <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [bob, true] call ACE_captives_fnc_handleOnUnconscious
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_isUnconc);
|
||||
|
||||
if (!local _unit) exitWith {};
|
||||
|
||||
systemChat format ["med: %1", _this];
|
||||
|
||||
if (_isUnconc) then {
|
||||
//Knocked out: If surrendering, stop
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
||||
[_unit, false] call FUNC(setSurrendered);
|
||||
};
|
||||
} else {
|
||||
//Woke up: if handcuffed, goto animation
|
||||
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||
};
|
||||
};
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* TODO
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [bob] call ACE_captives_fnc_handleWokeUp
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_unit);
|
||||
|
||||
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 0] call EFUNC(common,doAnimation);
|
||||
};
|
@ -52,7 +52,7 @@ if (_state) then {
|
||||
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
|
||||
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
|
||||
PARAMS_2(_unit,_newAnimation);
|
||||
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && (_newAnimation != "Unconscious")) then {
|
||||
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
|
||||
ERROR("Handcuff animation interrupted");
|
||||
systemChat format ["debug %2: new %1", _newAnimation, time];
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||
@ -71,8 +71,8 @@ if (_state) then {
|
||||
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
|
||||
_unit setVariable [QGVAR(handcuffAnimEHID), -1];
|
||||
|
||||
if ((vehicle _unit) == _unit) then {
|
||||
//Break out of hands up animation loop (doAnimation handles Unconscious prioity)
|
||||
if (((vehicle _unit) == _unit) && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
|
||||
//Break out of hands up animation loop
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
||||
|
@ -50,7 +50,7 @@ if (_state) then {
|
||||
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
|
||||
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
|
||||
PARAMS_2(_unit,_newAnimation);
|
||||
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && (_newAnimation != "Unconscious")) then {
|
||||
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
|
||||
ERROR("Surrender animation interrupted");
|
||||
systemChat format ["debug %2: new %1", _newAnimation, time];
|
||||
[_unit, "ACE_AmovPercMstpSsurWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||
|
@ -11,4 +11,4 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
sunOrMoon * sunOrMoon + moonIntensity/5 min 1
|
||||
sunOrMoon * sunOrMoon * (1 - overcast * 0.25) + (moonIntensity/5 min 1) * (1 - overcast)
|
||||
|
@ -19,5 +19,7 @@ if(!GVAR(keyDown)) then {
|
||||
|
||||
GVAR(keyDown) = true;
|
||||
GVAR(keyDownTime) = diag_tickTime;
|
||||
|
||||
["interactMenuOpened", [0]] call EFUNC(common,localEvent);
|
||||
};
|
||||
true
|
||||
|
@ -17,6 +17,8 @@ if(!GVAR(keyDownSelfAction)) then {
|
||||
GVAR(keyDown) = false;
|
||||
GVAR(keyDownTime) = diag_tickTime;
|
||||
|
||||
["interactMenuOpened", [1]] call EFUNC(common,localEvent);
|
||||
|
||||
GVAR(useCursorMenu) = (vehicle ACE_player != ACE_player) || GVAR(AlwaysUseCursorSelfInteraction) || visibleMap;
|
||||
|
||||
if (GVAR(useCursorMenu)) then {
|
||||
|
516
addons/inventory/RscDisplayInventory.hpp
Normal file
516
addons/inventory/RscDisplayInventory.hpp
Normal file
@ -0,0 +1,516 @@
|
||||
/*
|
||||
Adjust the scaling of the inventory screen
|
||||
- changes it from scaling based on user's interface size to a dynamic size based on a setting variable
|
||||
- text size and row height size are uneffected (so more rows in a list)
|
||||
- also tweaks the height of the two ProgressBars which looked odd scaled up so much
|
||||
|
||||
regex:
|
||||
x = "[-+]?(\d*[.]?\d+).*
|
||||
x = X_PART\(\1\);
|
||||
*/
|
||||
|
||||
class RscText;
|
||||
class RscPicture;
|
||||
class RscListBox;
|
||||
class RscProgress;
|
||||
class RscStructuredText;
|
||||
class RscActiveText;
|
||||
class RscCombo;
|
||||
|
||||
#define X_BIS(num) (num * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2))
|
||||
#define Y_BIS(num) (num * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))
|
||||
#define W_BIS(num) (num * (((safezoneW / safezoneH) min 1.2) / 40))
|
||||
#define H_BIS(num) (num * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))
|
||||
|
||||
#define X_MAKEITBIGGA(num) (num * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2))
|
||||
#define Y_MAKEITBIGGA(num) (num * (safeZoneH / 30) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2))
|
||||
#define W_MAKEITBIGGA(num) (num * (safeZoneH / 40))
|
||||
#define H_MAKEITBIGGA(num) (num * (safeZoneH / 30))
|
||||
|
||||
#define X_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(inventoryDisplaySize)), 0)]), X_BIS(num), X_MAKEITBIGGA(num))])
|
||||
#define Y_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(inventoryDisplaySize)), 0)]), Y_BIS(num), Y_MAKEITBIGGA(num))])
|
||||
#define W_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(inventoryDisplaySize)), 0)]), W_BIS(num), W_MAKEITBIGGA(num))])
|
||||
#define H_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(inventoryDisplaySize)), 0)]), H_BIS(num), H_MAKEITBIGGA(num))])
|
||||
|
||||
class RscDisplayInventory {
|
||||
class controls {
|
||||
class CA_ContainerBackground: RscText {
|
||||
//crate: GroundLoad adjust size
|
||||
x = X_PART(1);
|
||||
y = Y_PART(1);
|
||||
w = W_PART(12);
|
||||
h = H_PART(22.5);
|
||||
};
|
||||
class CA_PlayerBackground: RscText {
|
||||
//center player's container: decrease height because of progressbar height decrease
|
||||
x = X_PART(14.6);
|
||||
y = Y_PART(2);
|
||||
w = W_PART(24.4);
|
||||
h = H_PART(21.5);
|
||||
};
|
||||
class TitleBackground: RscText {
|
||||
x = X_PART(14.6);
|
||||
y = Y_PART(1);
|
||||
w = W_PART(24.4);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class PlayersName: RscText {
|
||||
x = X_PART(15.6);
|
||||
y = Y_PART(1);
|
||||
w = W_PART(19.8);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class RankBackground: RscText {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(1.25);
|
||||
w = W_PART(0.6);
|
||||
h = H_PART(0.6);
|
||||
};
|
||||
class RankPicture: RscPicture {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(1.25);
|
||||
w = W_PART(0.6);
|
||||
h = H_PART(0.6);
|
||||
};
|
||||
class ButtonBack: RscActiveText {
|
||||
x = X_PART(38);
|
||||
y = Y_PART(1);
|
||||
w = W_PART(1);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class BackgroundSlotPrimary: RscPicture {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(6);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class BackgroundSlotPrimaryMuzzle: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotPrimaryFlashlight: BackgroundSlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotPrimaryOptics: BackgroundSlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotPrimaryMagazine: BackgroundSlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotSecondary: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(11.5);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class BackgroundSlotSecondaryMuzzle: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotSecondaryFlashlight: BackgroundSlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotSecondaryOptics: BackgroundSlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotSecondaryMagazine: BackgroundSlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotHandgun: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(17);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class BackgroundSlotHandgunMuzzle: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotHandgunFlashlight: BackgroundSlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotHandgunOptics: BackgroundSlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotHandgunMagazine: BackgroundSlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotHeadgear: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class BackgroundSlotGoggles: BackgroundSlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class BackgroundSlotHMD: BackgroundSlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class BackgroundSlotBinoculars: BackgroundSlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class BackgroundSlotMap: BackgroundSlotPrimary {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.12);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotGPS: BackgroundSlotPrimary {
|
||||
x = X_PART(17.32);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.12);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotCompass: BackgroundSlotPrimary {
|
||||
x = X_PART(21.76);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.12);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotRadio: BackgroundSlotPrimary {
|
||||
x = X_PART(19.54);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.12);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotWatch: BackgroundSlotPrimary {
|
||||
x = X_PART(23.98);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.12);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class ExternalContainerBackground: RscPicture {
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(3.7);
|
||||
w = W_PART(11);
|
||||
h = H_PART(18.4);
|
||||
};
|
||||
class PlayerContainerBackground: ExternalContainerBackground {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(6);
|
||||
w = W_PART(11);
|
||||
h = H_PART(14);
|
||||
};
|
||||
class GroundTab: RscActiveText {
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(1.5);
|
||||
w = W_PART(5.5);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class SoldierTab: GroundTab {
|
||||
x = X_PART(7);
|
||||
y = Y_PART(1.5);
|
||||
w = W_PART(5.5);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class GroundContainer: RscListBox {
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(3.7);
|
||||
w = W_PART(11);
|
||||
h = H_PART(18.4);
|
||||
};
|
||||
class GroundFilter: RscCombo {
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(2.6);
|
||||
w = W_PART(11);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class GroundLoad: RscProgress {
|
||||
//crate: GroundLoad adjust size
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(22.5);
|
||||
w = W_PART(11);
|
||||
h = H_PART(0.5);
|
||||
};
|
||||
class SlotPrimary: GroundTab {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(6);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class SlotPrimaryMuzzle: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotPrimaryGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = X_PART(39);
|
||||
y = Y_PART(9);
|
||||
};
|
||||
class SlotPrimaryFlashlight: SlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotPrimaryOptics: SlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotPrimaryMagazine: SlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotSecondary: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(11.5);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class SlotSecondaryMuzzle: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotSecondaryGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = X_PART(39);
|
||||
y = Y_PART(14.5);
|
||||
};
|
||||
class SlotSecondaryFlashlight: SlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotSecondaryOptics: SlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotSecondaryMagazine: SlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotHandgun: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(17);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class SlotHandgunMuzzle: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotHandgunGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = X_PART(39);
|
||||
y = Y_PART(20);
|
||||
};
|
||||
class SlotHandgunFlashlight: SlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotHandgunOptics: SlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotHandgunMagazine: SlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotHeadgear: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class SlotGoggles: SlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class SlotHMD: SlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class SlotBinoculars: SlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class SlotMap: SlotPrimary {
|
||||
x = X_PART(15.16);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotGPS: SlotPrimary {
|
||||
x = X_PART(17.38);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotCompass: SlotPrimary {
|
||||
x = X_PART(21.82);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotRadio: SlotPrimary {
|
||||
x = X_PART(19.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotWatch: SlotPrimary {
|
||||
x = X_PART(24.04);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class UniformTab: GroundTab {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class UniformSlot: SlotPrimary {
|
||||
x = X_PART(15.35);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class UniformLoad: GroundLoad {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(5.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(0.5);
|
||||
};
|
||||
class UniformContainer: GroundContainer {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(6);
|
||||
w = W_PART(11);
|
||||
h = H_PART(14);
|
||||
};
|
||||
class VestTab: UniformTab {
|
||||
x = X_PART(18.85);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class VestSlot: SlotPrimary {
|
||||
x = X_PART(19.1);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class VestLoad: GroundLoad {
|
||||
x = X_PART(18.85);
|
||||
y = Y_PART(5.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(0.5);
|
||||
};
|
||||
class BackpackTab: UniformTab {
|
||||
x = X_PART(22.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class BackpackSlot: SlotPrimary {
|
||||
x = X_PART(22.85);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class BackpackLoad: GroundLoad {
|
||||
x = X_PART(22.6);
|
||||
y = Y_PART(5.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(0.5);
|
||||
};
|
||||
class TotalLoad: GroundLoad {
|
||||
//center: progressbar height decrease
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(22.5);
|
||||
w = W_PART(23.4);
|
||||
h = H_PART(0.5);
|
||||
};
|
||||
class ContainerMarker: GroundTab {
|
||||
x = X_PART(0);
|
||||
y = Y_PART(24);
|
||||
w = W_PART(1);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class GroundMarker: ContainerMarker {
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(24);
|
||||
w = W_PART(1);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class SoldierMarker: ContainerMarker {
|
||||
x = X_PART(3);
|
||||
y = Y_PART(24);
|
||||
w = W_PART(1);
|
||||
h = H_PART(1);
|
||||
};
|
||||
};
|
||||
};
|
@ -12,503 +12,16 @@ class CfgPatches {
|
||||
};
|
||||
};
|
||||
|
||||
#include "RscDisplayInventory.hpp"
|
||||
|
||||
class RscText;
|
||||
class RscPicture;
|
||||
class RscListBox;
|
||||
class RscProgress;
|
||||
class RscStructuredText;
|
||||
class RscActiveText;
|
||||
class RscCombo;
|
||||
class RscControlsGroupNoScrollbars;
|
||||
|
||||
/*
|
||||
Adjust the scaling of the inventory screen
|
||||
- changes it from scaling based on user's interface size to a static size
|
||||
- text size and row height size are uneffected
|
||||
- also tweaks the height of the two ProgressBars which looked odd scaled up so much
|
||||
*/
|
||||
|
||||
class RscDisplayInventory {
|
||||
class controls {
|
||||
class CA_ContainerBackground: RscText {
|
||||
//crate: GroundLoad adjust size
|
||||
x = "1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "12 * (safeZoneH / 40)";
|
||||
h = "22.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class CA_PlayerBackground: RscText {
|
||||
//center player's container: decrease height because of progressbar height decrease
|
||||
x = "14.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "24.4 * (safeZoneH / 40)";
|
||||
h = "21.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class TitleBackground: RscText {
|
||||
x = "14.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "24.4 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class PlayersName: RscText {
|
||||
text = "Player name:";
|
||||
x = "15.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "19.8 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class RankBackground: RscText {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1.25 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "0.6 * (safeZoneH / 40)";
|
||||
h = "0.6 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class RankPicture: RscPicture {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1.25 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "0.6 * (safeZoneH / 40)";
|
||||
h = "0.6 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class ButtonBack: RscActiveText {
|
||||
x = "38 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "1 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotPrimary: RscPicture {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotPrimaryMuzzle: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotPrimaryFlashlight: BackgroundSlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotPrimaryOptics: BackgroundSlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotPrimaryMagazine: BackgroundSlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotSecondary: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "11.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotSecondaryMuzzle: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotSecondaryFlashlight: BackgroundSlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotSecondaryOptics: BackgroundSlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotSecondaryMagazine: BackgroundSlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHandgun: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "17 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHandgunMuzzle: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHandgunFlashlight: BackgroundSlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHandgunOptics: BackgroundSlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHandgunMagazine: BackgroundSlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHeadgear: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotGoggles: BackgroundSlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHMD: BackgroundSlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotBinoculars: BackgroundSlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotMap: BackgroundSlotPrimary {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.12 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotGPS: BackgroundSlotPrimary {
|
||||
x = "17.32 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.12 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotCompass: BackgroundSlotPrimary {
|
||||
x = "21.76 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.12 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotRadio: BackgroundSlotPrimary {
|
||||
x = "19.54 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.12 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotWatch: BackgroundSlotPrimary {
|
||||
x = "23.98 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.12 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class ExternalContainerBackground: RscPicture {
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "3.7 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "18.4 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class PlayerContainerBackground: ExternalContainerBackground {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "14 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class GroundTab: RscActiveText {
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "5.5 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SoldierTab: GroundTab {
|
||||
x = "7 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "5.5 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class GroundContainer: RscListBox {
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "3.7 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "18.4 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class GroundFilter: RscCombo {
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class GroundLoad: RscProgress {
|
||||
//crate: GroundLoad adjust size
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "22.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "0.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotPrimary: GroundTab {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotPrimaryMuzzle: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotPrimaryGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = "39 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
};
|
||||
class SlotPrimaryFlashlight: SlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotPrimaryOptics: SlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotPrimaryMagazine: SlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotSecondary: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "11.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotSecondaryMuzzle: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotSecondaryGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = "39 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
};
|
||||
class SlotSecondaryFlashlight: SlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotSecondaryOptics: SlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotSecondaryMagazine: SlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHandgun: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "17 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHandgunMuzzle: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHandgunGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = "39 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
};
|
||||
class SlotHandgunFlashlight: SlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHandgunOptics: SlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHandgunMagazine: SlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHeadgear: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotGoggles: SlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHMD: SlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotBinoculars: SlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotMap: SlotPrimary {
|
||||
x = "15.16 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotGPS: SlotPrimary {
|
||||
x = "17.38 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotCompass: SlotPrimary {
|
||||
x = "21.82 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotRadio: SlotPrimary {
|
||||
x = "19.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotWatch: SlotPrimary {
|
||||
x = "24.04 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class UniformTab: GroundTab {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class UniformSlot: SlotPrimary {
|
||||
x = "15.35 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class UniformLoad: GroundLoad {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "5.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "0.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class UniformContainer: GroundContainer {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "14 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class VestTab: UniformTab {
|
||||
x = "18.85 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class VestSlot: SlotPrimary {
|
||||
x = "19.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class VestLoad: GroundLoad {
|
||||
x = "18.85 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "5.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "0.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackpackTab: UniformTab {
|
||||
x = "22.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackpackSlot: SlotPrimary {
|
||||
x = "22.85 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackpackLoad: GroundLoad {
|
||||
x = "22.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "5.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "0.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class TotalLoad: GroundLoad {
|
||||
//center: progressbar height decrease
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "22.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "23.4 * (safeZoneH / 40)";
|
||||
h = "0.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class ContainerMarker: GroundTab {
|
||||
x = "0 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "24 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "1 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class GroundMarker: ContainerMarker {
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "24 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "1 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SoldierMarker: ContainerMarker {
|
||||
x = "3 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "24 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "1 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class ACE_Settings {
|
||||
class GVAR(inventoryDisplaySize) {
|
||||
value = 0;
|
||||
typeName = "SCALAR";
|
||||
isClientSetable = 1;
|
||||
displayName = "$STR_ACE_Inventory_SettingName";
|
||||
description = "$STR_ACE_Inventory_SettingDescription";
|
||||
values[] = {"Normal (Default Size)", "Medium", "Bigger"};
|
||||
};
|
||||
};
|
||||
|
||||
|
12
addons/inventory/stringtable.xml
Normal file
12
addons/inventory/stringtable.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Edited with tabler - 2015-02-13 -->
|
||||
<Project name="ACE">
|
||||
<Package name="Inventory">
|
||||
<Key ID="STR_ACE_Inventory_SettingName">
|
||||
<English>Make Inventory Display Bigger</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Inventory_SettingDescription">
|
||||
<English>Normally inventory display is scaled by UI size. This allows scaling the Inventory UI size up, but doesn't increase font size allowing more rows displayed.</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -4,3 +4,8 @@ class Extended_PreInit_EventHandlers {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
clientInit = QUOTE( call COMPILE_FILE(XEH_clientInit) );
|
||||
};
|
||||
};
|
||||
|
@ -1,19 +0,0 @@
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ACE_Equipment {
|
||||
class GVAR(CutFence) {
|
||||
displayName = "$STR_ACE_logistics_wirecutter_CutFence";
|
||||
condition = QUOTE([_player] call FUNC(canCutFence));
|
||||
statement = QUOTE([_player] call FUNC(cutDownFence));
|
||||
exceptions[] = {};
|
||||
showDisabled = 1;
|
||||
priority = 0;
|
||||
icon = PATHTOF(UI\wirecutter_ca.paa);
|
||||
hotkey = "C";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
5
addons/logistics_wirecutter/XEH_clientInit.sqf
Normal file
5
addons/logistics_wirecutter/XEH_clientInit.sqf
Normal file
@ -0,0 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["interactMenuOpened", {_this call FUNC(interactEH)}] call EFUNC(common,addEventHandler);
|
@ -2,11 +2,11 @@
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(canCutFence);
|
||||
PREP(cutDownFence);
|
||||
PREP(cutDownFenceAbort);
|
||||
PREP(cutDownFenceCallback);
|
||||
PREP(getNearestFence);
|
||||
PREP(interactEH);
|
||||
PREP(isFence);
|
||||
|
||||
ADDON = true;
|
||||
|
@ -5,7 +5,7 @@ class CfgPatches {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common", "ace_interaction"};
|
||||
requiredAddons[] = {"ace_interact_menu"};
|
||||
author[] = {"gpgpgpgp", "PabstMirror"};
|
||||
authorUrl = "";
|
||||
VERSION_CONFIG;
|
||||
@ -13,6 +13,5 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgSounds.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
|
@ -1,18 +0,0 @@
|
||||
/* fnc_canCutFence.sqf
|
||||
*
|
||||
* Author: PabstMirror
|
||||
*
|
||||
* Condition check if player is able to cut a fence.
|
||||
* Checks for "ACE_wirecutter" item and if there is a nearby fence.
|
||||
*
|
||||
* Argument:
|
||||
* 0: OBJECT - Unit to check condition for (player)
|
||||
*
|
||||
* Return value:
|
||||
* BOOL
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
PARAMS_1(_unit);
|
||||
|
||||
("ACE_wirecutter" in (items _unit)) && {!(isNull ([_unit] call FUNC(getNearestFence)))}
|
@ -1,20 +1,31 @@
|
||||
// by gpgpgpgp, edited by commy2
|
||||
/*
|
||||
* Author: gpgpgpgp, edited by commy2, PabstMirror
|
||||
* Starts cutting down a fence
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Fence <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [player, berlinWall] call ace_logistics_wirecutter_fnc_cutDownFence
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_unit);
|
||||
private ["_timeToCut"];
|
||||
|
||||
PARAMS_2(_unit,_fenceObject);
|
||||
if (_unit != ACE_player) exitWith {};
|
||||
|
||||
_fenceObject = [ACE_player] call FUNC(getNearestFence);
|
||||
if (isNull _fenceObject) exitWith {};
|
||||
|
||||
_timeToCut = 5;
|
||||
if !([ACE_player] call EFUNC(common,isEngineer)) then {
|
||||
_timeToCut = _timeToCut + 5;
|
||||
};
|
||||
_timeToCut = if ([ACE_player] call EFUNC(common,isEngineer)) then {5} else {10};
|
||||
|
||||
[ACE_player, "AinvPknlMstpSnonWnonDr_medic5", 0] call EFUNC(common,doAnimation);
|
||||
|
||||
if (_timeToCut > 4.5) then {
|
||||
if (_timeToCut > 5) then {
|
||||
playSound "ACE_wirecutter_sound_long";
|
||||
} else {
|
||||
playSound "ACE_wirecutter_sound";
|
||||
|
@ -1,4 +1,18 @@
|
||||
// by commy2
|
||||
/*
|
||||
* Author: commy2
|
||||
* Stops cutting down fence (reset animation)
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_logistics_wirecutter_fnc_cutDownFenceAbort
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
[ACE_player, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
|
||||
|
@ -1,7 +1,22 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Once progressbar is done: Fence is cutdown
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Fence Object <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [aFence] call ace_logistics_wirecutter_fnc_cutDownFenceCallback
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_fenceObject);
|
||||
|
||||
_fenceObject setdamage 1;
|
||||
[localize "STR_ACE_logistics_wirecutter_FenceCut"] call EFUNC(common,displayTextStructured);
|
||||
// [localize "STR_ACE_logistics_wirecutter_FenceCut"] call EFUNC(common,displayTextStructured);
|
||||
[ACE_player, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
|
||||
|
@ -1,15 +1,18 @@
|
||||
/* fnc_getNearestFence.sqf
|
||||
*
|
||||
* Author: PabstMirror
|
||||
*
|
||||
* Gets nearest fence within 5 meters to the unit.
|
||||
*
|
||||
* Argument:
|
||||
* 0: OBJECT - Unit to search for fence objects arround
|
||||
*
|
||||
* Return value:
|
||||
* OBJECT - Nearest object that is a fence, objNull if none found.
|
||||
*/
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Gets nearest fence object (not actully used, left for utility)
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <OBJECT>
|
||||
*
|
||||
* Example:
|
||||
* [player] call ace_logistics_wirecutter_fnc_getNearestFence
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_nearestFence";
|
||||
@ -20,6 +23,6 @@ _nearestFence = objNull;
|
||||
if ((isNull _nearestFence) && {[_x] call FUNC(isFence)}) then {
|
||||
_nearestFence = _x;
|
||||
};
|
||||
} forEach nearestObjects [_unit, [], 5];
|
||||
} forEach nearestObjects [_unit, [], 15];
|
||||
|
||||
_nearestFence
|
||||
|
64
addons/logistics_wirecutter/functions/fnc_interactEH.sqf
Normal file
64
addons/logistics_wirecutter/functions/fnc_interactEH.sqf
Normal file
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* When interact_menu starts rendering (from "interact_keyDown" event)
|
||||
*
|
||||
* Arguments:
|
||||
* Interact Menu Type (0 - world, 1 - self) <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [0] call ace_logistics_wirecutter_fnc_interactEH
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_interactionType);
|
||||
|
||||
if (_interactionType != 0) exitWith {};
|
||||
|
||||
//for performance only do stuff it they have a wirecutter item
|
||||
//(if they somehow get one durring keydown they'll just have to reopen)
|
||||
if (!("ACE_wirecutter" in (items ace_player))) exitWith {};
|
||||
|
||||
[{
|
||||
private ["_fncStatement", "_attachedFence", "_fncCondition", "_helper"];
|
||||
PARAMS_2(_args,_pfID);
|
||||
EXPLODE_3_PVT(_args,_setPosition,_addedHelpers,_fencesHelped);
|
||||
|
||||
if (!EGVAR(interact_menu,keyDown)) then {
|
||||
{deleteVehicle _x;} forEach _addedHelpers;
|
||||
[_pfID] call CBA_fnc_removePerFrameHandler;
|
||||
} else {
|
||||
//If play moved >5 meters from last pos, then rescan
|
||||
if (((getPosASL ace_player) distance _setPosition) > 5) then {
|
||||
|
||||
_fncStatement = {
|
||||
_attachedFence = _target getVariable [QGVAR(attachedFence), objNull];
|
||||
[ace_player, _attachedFence] call FUNC(cutDownFence);
|
||||
};
|
||||
_fncCondition = {
|
||||
_attachedFence = _target getVariable [QGVAR(attachedFence), objNull];
|
||||
((!isNull _attachedFence) && {(damage _attachedFence) < 1} && {("ACE_wirecutter" in (items ace_player))})
|
||||
};
|
||||
|
||||
{
|
||||
if (!(_x in _fencesHelped)) then {
|
||||
if ([_x] call FUNC(isFence)) then {
|
||||
_fencesHelped pushBack _x;
|
||||
_helper = "Sign_Sphere25cm_F" createVehicleLocal (getpos _x);
|
||||
[_helper, 0, [""], (localize "STR_ACE_logistics_wirecutter_CutFence"), QUOTE(PATHTOF(ui\wirecutter_ca.paa)), [0,0,0], _fncStatement, _fncCondition, 5] call EFUNC(interact_menu,addAction);
|
||||
_helper setPosASL ((getPosASL _x) vectorAdd [0,0,1.25]);
|
||||
_helper hideObject true;
|
||||
_helper setVariable [QGVAR(attachedFence), _x];
|
||||
_addedHelpers pushBack _helper;
|
||||
};
|
||||
};
|
||||
} forEach nearestObjects [ace_player, [], 15];
|
||||
|
||||
_args set [0, (getPosASL ace_player)];
|
||||
};
|
||||
};
|
||||
}, 0.1, [((getPosASL ace_player) vectorAdd [-100,0,0]), [], []]] call CBA_fnc_addPerFrameHandler;
|
@ -1,16 +1,19 @@
|
||||
/* fnc_isFence.sqf
|
||||
*
|
||||
* Author: PabstMirror
|
||||
*
|
||||
* Checks if object is a fence. Should work on any fence type, even (typeof == "").
|
||||
* Call is fairly expensive because of all of the string checking.
|
||||
*
|
||||
* Argument:
|
||||
* 0: OBJECT - Ojbect to test
|
||||
*
|
||||
* Return value:
|
||||
* BOOL
|
||||
*/
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Checks if object is a fence. Should work on any fence type, even (typeof == "").
|
||||
* Call is fairly expensive because of all of the string checking.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: An Object To Test <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Is it a fence <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [aFence] call ace_logistics_wirecutter_fnc_isFence
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
//find is case sensitive, so keep everything lowercase
|
||||
@ -27,14 +30,14 @@ _typeOf = toLower (typeOf _object);
|
||||
_returnValue = false;
|
||||
|
||||
if (_typeOf != "") then {
|
||||
_returnValue = _typeOf in (FENCE_A3_TYPENAMES + FENCE_AIA_TYPENAMES);
|
||||
_returnValue = _typeOf in (FENCE_A3_TYPENAMES + FENCE_AIA_TYPENAMES);
|
||||
} else {
|
||||
_typeOf = toLower (str _object); //something like "123201: wall_indfnc_9.p3d"
|
||||
{
|
||||
if ((_typeOf find _x) != -1) then {
|
||||
_returnValue = true;
|
||||
};
|
||||
} forEach (FENCE_A3_P3DS + FENCE_AIA_P3DS);
|
||||
_typeOf = toLower (str _object); //something like "123201: wall_indfnc_9.p3d"
|
||||
{
|
||||
if ((_typeOf find _x) != -1) then {
|
||||
_returnValue = true;
|
||||
};
|
||||
} forEach (FENCE_A3_P3DS + FENCE_AIA_P3DS);
|
||||
};
|
||||
|
||||
_returnValue
|
||||
|
@ -1,12 +1,11 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
|
||||
serverInit = QUOTE( call COMPILE_FILE(XEH_preInitServer) );
|
||||
};
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit) );
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
clientInit = QUOTE( call COMPILE_FILE(XEH_postInitClient) );
|
||||
};
|
||||
class ADDON {
|
||||
clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient) );
|
||||
};
|
||||
};
|
||||
|
@ -1,67 +1,42 @@
|
||||
// MARKERS
|
||||
class CfgMarkers {
|
||||
class Flag;
|
||||
class Flag;
|
||||
|
||||
// Reenable NATO symbols ...
|
||||
class b_unknown: Flag {scope = 2;};
|
||||
// Reenable NATO symbols ...
|
||||
class b_unknown: Flag {scope = 2;};
|
||||
|
||||
// ... and disable all the useless ones
|
||||
// If you think that some of these are needed, create an issue; But until
|
||||
// there's a better way to place markers, there should be only the most
|
||||
// important markers here.
|
||||
// Keep in mind that all of these can still be placed in the editor.
|
||||
class b_hq: b_unknown {scope = 1;};
|
||||
class b_installation: b_unknown {scope = 1;};
|
||||
class b_maint: b_unknown {scope = 1;};
|
||||
class b_med: b_unknown {scope = 1;};
|
||||
class b_service: b_unknown {scope = 1;};
|
||||
class b_support: b_unknown {scope = 1;};
|
||||
// ... and disable all the useless ones
|
||||
// If you think that some of these are needed, create an issue; But until
|
||||
// there's a better way to place markers, there should be only the most
|
||||
// important markers here.
|
||||
// Keep in mind that all of these can still be placed in the editor.
|
||||
class b_hq: b_unknown {scope = 1;};
|
||||
class b_installation: b_unknown {scope = 1;};
|
||||
class b_maint: b_unknown {scope = 1;};
|
||||
class b_med: b_unknown {scope = 1;};
|
||||
class b_service: b_unknown {scope = 1;};
|
||||
class b_support: b_unknown {scope = 1;};
|
||||
|
||||
class n_unknown: b_unknown {};
|
||||
class n_hq: n_unknown {scope = 1;};
|
||||
class n_installation: n_unknown {scope = 1;};
|
||||
class u_installation: n_unknown {scope = 1;}; // i have no idea...
|
||||
class n_maint: n_unknown {scope = 1;};
|
||||
class n_med: n_unknown {scope = 1;};
|
||||
class n_service: n_unknown {scope = 1;};
|
||||
class n_support: n_unknown {scope = 1;};
|
||||
class n_unknown: b_unknown {};
|
||||
class n_hq: n_unknown {scope = 1;};
|
||||
class n_installation: n_unknown {scope = 1;};
|
||||
class u_installation: n_unknown {scope = 1;}; // i have no idea...
|
||||
class n_maint: n_unknown {scope = 1;};
|
||||
class n_med: n_unknown {scope = 1;};
|
||||
class n_service: n_unknown {scope = 1;};
|
||||
class n_support: n_unknown {scope = 1;};
|
||||
|
||||
class o_unknown: b_unknown {};
|
||||
class o_hq: o_unknown {scope = 1;};
|
||||
class o_installation: o_unknown {scope = 1;};
|
||||
class o_maint: o_unknown {scope = 1;};
|
||||
class o_med: o_unknown {scope = 1;};
|
||||
class o_service: o_unknown {scope = 1;};
|
||||
class o_support: o_unknown {scope = 1;};
|
||||
class o_unknown: b_unknown {};
|
||||
class o_hq: o_unknown {scope = 1;};
|
||||
class o_installation: o_unknown {scope = 1;};
|
||||
class o_maint: o_unknown {scope = 1;};
|
||||
class o_med: o_unknown {scope = 1;};
|
||||
class o_service: o_unknown {scope = 1;};
|
||||
class o_support: o_unknown {scope = 1;};
|
||||
|
||||
// disable all civy markers (harbor etc.)
|
||||
class c_unknown: b_unknown {scope = 1;};
|
||||
// disable all civy markers (harbor etc.)
|
||||
class c_unknown: b_unknown {scope = 1;};
|
||||
|
||||
// disable quantity indicators (fire team/squad/platoon ...)
|
||||
class group_0: b_unknown {scope = 1;};
|
||||
|
||||
|
||||
class ACE_MapToolFixed {
|
||||
name = "MapToolFixed";
|
||||
icon = PATHTOF(data\mapToolFixed.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class ACE_MapToolRotatingNormal {
|
||||
name = "MapToolRotating";
|
||||
icon = PATHTOF(data\mapToolRotatingNormal.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class ACE_MapToolRotatingSmall {
|
||||
name = "MapToolRotating";
|
||||
icon = PATHTOF(data\mapToolRotatingSmall.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
// disable quantity indicators (fire team/squad/platoon ...)
|
||||
class group_0: b_unknown {scope = 1;};
|
||||
};
|
||||
|
@ -1,155 +1,28 @@
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
|
||||
class ACE_MapTools {
|
||||
displayName = "$STR_ACE_Map_MapTools_Menu";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) || {call FUNC(canUseMapGPS)}));
|
||||
statement = "";
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 100;
|
||||
enableInside = 1;
|
||||
|
||||
class ACE_MapToolsHide {
|
||||
displayName = "$STR_ACE_Map_MapToolsHide";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 0; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 5;
|
||||
enableInside = 1;
|
||||
class Module_F;
|
||||
class ACE_ModuleBlueForceTracking: Module_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
category = "ACE";
|
||||
displayName = "Blue Force Tracking";
|
||||
function = QFUNC(blueForceTrackingModule);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = PATHTOF(UI\IconBFTracking_ca.paa);
|
||||
class Arguments {
|
||||
class Interval {
|
||||
displayName = "Interval";
|
||||
description = "How often the markers should be refreshed (in seconds)";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class HideAiGroups {
|
||||
displayName = "Hide AI groups?";
|
||||
description = "Hide markers for 'AI only' groups?";
|
||||
typeName = "BOOL";
|
||||
class values {
|
||||
class Yes { name = "Yes"; value = 1; };
|
||||
class No { name = "No"; value = 0; default = 1; };
|
||||
};
|
||||
};
|
||||
};
|
||||
class ACE_MapToolsShowNormal {
|
||||
displayName = "$STR_ACE_Map_MapToolsShowNormal";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 1}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 1; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 4;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsShowSmall {
|
||||
displayName = "$STR_ACE_Map_MapToolsShowSmall";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 2}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 2; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 3;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsAlignNorth {
|
||||
displayName = "$STR_ACE_Map_MapToolsAlignNorth";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
||||
statement = QUOTE(GVAR(mapTool_angle) = 0; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsAlignCompass {
|
||||
displayName = "$STR_ACE_Map_MapToolsAlignCompass";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0} && {('ItemCompass' in assigneditems ACE_player) || {'ItemCompass' in assigneditems ACE_player}}));
|
||||
statement = QUOTE(GVAR(mapTool_angle) = getDir ACE_player; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapGpsShow {
|
||||
displayName = "$STR_ACE_Map_MapGpsShow";
|
||||
condition = QUOTE((call FUNC(canUseMapGPS) && {!GVAR(mapGpsShow)}));
|
||||
statement = QUOTE(GVAR(mapGpsShow) = true; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapGpsHide {
|
||||
displayName = "$STR_ACE_Map_MapGpsHide";
|
||||
condition = QUOTE((call FUNC(canUseMapGPS) && {GVAR(mapGpsShow)}));
|
||||
statement = QUOTE(GVAR(mapGpsShow) = false; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
class ACE_CopyMap {
|
||||
displayName = "$STR_ACE_Map_CopyMap";
|
||||
condition = QUOTE(([_target] call EFUNC(common,isPlayer) && {'ItemMap' in assigneditems _player} && {'ACE_MapTools' in items _player} && {'ItemMap' in assignedItems _target}));
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(copyMapStart));
|
||||
showDisabled = 0;
|
||||
priority = -1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class NATO_Box_Base;
|
||||
class EAST_Box_Base;
|
||||
class IND_Box_Base;
|
||||
class FIA_Box_Base_F;
|
||||
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_FIA_Support_F: FIA_Box_Base_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Module_F;
|
||||
class ACE_ModuleBlueForceTracking: Module_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
category = "ACE";
|
||||
displayName = "Blue Force Tracking";
|
||||
function = QFUNC(blueForceTrackingModule);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = PATHTOF(UI\IconBFTracking_ca.paa);
|
||||
class Arguments {
|
||||
class Interval {
|
||||
displayName = "Interval";
|
||||
description = "How often the markers should be refreshed (in seconds)";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class HideAiGroups {
|
||||
displayName = "Hide AI groups?";
|
||||
description = "Hide markers for 'AI only' groups?";
|
||||
typeName = "BOOL";
|
||||
class values {
|
||||
class Yes { name = "Yes"; value = 1; };
|
||||
class No { name = "No"; value = 0; default = 1; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,15 +0,0 @@
|
||||
class CfgWeapons {
|
||||
class ACE_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
|
||||
class ACE_MapTools: ACE_ItemCore {
|
||||
displayName = "$STR_ACE_MapTools_Name";
|
||||
descriptionShort = "$STR_ACE_MapTools_Description";
|
||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||
picture = PATHTOF(UI\maptool_item.paa);
|
||||
scope = 2;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
};
|
||||
};
|
||||
};
|
@ -1,93 +1,9 @@
|
||||
class controls {
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
};
|
||||
class CA_PlayerName: RscText {
|
||||
x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfilePicture: RscPicture {
|
||||
x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfileBackground: RscText {
|
||||
x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class Separator1: RscPicture {
|
||||
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ColorBlack: RscButton {
|
||||
idc = 36732;
|
||||
x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {0,0,0,1};
|
||||
colorFocused[] = {0,0,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorBlack""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),"ColorBlack")]);
|
||||
};
|
||||
class ColorRed: RscButton {
|
||||
idc = 36733;
|
||||
x = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {1,0,0,1};
|
||||
colorFocused[] = {1,0,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorRed""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),QUOTE(ColorRed))]);
|
||||
};
|
||||
class ColorGreen: RscButton {
|
||||
idc = 36734;
|
||||
x = "0.6 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {0,1,0,1};
|
||||
colorFocused[] = {0,1,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorGreen""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),"ColorGreen")]);
|
||||
};
|
||||
class ColorBlue: RscButton {
|
||||
idc = 36735;
|
||||
x = "0.9 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.8,1};
|
||||
colorBackgroundActive[] = {0,0,1,1};
|
||||
colorFocused[] = {0,0,1,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorBlue""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorBlue")]);
|
||||
};
|
||||
class ColorYellow: RscButton {
|
||||
idc = 36736;
|
||||
x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {1,1,0,1};
|
||||
colorFocused[] = {1,1,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorYellow""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorYellow")]);
|
||||
};
|
||||
class ColorWhite: RscButton {
|
||||
idc = 36737;
|
||||
x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.8,1};
|
||||
colorBackgroundActive[] = {1,1,1,1};
|
||||
colorFocused[] = {1,1,1,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorWhite""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorWhite")]);
|
||||
};
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
};
|
||||
};
|
||||
|
@ -1,81 +0,0 @@
|
||||
#define GUI_GRID_X (0)
|
||||
#define GUI_GRID_Y (0)
|
||||
#define GUI_GRID_W (0.025)
|
||||
#define GUI_GRID_H (0.04)
|
||||
|
||||
#define ST_LEFT 0x00
|
||||
#define ST_RIGHT 0x01
|
||||
#define ST_CENTER 0x02
|
||||
|
||||
#define W_gps 0.4025
|
||||
#define H_gps 0.25
|
||||
#define X_gps safeZoneX + safeZoneW - 1.1 * W_gps
|
||||
#define Y_gps safeZoneY + safeZoneH - 1.2 * H_gps
|
||||
|
||||
class RscTitles {
|
||||
class RscACE_MapGps {
|
||||
idd = 9855;
|
||||
movingEnable = 1;
|
||||
duration = 3600;
|
||||
fadein = 0;
|
||||
fadeout = 0;
|
||||
// onLoad = QUOTE(uiNamespace setVariable [ARR_2(QGVAR(ui_mapGpsDisplay), _this select 0)];);
|
||||
onLoad = "uiNamespace setVariable ['ACE_map_ui_mapGpsDisplay', _this select 0];"; //@todo cbaify this
|
||||
//onUnLoad = "_this call onRscLoad";
|
||||
class controls {
|
||||
class back:RscPicture {
|
||||
x = X_gps;
|
||||
y = Y_gps;
|
||||
w = W_gps;
|
||||
h = H_gps;
|
||||
text = PATHTOF(UI\mapGps.paa);
|
||||
colorBackground[] = {1, 1, 1, 1};
|
||||
};
|
||||
class heading: RscText{
|
||||
idc = 913590;
|
||||
x = X_gps + W_gps * 0.25;
|
||||
y = Y_gps + H_gps * 0.12;
|
||||
w = W_gps * 0.2;
|
||||
h = H_gps * 0.16;
|
||||
style = ST_LEFT;
|
||||
text = "225";
|
||||
colorBackground[] = {0,0,0,0};
|
||||
colorText[] = {0.247,0.251,0.157,1};
|
||||
shadowColo[] = {0,0,0,0};
|
||||
font = "EtelkaNarrowMediumPro";
|
||||
shadow = 0;
|
||||
sizeEx = 0.042;
|
||||
};
|
||||
class altitude: RscText{
|
||||
idc = 913591;
|
||||
x = X_gps + W_gps * 0.55;
|
||||
y = Y_gps + H_gps * 0.12;
|
||||
w = W_gps * 0.2;
|
||||
h = H_gps * 0.16;
|
||||
style = ST_RIGHT;
|
||||
text = "55 m";
|
||||
colorBackground[] = {0,0,0,0};
|
||||
colorText[] = {0.247,0.251,0.157,1};
|
||||
shadowColo[] = {0,0,0,0};
|
||||
font = "EtelkaNarrowMediumPro";
|
||||
shadow = 0;
|
||||
sizeEx = 0.042;
|
||||
};
|
||||
class coordinates: RscText{
|
||||
idc = 913592;
|
||||
x = X_gps + W_gps * 0.2;
|
||||
y = Y_gps + H_gps * 0.33;
|
||||
w = W_gps * 0.6;
|
||||
h = H_gps * 0.35;
|
||||
style = ST_CENTER;
|
||||
text = "012.3 115.1";
|
||||
colorBackground[] = {0,0,0,0};
|
||||
colorText[] = {0.247,0.251,0.157,1};
|
||||
shadowColo[] = {0,0,0,0};
|
||||
font = "EtelkaNarrowMediumPro";
|
||||
shadow = 0;
|
||||
sizeEx = 0.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
38
addons/map/MapTweaks.hpp
Normal file
38
addons/map/MapTweaks.hpp
Normal file
@ -0,0 +1,38 @@
|
||||
// Hide Bushes
|
||||
class Bush {
|
||||
icon = "";
|
||||
color[] = {0.450000, 0.640000, 0.330000, 0.0};
|
||||
size = 14;
|
||||
importance = "0.2 * 14 * 0.05";
|
||||
coefMin = 0.250000;
|
||||
coefMax = 4;
|
||||
};
|
||||
|
||||
// Hide Trees
|
||||
class SmallTree {
|
||||
icon = "";
|
||||
color[] = {0.450000, 0.640000, 0.330000, 0.0};
|
||||
size = 12;
|
||||
importance = "0.6 * 12 * 0.05";
|
||||
coefMin = 0.250000;
|
||||
coefMax = 4;
|
||||
};
|
||||
class Tree {
|
||||
icon = "";
|
||||
color[] = {0.450000, 0.640000, 0.330000, 0.0};
|
||||
size = 12;
|
||||
importance = "0.9 * 16 * 0.05";
|
||||
coefMin = 0.250000;
|
||||
coefMax = 4;
|
||||
};
|
||||
|
||||
class Legend {
|
||||
x = SafeZoneX+SafeZoneW-.340;
|
||||
y = SafeZoneY+SafeZoneH-.152;
|
||||
font = "PuristaMedium";
|
||||
w = .340;
|
||||
h = .152;
|
||||
sizeEx = 0.039210;
|
||||
colorBackground[] = {0.906000, 0.901000, 0.880000, 0.5};
|
||||
color[] = {0, 0, 0, 0.75};
|
||||
};
|
@ -1,7 +1,12 @@
|
||||
ace_map
|
||||
=======
|
||||
|
||||
Various tweaks to the in-game map.
|
||||
Various tweaks to the in-game map. Including:
|
||||
- Better map styling (countours, legend, hiding bushes and trees, etc).
|
||||
- Max zoom level (optional)
|
||||
- Map shaking while walking (optional)
|
||||
- Map illumination (optional)
|
||||
- Blufor tracker (optional)
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
@ -1,71 +1,22 @@
|
||||
// by CAA-Picard
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith{};
|
||||
ADDON = false;
|
||||
LOG(MSG_INIT);
|
||||
|
||||
// Init variables
|
||||
GVAR(mapVisableLastFrame) = false;
|
||||
GVAR(mapGpsShow) = true;
|
||||
// Calculate the maximum zoom allowed for this map
|
||||
call FUNC(determineZoom);
|
||||
|
||||
GVAR(mapTool_Shown) = 0;
|
||||
GVAR(mapTool_pos) = [0,0];
|
||||
GVAR(mapTool_angle) = 0;
|
||||
GVAR(mapTool_isDragging) = false;
|
||||
GVAR(mapTool_isRotating) = false;
|
||||
|
||||
GVAR(drawing_isDrawing) = false;
|
||||
GVAR(drawing_tempLineMarker) = [];
|
||||
GVAR(drawing_lineMarkers) = [];
|
||||
GVAR(drawing_drawColor) = "ColorBlack";
|
||||
GVAR(drawing_controls) = [36732, 36733, 36734, 36735, 36736, 36737];
|
||||
|
||||
//Probably need this spawn, because CBA_fnc_addPerFrameHandler doesn't work durring breifing.
|
||||
// This spawn is probably worth keeping, as pfh don't work natively on the briefing screen and IDK how reliable the hack we implemented for them is.
|
||||
// The thread dies as soon as the mission start, so it's not really compiting for scheduler space.
|
||||
[] spawn {
|
||||
_fnc_installMapEvents = {
|
||||
_d = _this;
|
||||
diag_log format ["Installing EH in display %1", _d];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseMoving", {_this call FUNC(handleMouseMove);}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call FUNC(handleMouseButton);}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonUp", {[0, _this] call FUNC(handleMouseButton)}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapToolMarkers);}];
|
||||
(finddisplay _d) displayAddEventHandler ["KeyDown", {_this call FUNC(handleKeyDown);}];
|
||||
};
|
||||
// Wait until the map display is detected
|
||||
waitUntil {(!isNull findDisplay 12)};
|
||||
|
||||
// Wait until the briefing map is detected
|
||||
// display = 37 for SP
|
||||
// display = 52 for host server on MP;
|
||||
// display = 53 for MP clients)
|
||||
waitUntil {(!isNull findDisplay 37) || (!isNull findDisplay 52) || (!isNull findDisplay 53) || (!isNull findDisplay 12)};
|
||||
GVAR(lastStillPosition) = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5];
|
||||
GVAR(lastStillTime) = time;
|
||||
GVAR(isShaking) = false;
|
||||
|
||||
if (isNull findDisplay 12) then {
|
||||
// Install event handlers on the map control of the briefing screen (control = 51)
|
||||
GVAR(drawing_syncMarkers) = true;
|
||||
if (!isNull findDisplay 52) then {
|
||||
52 call _fnc_installMapEvents;
|
||||
} else {
|
||||
if (!isNull findDisplay 53) then {
|
||||
53 call _fnc_installMapEvents;
|
||||
} else {
|
||||
37 call _fnc_installMapEvents;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
// Briefing screen was skipped; the player is JIP, create the markers defined during the briefing
|
||||
GVAR(drawing_syncMarkers) = false;
|
||||
{
|
||||
_x call FUNC(addLineMarker);
|
||||
} forEach GVAR(drawing_serverLineMarkers);
|
||||
};
|
||||
|
||||
// Wait until the main map display is detected (display = 12)
|
||||
waitUntil { !isNull findDisplay 12 };
|
||||
// Install event handlers on the map control and display (control = 51)
|
||||
GVAR(drawing_syncMarkers) = false;
|
||||
12 call _fnc_installMapEvents;
|
||||
|
||||
// Update the size and rotation of map tools
|
||||
[] call FUNC(updateMapToolMarkers);
|
||||
|
||||
[FUNC(mapStateUpdater), 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapEffects);}];
|
||||
};
|
||||
|
||||
ADDON = true;
|
||||
|
@ -1,35 +1,12 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
LOG(MSG_INIT);
|
||||
|
||||
PREP(addLineMarker);
|
||||
PREP(blueForceTrackingModule);
|
||||
PREP(blueForceTrackingUpdate);
|
||||
PREP(calculateMapScale);
|
||||
PREP(cancelDrawing);
|
||||
PREP(canDraw);
|
||||
PREP(canUseMapTools);
|
||||
PREP(canUseMapGPS);
|
||||
PREP(copyMapReceiveMarkers);
|
||||
PREP(copyMapRemoteSend);
|
||||
PREP(copyMapStart);
|
||||
PREP(handleKeyDown);
|
||||
PREP(handleMouseButton);
|
||||
PREP(handleMouseMove);
|
||||
PREP(handleMouseZChanged);
|
||||
PREP(isInsideMapTool);
|
||||
PREP(mapStateUpdater);
|
||||
PREP(openMapGps);
|
||||
PREP(openMapGpsUpdate);
|
||||
PREP(removeLineMarker);
|
||||
PREP(updateMapToolMarkers);
|
||||
PREP(updateLineMarker);
|
||||
|
||||
//Add Event Handlers:
|
||||
["drawing_removeLineMarker", FUNC(removeLineMarker) ] call EFUNC(common,addEventHandler);
|
||||
["drawing_addLineMarker", FUNC(addLineMarker) ] call EFUNC(common,addEventHandler);
|
||||
|
||||
["drawing_requestMarkers", FUNC(copyMapRemoteSend) ] call EFUNC(common,addEventHandler);
|
||||
["drawing_sendbackMarkers", FUNC(copyMapReceiveMarkers) ] call EFUNC(common,addEventHandler);
|
||||
PREP(determineMapLight);
|
||||
PREP(determineZoom);
|
||||
PREP(updateMapEffects);
|
||||
|
||||
ADDON = true;
|
||||
|
@ -1,6 +0,0 @@
|
||||
// by CAA-Picard
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(drawing_serverLineMarkers) = [];
|
||||
publicVariable QGVAR(drawing_serverLineMarkers);
|
@ -1,15 +1,15 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {"ACE_MapTools"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common", "ace_interaction"};
|
||||
author[] = {"KoffeinFlummi","CAA-Picard"};
|
||||
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common", "ace_interaction"};
|
||||
author[] = {"KoffeinFlummi","Rocko","CAA-Picard"};
|
||||
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
class RscControlsGroup;
|
||||
@ -28,10 +28,6 @@ class ACE_Settings {
|
||||
value = 1.0;
|
||||
typeName = "SCALAR";
|
||||
};
|
||||
class GVAR(EveryoneCanDrawOnBriefing) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
class GVAR(BFT_Enabled) {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
@ -40,116 +36,154 @@ class ACE_Settings {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
class GVAR(mapIllumination) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
class GVAR(mapShake) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
class GVAR(mapLimitZoom) {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
};
|
||||
|
||||
#include "MapGpsUI.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgMarkers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
|
||||
|
||||
class RscMapControl {
|
||||
sizeExGrid = 0.032;
|
||||
maxSatelliteAlpha = 0.5;
|
||||
|
||||
// From Arma 2
|
||||
colorTracks[] = {1.0,0.0,0.0,1};
|
||||
colorTracksFill[] = {1.0,1.0,0.0,1};
|
||||
colorRoads[] = {0.0,0.0,0.0,1};
|
||||
colorRoadsFill[] = {1,1,0,1};
|
||||
colorMainRoads[] = {0.0,0.0,0.0,1};
|
||||
colorMainRoadsFill[] = {1,0.6,0.4,1};
|
||||
colorRailWay[] = {0.8,0.2,0,1};
|
||||
|
||||
// From ACE2
|
||||
colorBackground[] = {0.929412, 0.929412, 0.929412, 1.0};
|
||||
colorOutside[] = {0.929412, 0.929412, 0.929412, 1.0};
|
||||
colorCountlines[] = {0.647059, 0.533333, 0.286275, 1};
|
||||
colorMainCountlines[] = {0.858824, 0, 0,1};
|
||||
colorForest[] = {0.6, 0.8, 0.2, 0.25};
|
||||
colorLevels[] = {0.0, 0.0, 0.0, 1.0};
|
||||
colorRocks[] = {0.50, 0.50, 0.50, 0.50};
|
||||
|
||||
sizeExLevel = 0.03;
|
||||
showCountourInterval = 1; // refs #13673
|
||||
|
||||
sizeExGrid = 0.032;
|
||||
};
|
||||
|
||||
// REGULAR MAP
|
||||
class RscDisplayMainMap {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
// Tweak map styling
|
||||
class controlsBackground {
|
||||
class CA_Map : RscMapControl {
|
||||
#include "MapTweaks.hpp"
|
||||
};
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// DIARY
|
||||
class RscDisplayDiary {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
class controls {
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
class controls {
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
};
|
||||
class CA_PlayerName: RscText {
|
||||
x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfilePicture: RscPicture {
|
||||
x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfileBackground: RscText {
|
||||
x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class Separator1: RscPicture {
|
||||
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
};
|
||||
};
|
||||
class CA_PlayerName: RscText {
|
||||
x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfilePicture: RscPicture {
|
||||
x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfileBackground: RscText {
|
||||
x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class Separator1: RscPicture {
|
||||
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// BRIEFING SCREEN
|
||||
class RscDisplayGetReady: RscDisplayMainMap {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscDisplayClientGetReady: RscDisplayGetReady {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscDisplayServerGetReady: RscDisplayGetReady {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -2,37 +2,37 @@
|
||||
|
||||
// Delete last set of markers (always)
|
||||
{
|
||||
deleteMarkerLocal _x;
|
||||
deleteMarkerLocal _x;
|
||||
} forEach GVAR(BFT_markers);
|
||||
|
||||
|
||||
if (GVAR(BFT_Enabled) and {(!isNil "ACE_player") and {alive ACE_player}}) then {
|
||||
|
||||
_groupsToDrawMarkers = [];
|
||||
_playerSide = call EFUNC(common,playerSide);
|
||||
_groupsToDrawMarkers = [];
|
||||
_playerSide = call EFUNC(common,playerSide);
|
||||
|
||||
if (GVAR(BFT_HideAiGroups)) then {
|
||||
_groupsToDrawMarkers = [allGroups, {side _this == _playerSide}] call EFUNC(common,filter);
|
||||
} else {
|
||||
_groupsToDrawMarkers = [allGroups, {
|
||||
_anyPlayers = {
|
||||
[_x] call EFUNC(common,isPlayer);
|
||||
} count units _this;
|
||||
(side _this == _playerSide) && _anyPlayers > 0
|
||||
}] call EFUNC(common,filter);
|
||||
};
|
||||
if !(GVAR(BFT_HideAiGroups)) then {
|
||||
_groupsToDrawMarkers = [allGroups, {side _this == _playerSide}] call EFUNC(common,filter);
|
||||
} else {
|
||||
_groupsToDrawMarkers = [allGroups, {
|
||||
_anyPlayers = {
|
||||
[_x] call EFUNC(common,isPlayer);
|
||||
} count units _this;
|
||||
(side _this == _playerSide) && _anyPlayers > 0
|
||||
}] call EFUNC(common,filter);
|
||||
};
|
||||
|
||||
{
|
||||
_markerType = [_x] call EFUNC(common,getMarkerType);
|
||||
|
||||
|
||||
{
|
||||
_markerType = [_x] call EFUNC(common,getMarkerType);
|
||||
_colour = format ["Color%1", side _x];
|
||||
|
||||
_colour = format ["Color%1", side _x];
|
||||
_marker = createMarkerLocal [format ["ACE_BFT_%1", _forEachIndex], [(getPos leader _x) select 0, (getPos leader _x) select 1]];
|
||||
_marker setMarkerTypeLocal _markerType;
|
||||
_marker setMarkerColorLocal _colour;
|
||||
_marker setMarkerTextLocal (groupID _x);
|
||||
|
||||
_marker = createMarkerLocal [format ["ACE_BFT_%1", _i], [(getPos leader _x) select 0, (getPos leader _x) select 1]];
|
||||
_marker setMarkerTypeLocal _markerType;
|
||||
_marker setMarkerColorLocal _colour;
|
||||
_marker setMarkerTextLocal (groupID _x);
|
||||
|
||||
GVAR(BFT_markers) pushBack _marker;
|
||||
} forEach _groupsToDrawMarkers;
|
||||
GVAR(BFT_markers) pushBack _marker;
|
||||
} forEach _groupsToDrawMarkers;
|
||||
};
|
||||
|
144
addons/map/functions/fnc_determineMapLight.sqf
Normal file
144
addons/map/functions/fnc_determineMapLight.sqf
Normal file
@ -0,0 +1,144 @@
|
||||
/*
|
||||
* Author: Rocko and CAA-Picard
|
||||
* Calculates the current map illumination for a given unit
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* 0: Does the map needs shading? <BOOL>
|
||||
* 1: Color of the overlay <ARRAY>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_1_PVT(_this,_unit);
|
||||
|
||||
private ["_isEnclosed","_nearObjects","_light","_ll","_flashlight"];
|
||||
|
||||
// Blend two colors
|
||||
_fnc_blendColor = {
|
||||
EXPLODE_3_PVT(_this,_c1,_c2,_alpha);
|
||||
[(_c1 select 0) * (1 - _alpha) + (_c2 select 0) * _alpha,
|
||||
(_c1 select 1) * (1 - _alpha) + (_c2 select 1) * _alpha,
|
||||
(_c1 select 2) * (1 - _alpha) + (_c2 select 2) * _alpha,
|
||||
(_c1 select 3) * (1 - _alpha) + (_c2 select 3) * _alpha]
|
||||
};
|
||||
|
||||
// Ambient light tint depending on time of day
|
||||
_lightTint = switch (true) do {
|
||||
case (sunOrMoon == 1.0) : { [0.5,0.5,0.5,1] };
|
||||
case (sunOrMoon > 0.80) : {[[1.0 - overcast,0.2,0,1], [1,1,1,1], (sunOrMoon - 0.8)/0.2] call _fnc_blendColor};
|
||||
case (sunOrMoon > 0.50) : {[[0,0,0.1,1], [1.0 - overcast,0.2,0,1], (sunOrMoon - 0.5)/0.3] call _fnc_blendColor};
|
||||
case (sunOrMoon <= 0.5) : { [0,0,0.1,1] };
|
||||
};
|
||||
|
||||
// Calculates overlay color from tint and light level
|
||||
_fnc_calcColor = {
|
||||
EXPLODE_2_PVT(_this,_c1,_lightLevel);
|
||||
|
||||
if (_lightLevel < 0.5) then {
|
||||
_l = _lightLevel / 0.5;
|
||||
[(_c1 select 0) * _l,
|
||||
(_c1 select 1) * _l,
|
||||
(_c1 select 2) * _l,
|
||||
(_c1 select 3) * (1 - _lightLevel)]
|
||||
} else {
|
||||
_l = (_lightLevel - 0.5) / 0.5;
|
||||
[(_c1 select 0) * (1 - _l) + _l,
|
||||
(_c1 select 1) * (1 - _l) + _l,
|
||||
(_c1 select 2) * (1 - _l) + _l,
|
||||
(_c1 select 3) * (1 - _lightLevel)]
|
||||
};
|
||||
};
|
||||
|
||||
_lightLevel = 0.04 + (0.96 * call EFUNC(common,ambientBrightness));
|
||||
|
||||
// check if player has NVG enabled
|
||||
if (currentVisionMode _unit == 1) exitWith {
|
||||
// stick to nvg color
|
||||
[true, [154/255,253/255,177/255,0.5]]
|
||||
};
|
||||
|
||||
// Do not obscure the map if the ambient light level is above 0.95
|
||||
if (_lightLevel > 0.95) exitWith {
|
||||
[false, [0.5,0.5,0.5,0]]
|
||||
};
|
||||
|
||||
// Do not obscure the map if the player is on a enclosed vehicle (assume internal illumination)
|
||||
if (vehicle _unit != _unit) then {
|
||||
// Player is in a vehicle
|
||||
if ((vehicle _unit) isKindOf "Tank") then {
|
||||
_isEnclosed = true;
|
||||
};
|
||||
};
|
||||
if (_isEnclosed) exitWith {
|
||||
TRACE_1("Player in a enclosed vehicle","");
|
||||
[false, [1,1,1,0]]
|
||||
};
|
||||
|
||||
// Player is not in a vehicle
|
||||
TRACE_1("Player is on foot or in an open vehicle","");
|
||||
|
||||
// Check if player is near a campfires, lights or vehicles with lights on - 15m
|
||||
_nearObjects = [nearestObjects [_unit, ["All"], 15], {(inflamed _this) || (isLightOn _this)}] call EFUNC(common,filter);
|
||||
if (count (_nearObjects) > 0) then {
|
||||
_light = _nearObjects select 0;
|
||||
|
||||
_ll = (1 - (((((_unit distance _light) - 5)/10) max 0) min 1));
|
||||
if (_ll > _lightLevel) then {
|
||||
_lightLevel = _ll;
|
||||
TRACE_1("player near campfire","");
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// Gun with light
|
||||
_nearObjects = [nearestObjects [_unit, ["CAManBase"], 10], { _this isFlashlightOn (currentWeapon _this)}] call EFUNC(common,filter);
|
||||
if (count (_nearObjects) > 0) then {
|
||||
_light = (_nearObjects select 0);
|
||||
_flashlight = (_light weaponAccessories currentMuzzle _light) select 1;
|
||||
|
||||
// Check if it's a day laser
|
||||
if (_flashlight == "ACE_acc_pointer_red") exitWith {};
|
||||
if (_flashlight == "ACE_acc_pointer_green") exitWith {};
|
||||
|
||||
_lightLevel = _lightLevel max (1 - (((((_unit distance _light) - 2)/8) max 0) min 1));
|
||||
TRACE_1("Using gun light","");
|
||||
};
|
||||
|
||||
|
||||
// @todo: Illumination flares (timed)
|
||||
|
||||
|
||||
// Using chemlights
|
||||
_nearObjects = [_unit nearObjects ["SmokeShell", 4], {
|
||||
alive _this && {(typeOf _this == "Chemlight_red") || {
|
||||
(typeOf _this == "Chemlight_green") || {
|
||||
(typeOf _this == "Chemlight_blue") || {
|
||||
(typeOf _this == "Chemlight_yellow")}}}}}] call EFUNC(common,filter);
|
||||
if (count (_nearObjects) > 0) then {
|
||||
_light = _nearObjects select 0;
|
||||
|
||||
_ll = (1 - ((((_unit distance _light) - 2)/2) max 0)) * 0.4;
|
||||
if (_ll > _lightLevel) then {
|
||||
_flareTint = switch (typeOf _light) do {
|
||||
case "Chemlight_red" : {[1,0,0,1]};
|
||||
case "Chemlight_green" : {[0,1,0,1]};
|
||||
case "Chemlight_blue" : {[0,0,1,1]};
|
||||
case "Chemlight_yellow" : {[1,1,0,1]};
|
||||
};
|
||||
_lightTint = [_lightTint, _flareTint, (_ll - _lightLevel)/(1 - _lightLevel)] call _fnc_blendColor;
|
||||
_lightLevel = _ll;
|
||||
TRACE_1("player near chemlight","");
|
||||
};
|
||||
};
|
||||
|
||||
// Do not obscure the map if the ambient light level is above 0.95
|
||||
if (_lightLevel > 0.95) exitWith {
|
||||
[false, [0.5,0.5,0.5,0]]
|
||||
};
|
||||
|
||||
// Calculate resulting map color
|
||||
[true, [_lightTint, _lightLevel] call _fnc_calcColor]
|
43
addons/map/functions/fnc_determineZoom.sqf
Normal file
43
addons/map/functions/fnc_determineZoom.sqf
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Author: Rocko
|
||||
* Calculate the maximum zoom level allowed for the current map
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_grids", "_fourSize", "_sixSize", "_continue", "_size"];
|
||||
_grids = configFile >> "CfgWorlds" >> worldName >> "Grid";
|
||||
_fourSize = -1;
|
||||
_sixSize = -1;
|
||||
for "_i" from 1 to 10 do {
|
||||
_continue = false;
|
||||
if (isClass(_grids >> format["Zoom%1", _i])) then {
|
||||
_continue = true;
|
||||
_size = getText(_grids >> format["Zoom%1", _i] >> "formatX");
|
||||
if ((count toArray(_size)) == 2) then {
|
||||
_fourSize = getNumber(_grids >> format["Zoom%1", _i] >> "zoomMax");
|
||||
};
|
||||
if ((count toArray(_size)) == 3) then {
|
||||
_sixSize = getNumber(_grids >> format["Zoom%1", _i] >> "zoomMax");
|
||||
};
|
||||
if (_fourSize != -1 && {_sixSize != -1}) then {
|
||||
_continue = false;
|
||||
};
|
||||
};
|
||||
if (!_continue) exitWith {};
|
||||
};
|
||||
|
||||
if(_fourSize != -1 && {_sixSize != -1}) then {
|
||||
if (isNil QGVAR(minMapSize)) then {
|
||||
GVAR(minMapSize) = _sixSize + 0.01
|
||||
} else {
|
||||
GVAR(minMapSize) = -1
|
||||
};
|
||||
};
|
78
addons/map/functions/fnc_updateMapEffects.sqf
Normal file
78
addons/map/functions/fnc_updateMapEffects.sqf
Normal file
@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Author: Rocko and CAA-Picard
|
||||
* On map draw, updates the effects
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_mapCtrl","_mapScale"];
|
||||
|
||||
_mapCtrl = ((findDisplay 12) displayCtrl 51);
|
||||
_mapScale = ctrlMapScale _mapCtrl;
|
||||
|
||||
if (GVAR(mapIllumination)) then {
|
||||
private ["_data","_darkenFill"];
|
||||
|
||||
// Calculate map illumination
|
||||
_data = [[ACE_player], FUNC(determineMapLight), missionNamespace, QGVAR(mapLight), 0.1] call EFUNC(common,cachedCall);
|
||||
|
||||
EXPLODE_2_PVT(_data,_darkenMap,_darkenColor);
|
||||
if (_darkenMap) then {
|
||||
_darkenFill = format["#(rgb,1,1,1)color(%1,%2,%3,%4)",_darkenColor select 0, _darkenColor select 1, _darkenColor select 2, _darkenColor select 3];
|
||||
_mapCtrl drawRectangle [(getArray(configFile >> 'CfgWorlds' >> worldName >> 'centerPosition')),80000,80000,0,_darkenColor,_darkenFill];
|
||||
};
|
||||
};
|
||||
|
||||
if (GVAR(mapShake)) then {
|
||||
private ["_speed","_amplitude", "_time", "_shakePos"];
|
||||
|
||||
// Only shake map while moving on foot
|
||||
_speed = 0;
|
||||
if (vehicle ACE_player == ACE_player) then {
|
||||
_speed = vectorMagnitude (velocity ACE_player);
|
||||
};
|
||||
|
||||
// If speed is large enough, create anims to shake map
|
||||
if (_speed > 0.1) then {
|
||||
if (ctrlMapAnimDone _mapCtrl) then {
|
||||
|
||||
_amplitude = (_speed - 0.1) / 5 * (1000 * _mapScale);
|
||||
_time = 0.1;
|
||||
|
||||
_shakePos = [(GVAR(lastStillPosition) select 0) + sin((time + _time - GVAR(lastStillTime))*100) * _amplitude * 0.25,
|
||||
(GVAR(lastStillPosition) select 1) + sin((time + _time - GVAR(lastStillTime))*260) * _amplitude];
|
||||
|
||||
_mapCtrl ctrlMapAnimAdd [_time, _mapScale, _shakePos];
|
||||
ctrlMapAnimCommit _mapCtrl;
|
||||
|
||||
GVAR(isShaking) = true;
|
||||
};
|
||||
} else {
|
||||
if (GVAR(isShaking)) then {
|
||||
// Stop shaking, return to original position
|
||||
_mapCtrl ctrlMapAnimAdd [0, _mapScale, GVAR(lastStillPosition)];
|
||||
ctrlMapAnimCommit _mapCtrl;
|
||||
GVAR(isShaking) = false;
|
||||
} else {
|
||||
// The map is still, store state
|
||||
ctrlMapAnimClear _mapCtrl;
|
||||
GVAR(lastStillPosition) = _mapCtrl ctrlMapScreenToWorld [0.5, 0.5];
|
||||
GVAR(lastStillTime) = time;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (GVAR(mapLimitZoom)) then {
|
||||
if (GVAR(minMapSize) >= _mapScale) then {
|
||||
ctrlMapAnimClear _mapCtrl;
|
||||
_mapCtrl ctrlMapAnimAdd [0, GVAR(minMapSize) + 0.001, (_mapCtrl ctrlMapScreenToWorld [0.5, 0.5])];
|
||||
ctrlMapAnimCommit _mapCtrl;
|
||||
};
|
||||
};
|
@ -2,147 +2,6 @@
|
||||
<!-- Edited with tabler - 2014-12-22 -->
|
||||
<Project name="ACE">
|
||||
<Package name="Map">
|
||||
<Key ID="STR_ACE_MapTools_Name">
|
||||
<English>Map Tools</English>
|
||||
<Spanish>Herramientas de mapa</Spanish>
|
||||
<French>Outils de navigation</French>
|
||||
<Polish>Narzędzia nawigacyjne</Polish>
|
||||
<German>Kartenwerkzeug</German>
|
||||
<Czech>Pomůcky k Mapě</Czech>
|
||||
<Italian>Strumenti Cartografici</Italian>
|
||||
<Portuguese>Ferramentas de Mapa</Portuguese>
|
||||
<Hungarian>Térképészeti eszközök</Hungarian>
|
||||
<Russian>Инструменты карты</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_MapTools_Description">
|
||||
<English>The Map Tools allow you to measure distances and angles on the map.</English>
|
||||
<Spanish>Las herramientas de mapa permiten medir distancias y ángulos en el mapa.</Spanish>
|
||||
<French>Les outils de navigation permettent de mesurer des distances et des angles sur la carte.</French>
|
||||
<Polish>Narzędzia nawigacyjne pozwalają na mierzenie odległości i kątów na mapie.</Polish>
|
||||
<German>Das Kartenwerkzeug erlaubt es dir, Distanzen und Winkel zu messen.</German>
|
||||
<Czech>Pomůcky k mapě slouží k měření vzdáleností a úhlů na mapě.</Czech>
|
||||
<Italian>Gli Strumenti Cartografici ti consentono di misurare distanze ed angoli sulla mappa.</Italian>
|
||||
<Portuguese>As Ferramentas de Mapa permitem que você meça distâncias e ângulos no mapa.</Portuguese>
|
||||
<Hungarian>A térképészeti eszközökkel távolságokat és szögeket tud mérni a térképen.</Hungarian>
|
||||
<Russian>Картографические инструменты позволяют измерять расстояния и углы на карте.</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MapTools_Menu">
|
||||
<English>Map Tools >></English>
|
||||
<Spanish>Herramientas de mapa >></Spanish>
|
||||
<French>Outils de navigation >></French>
|
||||
<Polish>Narzędzia nawigacyjne >></Polish>
|
||||
<German>Kartenwerkzeug >></German>
|
||||
<Czech>Pomůcky k Mapě >></Czech>
|
||||
<Italian>Strumenti Cartografici >></Italian>
|
||||
<Portuguese>Ferramentas de Mapa >></Portuguese>
|
||||
<Hungarian>Térképészeti eszközök >></Hungarian>
|
||||
<Russian>Инструменты карты >></Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MapToolsHide">
|
||||
<English>Hide Map Tool</English>
|
||||
<German>Verstecke Kartenwerkzeug</German>
|
||||
<Spanish>Ocultar herr. de mapa</Spanish>
|
||||
<French>Ranger les outils</French>
|
||||
<Italian>Nascondi Strumenti Cartografici</Italian>
|
||||
<Portuguese>Ocultar Ferramenta de Mapa</Portuguese>
|
||||
<Hungarian>Térképészeti eszközök elrejtése</Hungarian>
|
||||
<Polish>Ukryj narzędzia nawigacyjne</Polish>
|
||||
<Czech>Schovat pomůcku k mapě</Czech>
|
||||
<Russian>Скрыть инструменты</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MapToolsShowNormal">
|
||||
<English>Show Normal Map Tool</English>
|
||||
<German>Zeige Kartenwerkzeug (normal)</German>
|
||||
<Spanish>Mostrar herr. de mapa normal</Spanish>
|
||||
<French>Montrer outils normaux</French>
|
||||
<Italian>Visualizza Strumenti Cartografici standard</Italian>
|
||||
<Portuguese>Mostrar Ferramenta de Mapa Padrão</Portuguese>
|
||||
<Hungarian>Térképészeti eszköz megjelenítése (normál méret)</Hungarian>
|
||||
<Polish>Pokaż normalne narzędzia nawigacyjne</Polish>
|
||||
<Czech>Zobrazit normální pomůcku k mapě</Czech>
|
||||
<Russian>Показать инструменты (средн. размер)</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MapToolsShowSmall">
|
||||
<English>Show Small Map Tool</English>
|
||||
<German>Zeige Kartenwerkzeug (klein)</German>
|
||||
<Spanish>Mostrar herr. de mapa pequeñas</Spanish>
|
||||
<French>Montrer petits outils</French>
|
||||
<Italian>Visualizza Strumenti Cartografici piccoli</Italian>
|
||||
<Portuguese>Mostrar Ferramenta de Mapa Pequena</Portuguese>
|
||||
<Hungarian>Térképészeti eszköz megjelenítése (kicsinyített)</Hungarian>
|
||||
<Polish>Pokaż pomniejszone narzędzia nawigacyjne</Polish>
|
||||
<Czech>Zobrazit malou pomůcku k mapě</Czech>
|
||||
<Russian>Показать инструменты (малый размер)</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MapToolsAlignNorth">
|
||||
<English>Align Map Tool to North</English>
|
||||
<German>Kartenwerkzeug nach Norden ausrichten</German>
|
||||
<Spanish>Alinear herr. de mapa al norte</Spanish>
|
||||
<French>Aligner au nord</French>
|
||||
<Italian>Allinea gli Strumenti Cartografici con il Nord</Italian>
|
||||
<Portuguese>Alinhar Ferramenta de Mapa com o Norte</Portuguese>
|
||||
<Hungarian>Térképészeti eszköz Északhoz állítása</Hungarian>
|
||||
<Polish>Wyrównaj linijkę do północy</Polish>
|
||||
<Czech>Srovnat pomůcku k mapě na sever</Czech>
|
||||
<Russian>Выровнять инструменты на север</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MapToolsAlignCompass">
|
||||
<English>Align Map Tool to Compass</English>
|
||||
<German>Kartenwerkzeug am Kompass ausrichten</German>
|
||||
<Spanish>Alinear herr. de mapa a la brújula</Spanish>
|
||||
<French>Aligner sur la boussole</French>
|
||||
<Italian>Allinea gli Strumenti Cartografici con la bussola</Italian>
|
||||
<Portuguese>Alinhar Ferramenta de Mapa com a Bússola</Portuguese>
|
||||
<Hungarian>Térképészeti eszköz iránytűhöz állítása</Hungarian>
|
||||
<Polish>Wyrównaj linijkę do kompasu</Polish>
|
||||
<Czech>Srovnat pomůcku k mapě ke kompasu</Czech>
|
||||
<Russian>Выровнять инструменты по компасу</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MapGpsShow">
|
||||
<English>Show GPS on Map</English>
|
||||
<German>Zeige GPS auf der Karte</German>
|
||||
<Spanish>Mostrar el GPS sobre el mapa</Spanish>
|
||||
<French>Ranger le GPS</French>
|
||||
<Italian>Visualizza il GPS sulla mappa</Italian>
|
||||
<Portuguese>Mostrar GPS no Mapa</Portuguese>
|
||||
<Hungarian>GPS megjelnítése a térképen</Hungarian>
|
||||
<Polish>Pokaż GPS na mapie</Polish>
|
||||
<Czech>Zobrazit GPS na mapě</Czech>
|
||||
<Russian>Показать GPS на карте</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MapGpsHide">
|
||||
<English>Hide GPS on Map</English>
|
||||
<German>Verstecke GPS auf der Karte</German>
|
||||
<Spanish>Ocultar el GPS del mapa</Spanish>
|
||||
<French>Montrer le GPS</French>
|
||||
<Italian>Nascondi il GPS sulla mappa</Italian>
|
||||
<Portuguese>Ocultar GPS no Mapa</Portuguese>
|
||||
<Hungarian>GPS elrejtése térképről</Hungarian>
|
||||
<Polish>Ukryj GPS na mapie</Polish>
|
||||
<Czech>Schovat GPS na mapě</Czech>
|
||||
<Russian>Скрыть GPS на карте</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_CopyMap">
|
||||
<English>Copy Map</English>
|
||||
<German>Karte kopieren</German>
|
||||
<Spanish>Copiar mapa</Spanish>
|
||||
<Russian>Скопировать карту</Russian>
|
||||
<Polish>Kopiuj oznaczenia mapy</Polish>
|
||||
<French>Copier la carte</French>
|
||||
<Czech>Zkopírovat mapu</Czech>
|
||||
<Italian>Copiare Carta</Italian>
|
||||
<Hungarian>Térkép másolása</Hungarian>
|
||||
<Portuguese>Copiar Mapa</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Map_MarkerDirection">
|
||||
<English>Direction: %1°</English>
|
||||
<German>Drehung: %1°</German>
|
||||
<French>Direction: %1°</French>
|
||||
<Czech>Směr: %1°</Czech>
|
||||
<Polish>Kierunek: %1°</Polish>
|
||||
<Spanish>Dirección: %1°</Spanish>
|
||||
<Hungarian>Irány: %1</Hungarian>
|
||||
<Russian>Направление:%1</Russian>
|
||||
</Key>
|
||||
|
||||
</Package>
|
||||
</Project>
|
1
addons/maptools/$PBOPREFIX$
Normal file
1
addons/maptools/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\Addons\map
|
11
addons/maptools/CfgEventHandlers.hpp
Normal file
11
addons/maptools/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,11 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
clientInit = QUOTE( call COMPILE_FILE(XEH_postInitClient) );
|
||||
};
|
||||
};
|
26
addons/maptools/CfgMarkers.hpp
Normal file
26
addons/maptools/CfgMarkers.hpp
Normal file
@ -0,0 +1,26 @@
|
||||
// MARKERS
|
||||
class CfgMarkers {
|
||||
class ACE_MapToolFixed {
|
||||
name = "MapToolFixed";
|
||||
icon = PATHTOF(data\mapToolFixed.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class ACE_MapToolRotatingNormal {
|
||||
name = "MapToolRotating";
|
||||
icon = PATHTOF(data\mapToolRotatingNormal.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class ACE_MapToolRotatingSmall {
|
||||
name = "MapToolRotating";
|
||||
icon = PATHTOF(data\mapToolRotatingSmall.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
};
|
128
addons/maptools/CfgVehicles.hpp
Normal file
128
addons/maptools/CfgVehicles.hpp
Normal file
@ -0,0 +1,128 @@
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
|
||||
class ACE_MapTools {
|
||||
displayName = "$STR_ACE_MapTools_MapTools_Menu";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) || {call FUNC(canUseMapGPS)}));
|
||||
statement = "";
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 100;
|
||||
enableInside = 1;
|
||||
|
||||
class ACE_MapToolsHide {
|
||||
displayName = "$STR_ACE_MapTools_MapToolsHide";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 0; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 5;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsShowNormal {
|
||||
displayName = "$STR_ACE_MapTools_MapToolsShowNormal";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 1}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 1; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 4;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsShowSmall {
|
||||
displayName = "$STR_ACE_MapTools_MapToolsShowSmall";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 2}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 2; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 3;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsAlignNorth {
|
||||
displayName = "$STR_ACE_MapTools_MapToolsAlignNorth";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
||||
statement = QUOTE(GVAR(mapTool_angle) = 0; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsAlignCompass {
|
||||
displayName = "$STR_ACE_MapTools_MapToolsAlignCompass";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0} && {('ItemCompass' in assigneditems ACE_player) || {'ItemCompass' in assigneditems ACE_player}}));
|
||||
statement = QUOTE(GVAR(mapTool_angle) = getDir ACE_player; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapGpsShow {
|
||||
displayName = "$STR_ACE_MapTools_MapGpsShow";
|
||||
condition = QUOTE((call FUNC(canUseMapGPS) && {!GVAR(mapGpsShow)}));
|
||||
statement = QUOTE(GVAR(mapGpsShow) = true; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapGpsHide {
|
||||
displayName = "$STR_ACE_MapTools_MapGpsHide";
|
||||
condition = QUOTE((call FUNC(canUseMapGPS) && {GVAR(mapGpsShow)}));
|
||||
statement = QUOTE(GVAR(mapGpsShow) = false; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
class ACE_CopyMap {
|
||||
displayName = "$STR_ACE_MapTools_CopyMap";
|
||||
condition = QUOTE(([_target] call EFUNC(common,isPlayer) && {'ItemMap' in assigneditems _player} && {'ACE_MapTools' in items _player} && {'ItemMap' in assignedItems _target}));
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(copyMapStart));
|
||||
showDisabled = 0;
|
||||
priority = -1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class NATO_Box_Base;
|
||||
class EAST_Box_Base;
|
||||
class IND_Box_Base;
|
||||
class FIA_Box_Base_F;
|
||||
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_FIA_Support_F: FIA_Box_Base_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
};
|
15
addons/maptools/CfgWeapons.hpp
Normal file
15
addons/maptools/CfgWeapons.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
class CfgWeapons {
|
||||
class ACE_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
|
||||
class ACE_MapTools: ACE_ItemCore {
|
||||
displayName = "$STR_ACE_MapTools_Name";
|
||||
descriptionShort = "$STR_ACE_MapTools_Description";
|
||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||
picture = PATHTOF(UI\maptool_item.paa);
|
||||
scope = 2;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
};
|
||||
};
|
||||
};
|
80
addons/maptools/MapControls.hpp
Normal file
80
addons/maptools/MapControls.hpp
Normal file
@ -0,0 +1,80 @@
|
||||
class controls {
|
||||
class CA_PlayerName: RscText {
|
||||
x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfilePicture: RscPicture {
|
||||
x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfileBackground: RscText {
|
||||
x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class Separator1: RscPicture {
|
||||
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ColorBlack: RscButton {
|
||||
idc = 36732;
|
||||
x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {0,0,0,1};
|
||||
colorFocused[] = {0,0,0,1};
|
||||
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorBlack')]);
|
||||
};
|
||||
class ColorRed: RscButton {
|
||||
idc = 36733;
|
||||
x = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {1,0,0,1};
|
||||
colorFocused[] = {1,0,0,1};
|
||||
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorRed')]);
|
||||
};
|
||||
class ColorGreen: RscButton {
|
||||
idc = 36734;
|
||||
x = "0.6 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {0,1,0,1};
|
||||
colorFocused[] = {0,1,0,1};
|
||||
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorGreen')]);
|
||||
};
|
||||
class ColorBlue: RscButton {
|
||||
idc = 36735;
|
||||
x = "0.9 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.8,1};
|
||||
colorBackgroundActive[] = {0,0,1,1};
|
||||
colorFocused[] = {0,0,1,1};
|
||||
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorBlue')]);
|
||||
};
|
||||
class ColorYellow: RscButton {
|
||||
idc = 36736;
|
||||
x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {1,1,0,1};
|
||||
colorFocused[] = {1,1,0,1};
|
||||
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorYellow')]);
|
||||
};
|
||||
class ColorWhite: RscButton {
|
||||
idc = 36737;
|
||||
x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.8,1};
|
||||
colorBackgroundActive[] = {1,1,1,1};
|
||||
colorFocused[] = {1,1,1,1};
|
||||
onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QUOTE(QGVAR(drawing_drawColor)),'ColorWhite')]);
|
||||
};
|
||||
};
|
79
addons/maptools/MapGpsUI.hpp
Normal file
79
addons/maptools/MapGpsUI.hpp
Normal file
@ -0,0 +1,79 @@
|
||||
#define GUI_GRID_X (0)
|
||||
#define GUI_GRID_Y (0)
|
||||
#define GUI_GRID_W (0.025)
|
||||
#define GUI_GRID_H (0.04)
|
||||
|
||||
#define ST_LEFT 0x00
|
||||
#define ST_RIGHT 0x01
|
||||
#define ST_CENTER 0x02
|
||||
|
||||
#define W_gps 0.4025
|
||||
#define H_gps 0.25
|
||||
#define X_gps safeZoneX + safeZoneW - 1.1 * W_gps
|
||||
#define Y_gps safeZoneY + safeZoneH - 1.2 * H_gps
|
||||
|
||||
class RscTitles {
|
||||
class RscACE_MapGps {
|
||||
idd = 9855;
|
||||
movingEnable = 1;
|
||||
duration = 3600;
|
||||
fadein = 0;
|
||||
fadeout = 0;
|
||||
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ui_mapGpsDisplay)), _this select 0)];);
|
||||
class controls {
|
||||
class back:RscPicture {
|
||||
x = X_gps;
|
||||
y = Y_gps;
|
||||
w = W_gps;
|
||||
h = H_gps;
|
||||
text = PATHTOF(UI\mapGps.paa);
|
||||
colorBackground[] = {1, 1, 1, 1};
|
||||
};
|
||||
class heading: RscText{
|
||||
idc = 913590;
|
||||
x = X_gps + W_gps * 0.25;
|
||||
y = Y_gps + H_gps * 0.12;
|
||||
w = W_gps * 0.2;
|
||||
h = H_gps * 0.16;
|
||||
style = ST_LEFT;
|
||||
text = "225";
|
||||
colorBackground[] = {0,0,0,0};
|
||||
colorText[] = {0.247,0.251,0.157,1};
|
||||
shadowColo[] = {0,0,0,0};
|
||||
font = "EtelkaNarrowMediumPro";
|
||||
shadow = 0;
|
||||
sizeEx = 0.042;
|
||||
};
|
||||
class altitude: RscText{
|
||||
idc = 913591;
|
||||
x = X_gps + W_gps * 0.55;
|
||||
y = Y_gps + H_gps * 0.12;
|
||||
w = W_gps * 0.2;
|
||||
h = H_gps * 0.16;
|
||||
style = ST_RIGHT;
|
||||
text = "55 m";
|
||||
colorBackground[] = {0,0,0,0};
|
||||
colorText[] = {0.247,0.251,0.157,1};
|
||||
shadowColo[] = {0,0,0,0};
|
||||
font = "EtelkaNarrowMediumPro";
|
||||
shadow = 0;
|
||||
sizeEx = 0.042;
|
||||
};
|
||||
class coordinates: RscText{
|
||||
idc = 913592;
|
||||
x = X_gps + W_gps * 0.2;
|
||||
y = Y_gps + H_gps * 0.33;
|
||||
w = W_gps * 0.6;
|
||||
h = H_gps * 0.35;
|
||||
style = ST_CENTER;
|
||||
text = "012.3 115.1";
|
||||
colorBackground[] = {0,0,0,0};
|
||||
colorText[] = {0.247,0.251,0.157,1};
|
||||
shadowColo[] = {0,0,0,0};
|
||||
font = "EtelkaNarrowMediumPro";
|
||||
shadow = 0;
|
||||
sizeEx = 0.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
14
addons/maptools/README.md
Normal file
14
addons/maptools/README.md
Normal file
@ -0,0 +1,14 @@
|
||||
ace_maptools
|
||||
============
|
||||
|
||||
Map tools:
|
||||
- Roamer
|
||||
- Map drawing
|
||||
- Showing GPS on map
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
||||
- [esteldunedain](https://github.com/esteldunedain)
|
||||
- [NouberNou](https://github.com/NouberNou)
|
BIN
addons/maptools/UI/IconBFTracking_ca.paa
Normal file
BIN
addons/maptools/UI/IconBFTracking_ca.paa
Normal file
Binary file not shown.
71
addons/maptools/XEH_postInitClient.sqf
Normal file
71
addons/maptools/XEH_postInitClient.sqf
Normal file
@ -0,0 +1,71 @@
|
||||
// by CAA-Picard
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
// Init variables
|
||||
GVAR(mapVisableLastFrame) = false;
|
||||
GVAR(mapGpsShow) = true;
|
||||
|
||||
GVAR(mapTool_Shown) = 0;
|
||||
GVAR(mapTool_pos) = [0,0];
|
||||
GVAR(mapTool_angle) = 0;
|
||||
GVAR(mapTool_isDragging) = false;
|
||||
GVAR(mapTool_isRotating) = false;
|
||||
|
||||
GVAR(drawing_isDrawing) = false;
|
||||
GVAR(drawing_tempLineMarker) = [];
|
||||
GVAR(drawing_lineMarkers) = [];
|
||||
GVAR(drawing_drawColor) = "ColorBlack";
|
||||
GVAR(drawing_controls) = [36732, 36733, 36734, 36735, 36736, 36737];
|
||||
|
||||
// This spawn is probably worth keeping, as pfh don't work natively on the briefing screen and IDK how reliable the hack we implemented for them is.
|
||||
// The thread dies as soon as the mission start, so it's not really compiting for scheduler space.
|
||||
[] spawn {
|
||||
_fnc_installMapEvents = {
|
||||
_d = _this;
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseMoving", {_this call FUNC(handleMouseMove);}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call FUNC(handleMouseButton);}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonUp", {[0, _this] call FUNC(handleMouseButton)}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapToolMarkers);}];
|
||||
(finddisplay _d) displayAddEventHandler ["KeyDown", {_this call FUNC(handleKeyDown);}];
|
||||
};
|
||||
|
||||
// Wait until the briefing map is detected
|
||||
// display = 37 for SP
|
||||
// display = 52 for host server on MP;
|
||||
// display = 53 for MP clients)
|
||||
waitUntil {(!isNull findDisplay 37) || (!isNull findDisplay 52) || (!isNull findDisplay 53) || (!isNull findDisplay 12)};
|
||||
|
||||
if (isNull findDisplay 12) then {
|
||||
// Install event handlers on the map control of the briefing screen (control = 51)
|
||||
GVAR(drawing_syncMarkers) = true;
|
||||
if (!isNull findDisplay 52) then {
|
||||
52 call _fnc_installMapEvents;
|
||||
} else {
|
||||
if (!isNull findDisplay 53) then {
|
||||
53 call _fnc_installMapEvents;
|
||||
} else {
|
||||
37 call _fnc_installMapEvents;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
// Briefing screen was skipped; the player is JIP, create the markers defined during the briefing
|
||||
GVAR(drawing_syncMarkers) = false;
|
||||
{
|
||||
_x call FUNC(addLineMarker);
|
||||
} forEach GVAR(drawing_serverLineMarkers);
|
||||
};
|
||||
|
||||
// Wait until the main map display is detected (display = 12)
|
||||
waitUntil { !isNull findDisplay 12 };
|
||||
// Install event handlers on the map control and display (control = 51)
|
||||
GVAR(drawing_syncMarkers) = false;
|
||||
12 call _fnc_installMapEvents;
|
||||
|
||||
// Update the size and rotation of map tools
|
||||
[] call FUNC(updateMapToolMarkers);
|
||||
|
||||
[FUNC(mapStateUpdater), 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
38
addons/maptools/XEH_preInit.sqf
Normal file
38
addons/maptools/XEH_preInit.sqf
Normal file
@ -0,0 +1,38 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(addLineMarker);
|
||||
PREP(calculateMapScale);
|
||||
PREP(cancelDrawing);
|
||||
PREP(canDraw);
|
||||
PREP(canUseMapTools);
|
||||
PREP(canUseMapGPS);
|
||||
PREP(copyMapReceiveMarkers);
|
||||
PREP(copyMapRemoteSend);
|
||||
PREP(copyMapStart);
|
||||
PREP(handleKeyDown);
|
||||
PREP(handleMouseButton);
|
||||
PREP(handleMouseMove);
|
||||
PREP(handleMouseZChanged);
|
||||
PREP(isInsideMapTool);
|
||||
PREP(mapStateUpdater);
|
||||
PREP(openMapGps);
|
||||
PREP(openMapGpsUpdate);
|
||||
PREP(removeLineMarker);
|
||||
PREP(updateMapToolMarkers);
|
||||
PREP(updateLineMarker);
|
||||
|
||||
if (isServer) then {
|
||||
GVAR(drawing_serverLineMarkers) = [];
|
||||
publicVariable QGVAR(drawing_serverLineMarkers);
|
||||
};
|
||||
|
||||
//Add Event Handlers:
|
||||
["drawing_removeLineMarker", FUNC(removeLineMarker) ] call EFUNC(common,addEventHandler);
|
||||
["drawing_addLineMarker", FUNC(addLineMarker) ] call EFUNC(common,addEventHandler);
|
||||
|
||||
["drawing_requestMarkers", FUNC(copyMapRemoteSend) ] call EFUNC(common,addEventHandler);
|
||||
["drawing_sendbackMarkers", FUNC(copyMapReceiveMarkers) ] call EFUNC(common,addEventHandler);
|
||||
|
||||
ADDON = true;
|
74
addons/maptools/config.cpp
Normal file
74
addons/maptools/config.cpp
Normal file
@ -0,0 +1,74 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {"ACE_MapTools"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common", "ace_interaction"};
|
||||
author[] = {"CAA-Picard"};
|
||||
authorUrl = "https://github.com/esteldunedain/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Settings {
|
||||
class GVAR(EveryoneCanDrawOnBriefing) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
};
|
||||
};
|
||||
|
||||
class RscControlsGroup;
|
||||
class RscActiveText;
|
||||
class RscPicture;
|
||||
class RscText;
|
||||
class RscObject;
|
||||
class RscButton;
|
||||
class RscButtonMenuOK;
|
||||
class RscButtonMenuCancel;
|
||||
class RscButtonMenu;
|
||||
class RscEdit;
|
||||
|
||||
#include "MapGpsUI.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgMarkers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
|
||||
|
||||
// REGULAR MAP
|
||||
class RscDisplayMainMap {
|
||||
// Create the drawing color selector
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// BRIEFING SCREEN
|
||||
class RscDisplayGetReady: RscDisplayMainMap {
|
||||
// Create the drawing color selector
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscDisplayClientGetReady: RscDisplayGetReady {
|
||||
// Create the drawing color selector
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscDisplayServerGetReady: RscDisplayGetReady {
|
||||
// Create the drawing color selector
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
};
|
1
addons/maptools/functions/script_component.hpp
Normal file
1
addons/maptools/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\maptools\script_component.hpp"
|
17
addons/maptools/script_component.hpp
Normal file
17
addons/maptools/script_component.hpp
Normal file
@ -0,0 +1,17 @@
|
||||
#define COMPONENT maptools
|
||||
#include "\z\ace\Addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_MAPTOOLS
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_MAPTOOLS
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_MAPTOOLS
|
||||
#endif
|
||||
|
||||
#include "\z\ace\Addons\main\script_macros.hpp"
|
||||
|
||||
|
||||
#define MARKERNAME_MAPTOOL_FIXED "ACE_MapToolFixed"
|
||||
#define MARKERNAME_MAPTOOL_ROTATINGNORMAL "ACE_MapToolRotatingNormal"
|
||||
#define MARKERNAME_MAPTOOL_ROTATINGSMALL "ACE_MapToolRotatingSmall"
|
148
addons/maptools/stringtable.xml
Normal file
148
addons/maptools/stringtable.xml
Normal file
@ -0,0 +1,148 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Edited with tabler - 2014-12-22 -->
|
||||
<Project name="ACE">
|
||||
<Package name="Map">
|
||||
<Key ID="STR_ACE_MapTools_Name">
|
||||
<English>Map Tools</English>
|
||||
<Spanish>Herramientas de mapa</Spanish>
|
||||
<French>Outils de navigation</French>
|
||||
<Polish>Narzędzia nawigacyjne</Polish>
|
||||
<German>Kartenwerkzeug</German>
|
||||
<Czech>Pomůcky k Mapě</Czech>
|
||||
<Italian>Strumenti Cartografici</Italian>
|
||||
<Portuguese>Ferramentas de Mapa</Portuguese>
|
||||
<Hungarian>Térképészeti eszközök</Hungarian>
|
||||
<Russian>Инструменты карты</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_MapTools_Description">
|
||||
<English>The Map Tools allow you to measure distances and angles on the map.</English>
|
||||
<Spanish>Las herramientas de mapa permiten medir distancias y ángulos en el mapa.</Spanish>
|
||||
<French>Les outils de navigation permettent de mesurer des distances et des angles sur la carte.</French>
|
||||
<Polish>Narzędzia nawigacyjne pozwalają na mierzenie odległości i kątów na mapie.</Polish>
|
||||
<German>Das Kartenwerkzeug erlaubt es dir, Distanzen und Winkel zu messen.</German>
|
||||
<Czech>Pomůcky k mapě slouží k měření vzdáleností a úhlů na mapě.</Czech>
|
||||
<Italian>Gli Strumenti Cartografici ti consentono di misurare distanze ed angoli sulla mappa.</Italian>
|
||||
<Portuguese>As Ferramentas de Mapa permitem que você meça distâncias e ângulos no mapa.</Portuguese>
|
||||
<Hungarian>A térképészeti eszközökkel távolságokat és szögeket tud mérni a térképen.</Hungarian>
|
||||
<Russian>Картографические инструменты позволяют измерять расстояния и углы на карте.</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_MapTools_MapTools_Menu">
|
||||
<English>Map Tools >></English>
|
||||
<Spanish>Herramientas de mapa >></Spanish>
|
||||
<French>Outils de navigation >></French>
|
||||
<Polish>Narzędzia nawigacyjne >></Polish>
|
||||
<German>Kartenwerkzeug >></German>
|
||||
<Czech>Pomůcky k Mapě >></Czech>
|
||||
<Italian>Strumenti Cartografici >></Italian>
|
||||
<Portuguese>Ferramentas de Mapa >></Portuguese>
|
||||
<Hungarian>Térképészeti eszközök >></Hungarian>
|
||||
<Russian>Инструменты карты >></Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_MapTools_MapToolsHide">
|
||||
<English>Hide Map Tool</English>
|
||||
<German>Verstecke Kartenwerkzeug</German>
|
||||
<Spanish>Ocultar herr. de mapa</Spanish>
|
||||
<French>Ranger les outils</French>
|
||||
<Italian>Nascondi Strumenti Cartografici</Italian>
|
||||
<Portuguese>Ocultar Ferramenta de Mapa</Portuguese>
|
||||
<Hungarian>Térképészeti eszközök elrejtése</Hungarian>
|
||||
<Polish>Ukryj narzędzia nawigacyjne</Polish>
|
||||
<Czech>Schovat pomůcku k mapě</Czech>
|
||||
<Russian>Скрыть инструменты</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_MapTools_MapToolsShowNormal">
|
||||
<English>Show Normal Map Tool</English>
|
||||
<German>Zeige Kartenwerkzeug (normal)</German>
|
||||
<Spanish>Mostrar herr. de mapa normal</Spanish>
|
||||
<French>Montrer outils normaux</French>
|
||||
<Italian>Visualizza Strumenti Cartografici standard</Italian>
|
||||
<Portuguese>Mostrar Ferramenta de Mapa Padrão</Portuguese>
|
||||
<Hungarian>Térképészeti eszköz megjelenítése (normál méret)</Hungarian>
|
||||
<Polish>Pokaż normalne narzędzia nawigacyjne</Polish>
|
||||
<Czech>Zobrazit normální pomůcku k mapě</Czech>
|
||||
<Russian>Показать инструменты (средн. размер)</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_MapTools_MapToolsShowSmall">
|
||||
<English>Show Small Map Tool</English>
|
||||
<German>Zeige Kartenwerkzeug (klein)</German>
|
||||
<Spanish>Mostrar herr. de mapa pequeñas</Spanish>
|
||||
<French>Montrer petits outils</French>
|
||||
<Italian>Visualizza Strumenti Cartografici piccoli</Italian>
|
||||
<Portuguese>Mostrar Ferramenta de Mapa Pequena</Portuguese>
|
||||
<Hungarian>Térképészeti eszköz megjelenítése (kicsinyített)</Hungarian>
|
||||
<Polish>Pokaż pomniejszone narzędzia nawigacyjne</Polish>
|
||||
<Czech>Zobrazit malou pomůcku k mapě</Czech>
|
||||
<Russian>Показать инструменты (малый размер)</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_MapTools_MapToolsAlignNorth">
|
||||
<English>Align Map Tool to North</English>
|
||||
<German>Kartenwerkzeug nach Norden ausrichten</German>
|
||||
<Spanish>Alinear herr. de mapa al norte</Spanish>
|
||||
<French>Aligner au nord</French>
|
||||
<Italian>Allinea gli Strumenti Cartografici con il Nord</Italian>
|
||||
<Portuguese>Alinhar Ferramenta de Mapa com o Norte</Portuguese>
|
||||
<Hungarian>Térképészeti eszköz Északhoz állítása</Hungarian>
|
||||
<Polish>Wyrównaj linijkę do północy</Polish>
|
||||
<Czech>Srovnat pomůcku k mapě na sever</Czech>
|
||||
<Russian>Выровнять инструменты на север</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_MapTools_MapToolsAlignCompass">
|
||||
<English>Align Map Tool to Compass</English>
|
||||
<German>Kartenwerkzeug am Kompass ausrichten</German>
|
||||
<Spanish>Alinear herr. de mapa a la brújula</Spanish>
|
||||
<French>Aligner sur la boussole</French>
|
||||
<Italian>Allinea gli Strumenti Cartografici con la bussola</Italian>
|
||||
<Portuguese>Alinhar Ferramenta de Mapa com a Bússola</Portuguese>
|
||||
<Hungarian>Térképészeti eszköz iránytűhöz állítása</Hungarian>
|
||||
<Polish>Wyrównaj linijkę do kompasu</Polish>
|
||||
<Czech>Srovnat pomůcku k mapě ke kompasu</Czech>
|
||||
<Russian>Выровнять инструменты по компасу</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_MapTools_MapGpsShow">
|
||||
<English>Show GPS on Map</English>
|
||||
<German>Zeige GPS auf der Karte</German>
|
||||
<Spanish>Mostrar el GPS sobre el mapa</Spanish>
|
||||
<French>Ranger le GPS</French>
|
||||
<Italian>Visualizza il GPS sulla mappa</Italian>
|
||||
<Portuguese>Mostrar GPS no Mapa</Portuguese>
|
||||
<Hungarian>GPS megjelnítése a térképen</Hungarian>
|
||||
<Polish>Pokaż GPS na mapie</Polish>
|
||||
<Czech>Zobrazit GPS na mapě</Czech>
|
||||
<Russian>Показать GPS на карте</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_MapTools_MapGpsHide">
|
||||
<English>Hide GPS on Map</English>
|
||||
<German>Verstecke GPS auf der Karte</German>
|
||||
<Spanish>Ocultar el GPS del mapa</Spanish>
|
||||
<French>Montrer le GPS</French>
|
||||
<Italian>Nascondi il GPS sulla mappa</Italian>
|
||||
<Portuguese>Ocultar GPS no Mapa</Portuguese>
|
||||
<Hungarian>GPS elrejtése térképről</Hungarian>
|
||||
<Polish>Ukryj GPS na mapie</Polish>
|
||||
<Czech>Schovat GPS na mapě</Czech>
|
||||
<Russian>Скрыть GPS на карте</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_MapTools_CopyMap">
|
||||
<English>Copy Map</English>
|
||||
<German>Karte kopieren</German>
|
||||
<Spanish>Copiar mapa</Spanish>
|
||||
<Russian>Скопировать карту</Russian>
|
||||
<Polish>Kopiuj oznaczenia mapy</Polish>
|
||||
<French>Copier la carte</French>
|
||||
<Czech>Zkopírovat mapu</Czech>
|
||||
<Italian>Copiare Carta</Italian>
|
||||
<Hungarian>Térkép másolása</Hungarian>
|
||||
<Portuguese>Copiar Mapa</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_MapTools_MarkerDirection">
|
||||
<English>Direction: %1°</English>
|
||||
<German>Drehung: %1°</German>
|
||||
<French>Direction: %1°</French>
|
||||
<Czech>Směr: %1°</Czech>
|
||||
<Polish>Kierunek: %1°</Polish>
|
||||
<Spanish>Dirección: %1°</Spanish>
|
||||
<Hungarian>Irány: %1</Hungarian>
|
||||
<Russian>Направление:%1</Russian>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -25,7 +25,7 @@ if !(!(isNull _unit) && {(_unit isKindOf "CaManBase") && ([_unit] call EFUNC(com
|
||||
|
||||
// We only want this function to work on local machines
|
||||
if (!local _unit) exitwith {
|
||||
[[_unit], QUOTE(DFUNC(setUnconsciousState)), _unit, false] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
[[_unit], QUOTE(DFUNC(setUnconscious)), _unit, false] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */
|
||||
};
|
||||
|
||||
// Get rid of the object we are carrying, before we go unconscious.
|
||||
@ -64,22 +64,21 @@ _unit setUnitPos "DOWN";
|
||||
// So the AI does not get stuck, we are moving the unit to a temp group on its own.
|
||||
[_unit, true, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide);
|
||||
|
||||
_captiveSwitch = [_unit, true] call EFUNC(common,setCaptiveSwitch);
|
||||
[_unit, QGVAR(unconscious), true] call EFUNC(common,setCaptivityStatus);
|
||||
[_unit, [_unit] call EFUNC(common,getDeathAnim), 1, true] call EFUNC(common,doAnimation);
|
||||
|
||||
_startingTime = time;
|
||||
_minWaitingTime = (round(random(10)+5));
|
||||
|
||||
[{
|
||||
private ["_unit", "_vehicleOfUnit","_lockSwitch","_minWaitingTime", "_oldAnimation", "_captiveSwitch", "_hasMovedOut"];
|
||||
private ["_unit", "_vehicleOfUnit","_minWaitingTime", "_oldAnimation", "_captiveSwitch", "_hasMovedOut"];
|
||||
_args = _this select 0;
|
||||
_unit = _args select 0;
|
||||
_oldAnimation = _args select 1;
|
||||
_captiveSwitch = _args select 2;
|
||||
_originalPos = _args select 3;
|
||||
_startingTime = _args select 4;
|
||||
_minWaitingTime = _args select 5;
|
||||
_hasMovedOut = _args select 6;
|
||||
_originalPos = _args select 2;
|
||||
_startingTime = _args select 3;
|
||||
_minWaitingTime = _args select 4;
|
||||
_hasMovedOut = _args select 5;
|
||||
// Since the unit is no longer alive, get rid of this PFH.
|
||||
if (!alive _unit) exitwith {
|
||||
// EXIT PFH
|
||||
@ -104,10 +103,8 @@ _minWaitingTime = (round(random(10)+5));
|
||||
};
|
||||
if (!_hasMovedOut) then {
|
||||
// Reset the unit back to the previous captive state.
|
||||
if (_captiveSwitch) then {
|
||||
[_unit, false] call EFUNC(common,setCaptiveSwitch);
|
||||
};
|
||||
|
||||
[_unit, QGVAR(unconscious), false] call EFUNC(common,setCaptivityStatus);
|
||||
|
||||
// Swhich the unit back to its original group
|
||||
[_unit, false, "ACE_isUnconscious", side group _unit] call EFUNC(common,switchToGroupSide);
|
||||
|
||||
@ -137,6 +134,6 @@ _minWaitingTime = (round(random(10)+5));
|
||||
[_unit,([_unit] call FUNC(getDeathAnim)), 1, true] call EFUNC(common,doAnimation); // Reset animations if unit starts doing wierd things.
|
||||
};
|
||||
|
||||
}, 0.1, [_unit,_animState, _captiveSwitch, _originalPos, _startingTime, _minWaitingTime, false] ] call CBA_fnc_addPerFrameHandler;
|
||||
}, 0.1, [_unit,_animState, _originalPos, _startingTime, _minWaitingTime, false] ] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
["medical_onUnconscious", [_unit], [_unit, true]] call EFUNC(common,targetEvent);
|
||||
|
@ -6,8 +6,8 @@ class CfgPatches {
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"Combat Space Enhancement"};
|
||||
authorUrl = "http://csemod.com";
|
||||
author[] = {"Glowbal", "PabstMirror"};
|
||||
authorUrl = "http://github.com/Glowbal";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
@ -24,4 +24,4 @@ class CfgAddons {
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "gui\define.hpp"
|
||||
#include "gui\settingsMenu.hpp"
|
||||
#include "gui\pauseMenu.hpp"
|
||||
#include "gui\pauseMenu.hpp"
|
||||
|
@ -1,12 +1,19 @@
|
||||
/**
|
||||
* fnc_onListBoxSettingsChanged.sqf
|
||||
* @Descr: N/A
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Called when the listbox selection is changed for an options (eg: chaning a setting from false to true)
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ACE_optionsmenu_fnc_onListBoxSettingsChanged
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_settingIndex", "_rightDropDownIndex"];
|
||||
|
@ -1,12 +1,19 @@
|
||||
/**
|
||||
* fnc_onListBoxShowSelectionChanged.sqf
|
||||
* @Descr: called when the listbox selection has changed. Updates configuration menu information
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Changes which tab is open (options or colors)
|
||||
*
|
||||
* Arguments:
|
||||
* The tab to open (defined in script_component) <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [MENU_TAB_COLORS] call ACE_optionsmenu_fnc_onListBoxShowSelectionChanged
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_settingsMenu", "_localizedHeader"];
|
||||
|
@ -1,34 +1,47 @@
|
||||
/**
|
||||
* fnc_onSettingsMenuOpen.sqf
|
||||
* @Descr: called when the settings or configuration menu has opened. Do not use anywhere else.
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Called from the onLoad of ACE_settingsMenu dialog.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [onLoadEvent] call ACE_optionsmenu_fnc_onSettingsMenuOpen
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
// Filter only user setable setting
|
||||
GVAR(clientSideOptions) = [];
|
||||
GVAR(clientSideColors) = [];
|
||||
{
|
||||
// If the setting is user setable and not forced
|
||||
if ((_x select 2) && !(_x select 6)) then {
|
||||
// Append the current value to the setting metadata
|
||||
_setting = + _x;
|
||||
_setting pushBack (missionNamespace getVariable (_x select 0));
|
||||
// If the setting is user setable and not forced
|
||||
if ((_x select 2) && !(_x select 6)) then {
|
||||
// Append the current value to the setting metadata
|
||||
_setting = + _x;
|
||||
_setting pushBack (missionNamespace getVariable (_x select 0));
|
||||
|
||||
// Categorize the setting according to types
|
||||
// @todo: allow the user to modify other types of parameters?
|
||||
if ((_x select 1) == "SCALAR" || (_x select 1) == "BOOL") then {
|
||||
GVAR(clientSideOptions) pushBack _setting;
|
||||
};
|
||||
if ((_x select 1) == "COLOR") then {
|
||||
GVAR(clientSideColors) pushBack _setting;
|
||||
};
|
||||
};
|
||||
// Categorize the setting according to types
|
||||
// @todo: allow the user to modify other types of parameters?
|
||||
if ((_x select 1) == "SCALAR" || (_x select 1) == "BOOL") then {
|
||||
GVAR(clientSideOptions) pushBack _setting;
|
||||
};
|
||||
if ((_x select 1) == "COLOR") then {
|
||||
GVAR(clientSideColors) pushBack _setting;
|
||||
};
|
||||
};
|
||||
} forEach EGVAR(common,settings);
|
||||
|
||||
//Delay a frame
|
||||
[{ [MENU_TAB_OPTIONS] call FUNC(onListBoxShowSelectionChanged) }, []] call EFUNC(common,execNextFrame);
|
||||
|
||||
private "_menu";
|
||||
disableSerialization;
|
||||
_menu = uiNamespace getvariable "ACE_settingsMenu";
|
||||
(_menu displayCtrl 1002) ctrlEnable false;
|
||||
(_menu displayCtrl 1003) ctrlEnable false;
|
||||
|
@ -1,29 +1,38 @@
|
||||
/**
|
||||
* fnc_onSliderPosChanged.sqf
|
||||
* @Descr: N/A
|
||||
* @Author: PabstMirror
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Called when one of the color sliders is moved.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ACE_optionsmenu_fnc_onSliderPosChanged
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_newColor", "_settingIndex"];
|
||||
|
||||
_newColor = [];
|
||||
{
|
||||
_newColor pushBack ((sliderPosition _x) / 255);
|
||||
} forEach [410, 411, 412, 413];
|
||||
|
||||
_settingIndex = lbCurSel 200;
|
||||
|
||||
switch (GVAR(optionMenu_openTab)) do {
|
||||
case (MENU_TAB_COLORS): {
|
||||
if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(clientSideColors)))) then {
|
||||
_settingIndex = (GVAR(clientSideColors) select _settingIndex) select 0;
|
||||
[MENU_TAB_COLORS, _settingIndex, _newColor] call FUNC(updateSetting);
|
||||
case (MENU_TAB_COLORS): {
|
||||
|
||||
_newColor = [];
|
||||
{
|
||||
_newColor pushBack ((sliderPosition _x) / 255);
|
||||
} forEach [410, 411, 412, 413];
|
||||
|
||||
if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(clientSideColors)))) then {
|
||||
_settingIndex = (GVAR(clientSideColors) select _settingIndex) select 0;
|
||||
[MENU_TAB_COLORS, _settingIndex, _newColor] call FUNC(updateSetting);
|
||||
};
|
||||
[false] call FUNC(settingsMenuUpdateList);
|
||||
};
|
||||
[false] call FUNC(settingsMenuUpdateList);
|
||||
};
|
||||
default {};
|
||||
};
|
||||
|
@ -1,30 +1,37 @@
|
||||
/**
|
||||
* fnc_resetSettings.sqf
|
||||
* @Descr:
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Resets all settings to default.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ACE_optionsmenu_fnc_onListBoxSettingsChanged
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_name", "_default", "_lastSelected"];
|
||||
|
||||
{
|
||||
_name = _x select 0;
|
||||
_default = _x select 7;
|
||||
[MENU_TAB_OPTIONS, _name, _default] call FUNC(updateSetting);
|
||||
_name = _x select 0;
|
||||
_default = _x select 7;
|
||||
[MENU_TAB_OPTIONS, _name, _default] call FUNC(updateSetting);
|
||||
} forEach GVAR(clientSideOptions);
|
||||
|
||||
{
|
||||
_name = _x select 0;
|
||||
_default = _x select 7;
|
||||
[MENU_TAB_COLORS, _name, _default] call FUNC(updateSetting);
|
||||
_name = _x select 0;
|
||||
_default = _x select 7;
|
||||
[MENU_TAB_COLORS, _name, _default] call FUNC(updateSetting);
|
||||
} forEach GVAR(clientSideColors);
|
||||
|
||||
_lastSelected = lbCurSel 200;
|
||||
[GVAR(optionMenu_openTab)] call FUNC(onListBoxShowSelectionChanged);
|
||||
if (_lastSelected != -1) then {
|
||||
lbSetCurSel [200, _lastSelected];
|
||||
lbSetCurSel [200, _lastSelected];
|
||||
};
|
||||
|
@ -1,12 +1,19 @@
|
||||
/**
|
||||
* fnc_settingsMenuUpdateKeyView.sqf
|
||||
* @Descr: N/A
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Updates the right half of the option menu for the currently selected option.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ACE_optionsmenu_fnc_settingsMenuUpdateKeyView
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_settingsMenu", "_ctrlList", "_collection", "_settingIndex", "_setting", "_entryName", "_localizedName", "_localizedDescription", "_possibleValues", "_settingsValue", "_currentColor"];
|
||||
@ -16,58 +23,58 @@ _settingsMenu = uiNamespace getVariable 'ACE_settingsMenu';
|
||||
_ctrlList = _settingsMenu displayCtrl 200;
|
||||
|
||||
_collection = switch (GVAR(optionMenu_openTab)) do {
|
||||
case MENU_TAB_OPTIONS: {GVAR(clientSideOptions)};
|
||||
case MENU_TAB_COLORS: {GVAR(clientSideColors)};
|
||||
default {[]};
|
||||
case MENU_TAB_OPTIONS: {GVAR(clientSideOptions)};
|
||||
case MENU_TAB_COLORS: {GVAR(clientSideColors)};
|
||||
default {[]};
|
||||
};
|
||||
|
||||
if (count _collection > 0) then {
|
||||
_settingIndex = (lbCurSel _ctrlList);
|
||||
if (_settingIndex > (count _collection)) then {
|
||||
_settingIndex = count _collection - 1;
|
||||
};
|
||||
|
||||
if (_settingIndex < 0) exitwith {
|
||||
_settingIndex = 0;
|
||||
};
|
||||
_setting = _collection select _settingIndex;
|
||||
|
||||
_entryName = _setting select 0;
|
||||
_localizedName = _setting select 3;
|
||||
_localizedDescription = _setting select 4;
|
||||
|
||||
if (_localizedName == "") then {_localizedName = _entryName;};
|
||||
(_settingsMenu displayCtrl 250) ctrlSetText _localizedName;
|
||||
(_settingsMenu displayCtrl 251) ctrlSetText _localizedDescription;
|
||||
(_settingsMenu displayCtrl 300) ctrlSetText _entryName;
|
||||
|
||||
switch (GVAR(optionMenu_openTab)) do {
|
||||
case (MENU_TAB_OPTIONS): {
|
||||
_possibleValues = _setting select 5;
|
||||
_settingsValue = _setting select 8;
|
||||
|
||||
// Created disable/enable options for bools
|
||||
if ((_setting select 1) == "BOOL") then {
|
||||
lbClear 400;
|
||||
lbAdd [400, (localize "STR_ACE_OptionsMenu_Disabled")];
|
||||
lbAdd [400, (localize "STR_ACE_OptionsMenu_Enabled")];
|
||||
_settingsValue = [0, 1] select _settingsValue;
|
||||
} else {
|
||||
lbClear 400;
|
||||
{ lbAdd [400, _x]; } foreach _possibleValues;
|
||||
};
|
||||
(_settingsMenu displayCtrl 400) lbSetCurSel _settingsValue;
|
||||
_settingIndex = (lbCurSel _ctrlList);
|
||||
if (_settingIndex > (count _collection)) then {
|
||||
_settingIndex = count _collection - 1;
|
||||
};
|
||||
case (MENU_TAB_COLORS): {
|
||||
_currentColor = _setting select 8;
|
||||
{
|
||||
sliderSetPosition [_x, (255 * (_currentColor select _forEachIndex))];
|
||||
} forEach [410, 411, 412, 413];
|
||||
|
||||
if (_settingIndex < 0) then {
|
||||
_settingIndex = 0;
|
||||
};
|
||||
_setting = _collection select _settingIndex;
|
||||
|
||||
_entryName = _setting select 0;
|
||||
_localizedName = _setting select 3;
|
||||
_localizedDescription = _setting select 4;
|
||||
|
||||
if (_localizedName == "") then {_localizedName = _entryName;};
|
||||
(_settingsMenu displayCtrl 250) ctrlSetText _localizedName;
|
||||
(_settingsMenu displayCtrl 251) ctrlSetText _localizedDescription;
|
||||
(_settingsMenu displayCtrl 300) ctrlSetText _entryName;
|
||||
|
||||
switch (GVAR(optionMenu_openTab)) do {
|
||||
case (MENU_TAB_OPTIONS): {
|
||||
_possibleValues = _setting select 5;
|
||||
_settingsValue = _setting select 8;
|
||||
|
||||
// Created disable/enable options for bools
|
||||
if ((_setting select 1) == "BOOL") then {
|
||||
lbClear 400;
|
||||
lbAdd [400, (localize "STR_ACE_OptionsMenu_Disabled")];
|
||||
lbAdd [400, (localize "STR_ACE_OptionsMenu_Enabled")];
|
||||
_settingsValue = [0, 1] select _settingsValue;
|
||||
} else {
|
||||
lbClear 400;
|
||||
{ lbAdd [400, _x]; } foreach _possibleValues;
|
||||
};
|
||||
(_settingsMenu displayCtrl 400) lbSetCurSel _settingsValue;
|
||||
};
|
||||
case (MENU_TAB_COLORS): {
|
||||
_currentColor = _setting select 8;
|
||||
{
|
||||
sliderSetPosition [_x, (255 * (_currentColor select _forEachIndex))];
|
||||
} forEach [410, 411, 412, 413];
|
||||
};
|
||||
};
|
||||
};
|
||||
} else { //no settings in list:
|
||||
lbClear 400;
|
||||
(_settingsMenu displayCtrl 250) ctrlSetText _localizedName;
|
||||
(_settingsMenu displayCtrl 251) ctrlSetText _localizedDescription;
|
||||
(_settingsMenu displayCtrl 300) ctrlSetText _entryName;
|
||||
lbClear 400;
|
||||
(_settingsMenu displayCtrl 250) ctrlSetText "No settings available";
|
||||
(_settingsMenu displayCtrl 251) ctrlSetText "No settings available";
|
||||
(_settingsMenu displayCtrl 300) ctrlSetText "No settings available";
|
||||
};
|
||||
|
@ -1,12 +1,19 @@
|
||||
/**
|
||||
* fnc_settingsMenuUpdateList.sqf
|
||||
* @Descr: N/A
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Updates the setting when the client has selected a new value. Saves to profilenamespace.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Update the keylist as well <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [false] call ACE_optionsmenu_fnc_settingsMenuUpdateList
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_settingsMenu", "_ctrlList", "_settingsText", "_color", "_settingsColor", "_updateKeyView"];
|
||||
@ -19,35 +26,35 @@ _ctrlList = _settingsMenu displayCtrl 200;
|
||||
lbclear _ctrlList;
|
||||
|
||||
switch (GVAR(optionMenu_openTab)) do {
|
||||
case (MENU_TAB_OPTIONS): {
|
||||
case (MENU_TAB_OPTIONS): {
|
||||
{
|
||||
_ctrlList lbadd (_x select 3);
|
||||
|
||||
_settingsValue = _x select 8;
|
||||
|
||||
// Created disable/enable options for bools
|
||||
_settingsText = if ((_x select 1) == "BOOL") then {
|
||||
[(localize "STR_ACE_OptionsMenu_Disabled"), (localize "STR_ACE_OptionsMenu_Enabled")] select _settingsValue;
|
||||
} else {
|
||||
(_x select 5) select _settingsValue;
|
||||
};
|
||||
|
||||
_ctrlList lbadd (_settingsText);
|
||||
}foreach GVAR(clientSideOptions);
|
||||
};
|
||||
case (MENU_TAB_COLORS): {
|
||||
{
|
||||
_ctrlList lbadd (_x select 3);
|
||||
|
||||
_settingsValue = _x select 8;
|
||||
|
||||
// Created disable/enable options for bools
|
||||
_settingsText = if ((_x select 1) == "BOOL") then {
|
||||
[(localize "STR_ACE_OptionsMenu_Disabled"), (localize "STR_ACE_OptionsMenu_Enabled")] select _settingsValue;
|
||||
} else {
|
||||
(_x select 5) select _settingsValue;
|
||||
};
|
||||
|
||||
_ctrlList lbadd (_settingsText);
|
||||
}foreach GVAR(clientSideOptions);
|
||||
};
|
||||
case (MENU_TAB_COLORS): {
|
||||
{
|
||||
_color = +(_x select 8);
|
||||
{
|
||||
_color set [_forEachIndex, ((round (_x * 100))/100)];
|
||||
} forEach _color;
|
||||
_settingsColor = str _color;
|
||||
_ctrlList lbadd (_x select 3);
|
||||
_ctrlList lbadd (_settingsColor);
|
||||
_ctrlList lnbSetColor [[_forEachIndex, 1], (_x select 8)];
|
||||
}foreach GVAR(clientSideColors);
|
||||
};
|
||||
_color = +(_x select 8);
|
||||
{
|
||||
_color set [_forEachIndex, ((round (_x * 100))/100)];
|
||||
} forEach _color;
|
||||
_settingsColor = str _color;
|
||||
_ctrlList lbadd (_x select 3);
|
||||
_ctrlList lbadd (_settingsColor);
|
||||
_ctrlList lnbSetColor [[_forEachIndex, 1], (_x select 8)];
|
||||
}foreach GVAR(clientSideColors);
|
||||
};
|
||||
};
|
||||
if (_updateKeyView) then {
|
||||
[] call FUNC(settingsMenuUpdateKeyView);
|
||||
[] call FUNC(settingsMenuUpdateKeyView);
|
||||
};
|
||||
|
@ -1,12 +1,21 @@
|
||||
/**
|
||||
* fnc_updateSetting.sqf
|
||||
* @Descr:
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Updates the setting when the client has selected a new value. Saves to profilenamespace and calls setSetting.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Tab Open <NUMBER>
|
||||
* 1: The setting's name <STRING>
|
||||
* 2: The new value either an index or a color <NUMBER>OR<ARRAY>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [MENU_TAB_COLORS, "ace_fireTruckColor", [1,0,0,1]] call ACE_optionsmenu_fnc_updateSetting
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_changed"];
|
||||
|
@ -4,7 +4,7 @@ class ACE_settingsMenu {
|
||||
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_settingsMenu', _this select 0)]; [] call FUNC(onSettingsMenuOpen););
|
||||
onUnload = QUOTE(uiNamespace setVariable [ARR_2('ACE_settingsMenu', nil)]; saveProfileNamespace;);
|
||||
|
||||
#define SIZEX ((0.70 * safezoneW) max 1.0)
|
||||
#define SIZEX (((safezoneW / safezoneH) min 1.2))
|
||||
#define SIZEY (SIZEX / 1.2)
|
||||
#define UNITX (SIZEX / 40)
|
||||
#define UNITY (SIZEY / 25)
|
||||
@ -42,6 +42,10 @@ class ACE_settingsMenu {
|
||||
x = 26.1 * UNITX + OFFSETX;
|
||||
w = 12.9 * UNITX;
|
||||
};
|
||||
class RightBackgroundHeader: RightBackground {
|
||||
h = 1.4 * UNITY;
|
||||
colorBackground[] = {0,0,0,1};
|
||||
};
|
||||
};
|
||||
|
||||
class controls {
|
||||
@ -85,7 +89,7 @@ class ACE_settingsMenu {
|
||||
colorBackgroundFocused[] = {1,1,1,1};
|
||||
colorBackground[] = {1,1,1,1};
|
||||
colorbackground2[] = {1,1,1,1};
|
||||
colorDisabled[] = {0.5,0.5,0.5,0.8};
|
||||
colorDisabled[] = {1,1,1,1};
|
||||
colorFocused[] = {0,0,0,1};
|
||||
periodFocus = 1;
|
||||
periodOver = 1;
|
||||
@ -99,13 +103,13 @@ class ACE_settingsMenu {
|
||||
};
|
||||
class selectionAction_3: selectionAction_1 {
|
||||
idc = 1002;
|
||||
text = "---";
|
||||
text = "";
|
||||
x = 20 * UNITX + OFFSETX;
|
||||
action = "";
|
||||
};
|
||||
class selectionAction_4: selectionAction_1 {
|
||||
idc = 1003;
|
||||
text = "---";
|
||||
text = "";
|
||||
x = 29.5 * UNITX + OFFSETX;
|
||||
action = "";
|
||||
};
|
||||
@ -115,7 +119,7 @@ class ACE_settingsMenu {
|
||||
y = 5.5 * UNITY + OFFSETY;
|
||||
w = 23 * UNITX;
|
||||
h = 15 * UNITY;
|
||||
SizeEx = (UNITY * 0.7);
|
||||
SizeEx = (UNITY * 0.8);
|
||||
colorBackground[] = {0, 0, 0, 0.9};
|
||||
colorSelectBackground[] = {0, 0, 0, 0.9};
|
||||
columns[] = {0.0, 0.6};
|
||||
@ -128,7 +132,7 @@ class ACE_settingsMenu {
|
||||
w = 11 * UNITX;
|
||||
h = 1 * UNITY;
|
||||
text = "";
|
||||
SizeEx = (UNITY * 0.75);
|
||||
SizeEx = (UNITY *1);
|
||||
};
|
||||
class labelKey: ACE_gui_staticBase { //Variable Name
|
||||
idc = 300;
|
||||
@ -137,13 +141,13 @@ class ACE_settingsMenu {
|
||||
w = 11 * UNITX;
|
||||
h = 1 * UNITY;
|
||||
text = "";
|
||||
SizeEx = (UNITY * 0.60);
|
||||
SizeEx = (UNITY * 0.65);
|
||||
};
|
||||
class Label2: labelKey {
|
||||
idc = 301;
|
||||
y = 7.3 * UNITY + OFFSETY;
|
||||
text = "$STR_ACE_OptionsMenu_Setting";
|
||||
SizeEx = (UNITY * 0.75);
|
||||
SizeEx = (UNITY * 1);
|
||||
};
|
||||
class comboBox1: ACE_gui_comboBoxBase {
|
||||
idc = 400;
|
||||
@ -152,7 +156,7 @@ class ACE_settingsMenu {
|
||||
w = 7 * UNITX;
|
||||
h = 1 * UNITY;
|
||||
onLBSelChanged = QUOTE( call FUNC(onListBoxSettingsChanged));
|
||||
SizeEx = (UNITY * 0.75);
|
||||
SizeEx = (UNITY * 0.9);
|
||||
};
|
||||
class sliderBar1: RscXSliderH {
|
||||
idc = 410;
|
||||
@ -191,15 +195,16 @@ class ACE_settingsMenu {
|
||||
text = "";
|
||||
style = ST_LEFT + ST_MULTI;
|
||||
lineSpacing = 1;
|
||||
SizeEx = (UNITY * 0.60);
|
||||
SizeEx = (UNITY * 0.8);
|
||||
};
|
||||
class actionClose: ACE_gui_buttonBase {
|
||||
idc = 10;
|
||||
text = "$STR_DISP_CLOSE";
|
||||
x = 1 * UNITX + OFFSETX;
|
||||
y = 22.3 * UNITY + OFFSETY;
|
||||
w = 6 * UNITX;
|
||||
w = 7.5 * UNITX;
|
||||
h = 1 * UNITY;
|
||||
style = ST_LEFT;
|
||||
animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.8)";
|
||||
animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.5)";
|
||||
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
|
||||
@ -217,17 +222,10 @@ class ACE_settingsMenu {
|
||||
periodOver = 1;
|
||||
action = "closedialog 0;";
|
||||
};
|
||||
class action_animation: actionClose {
|
||||
idc = 1100;
|
||||
text = "$STR_ACE_OptionsMenu_FixAnimation";
|
||||
x = 7.5 * UNITX + OFFSETX;
|
||||
// action = "if ([player] call ACE_fnc_canInteract && {animationState player == 'deadState' || animationState player == 'unconscious'} && {(vehicle player == player)}) then { [player, 'amovppnemstpsnonwnondnon'] call ACE_fnc_broadcastAnim; };";
|
||||
action = "hint 'todo???'";
|
||||
};
|
||||
class action_reset: actionClose {
|
||||
idc = 1100;
|
||||
text = "$STR_ACE_OptionsMenu_ResetAll";
|
||||
x = 14 * (SIZEX / 40) + OFFSETX;
|
||||
x = 26.1 * (SIZEX / 40) + OFFSETX;
|
||||
action = QUOTE([] call FUNC(resetSettings));
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user