mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into macroSTR
Conflicts: addons/nametags/ACE_Settings.hpp addons/nametags/CfgVehicles.hpp addons/nametags/stringtable.xml
This commit is contained in:
commit
5496333c26
@ -6,8 +6,7 @@ class CfgPatches {
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"TaoSensai","commy2","Ruthberg"};
|
||||
authorUrl = "https://github.com/Taosenai/tmr";
|
||||
author[] = {"commy2","Ruthberg"};
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
@ -66,7 +66,7 @@ class ACE_Medical_Actions {
|
||||
displayNameProgress = CSTRING(PlacingInBodyBag);
|
||||
treatmentLocations[] = {"All"};
|
||||
requiredMedic = 0;
|
||||
treatmentTime = 2;
|
||||
treatmentTime = 4;
|
||||
items[] = {"ACE_bodyBag"};
|
||||
condition = "!alive (_this select 1);";
|
||||
callbackSuccess = QUOTE(DFUNC(actionPlaceInBodyBag));
|
||||
|
@ -1,31 +1,40 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Replace a dead body by a bodybag
|
||||
* Replace a (dead) body by a body bag
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The patient <OBJECT>
|
||||
* 1: The new item classname <STRING>
|
||||
* 0: The actor <OBJECT>
|
||||
* 1: The patient <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* nil
|
||||
* body bag <OBJECT>
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_target","_caller", "_nameOfUnit", "_onPosition", "_bodyBagCreated"];
|
||||
_caller = _this select 0;
|
||||
_target = _this select 1;
|
||||
PARAMS_2(_caller,_target);
|
||||
|
||||
private ["_position", "_headPos", "_spinePos", "_dirVect", "_direction", "_bodyBag"];
|
||||
|
||||
_nameOfUnit = [_target] call EFUNC(common,getName);
|
||||
if (alive _target) then {
|
||||
[_target, true] call FUNC(setDead);
|
||||
};
|
||||
_onPosition = getPosASL _target;
|
||||
deleteVehicle _target;
|
||||
_bodyBagCreated = createVehicle ["ACE_bodyBagObject", _onPosition, [], 0, "NONE"];
|
||||
// reset the position to ensure it is on the correct one.
|
||||
_bodyBagCreated setPosASL [_onPosition select 0, _onPosition select 1, (_onPosition select 2) + 0.2];
|
||||
|
||||
_bodyBagCreated;
|
||||
_position = (getPosASL _target) vectorAdd [0, 0, 0.2];
|
||||
|
||||
_headPos = _target modelToWorldVisual (_target selectionPosition "head");
|
||||
_spinePos = _target modelToWorldVisual (_target selectionPosition "Spine3");
|
||||
_dirVect = _headPos vectorFromTo _spinePos;
|
||||
_direction = _dirVect call CBA_fnc_vectDir;
|
||||
|
||||
deleteVehicle _target;
|
||||
|
||||
_bodyBag = createVehicle ["ACE_bodyBagObject", _position, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
// prevent body bag from flipping
|
||||
_bodyBag setPosASL _position;
|
||||
_bodyBag setDir _direction;
|
||||
|
||||
_bodyBag
|
||||
|
@ -43,4 +43,4 @@
|
||||
};
|
||||
};
|
||||
}foreach GVAR(moduleInitCollection);
|
||||
}] call FUNC(addEventhandler);
|
||||
}] call EFUNC(common,addEventhandler);
|
||||
|
@ -11,7 +11,7 @@ class ACE_Settings {
|
||||
isClientSettable = 1;
|
||||
displayName = CSTRING(ShowPlayerNames);
|
||||
description = CSTRING(ShowPlayerNames_Desc);
|
||||
values[] = {CSTRING(Disabled), CSTRING(Enabled), CSTRING(OnlyCursor), CSTRING(OnlyOnKeypress), CSTRING(OnlyCursorAndKeyPress)};
|
||||
values[] = {CSTRING(Disabled), CSTRING(Enabled), CSTRING(OnlyCursor), CSTRING(OnlyKeypress), CSTRING(OnlyCursorAndKeypress)};
|
||||
};
|
||||
class GVAR(showPlayerRanks) {
|
||||
value = 1;
|
||||
@ -44,12 +44,12 @@ class ACE_Settings {
|
||||
description = CSTRING(ShowSoundWaves_Desc);
|
||||
values[] = {CSTRING(Disabled), CSTRING(NameTagSettings), CSTRING(AlwaysShowAll)};
|
||||
};
|
||||
class GVAR(PlayerNamesViewDistance) {
|
||||
class GVAR(playerNamesViewDistance) {
|
||||
value = 5;
|
||||
typeName = "SCALAR";
|
||||
isClientSettable = 0;
|
||||
};
|
||||
class GVAR(PlayerNamesMaxAlpha) {
|
||||
class GVAR(playerNamesMaxAlpha) {
|
||||
value = 0.8;
|
||||
typeName = "SCALAR";
|
||||
isClientSettable = 0;
|
||||
@ -58,8 +58,8 @@ class ACE_Settings {
|
||||
value = 2;
|
||||
typeName = "SCALAR";
|
||||
isClientSettable = 1;
|
||||
displayName = "$STR_ACE_nametags_tagsize_name";
|
||||
description = "$STR_ACE_nametags_tagsize_description";
|
||||
displayName = CSTRING(TagSize_Name);
|
||||
description = CSTRING(TagSize_Description);
|
||||
values[] = {"$str_very_small", "$str_small", "$str_medium", "$str_large", "$str_very_large"};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -15,6 +15,38 @@ class CfgVehicles {
|
||||
typeName = "NUMBER";
|
||||
defaultValue = 5;
|
||||
};
|
||||
class showPlayerNames {
|
||||
displayName = CSTRING(ShowPlayerNames);
|
||||
description = CSTRING(ShowPlayerNames_Desc);
|
||||
typeName = "NUMBER";
|
||||
class values {
|
||||
class DoNotForce {
|
||||
default = 1;
|
||||
name = CSTRING(DoNotForce);
|
||||
value = -1;
|
||||
};
|
||||
class ForceHide {
|
||||
name = CSTRING(ForceHide);
|
||||
value = 0;
|
||||
};
|
||||
class ForceShow {
|
||||
name = CSTRING(ForceShow);
|
||||
value = 1;
|
||||
};
|
||||
class ForceShowOnlyCursor {
|
||||
name = CSTRING(ForceShowOnlyCursor);
|
||||
value = 2;
|
||||
};
|
||||
class ForceShowOnlyKeypress {
|
||||
name = CSTRING(ForceShowOnlyKeypress);
|
||||
value = 3;
|
||||
};
|
||||
class ForceShowOnlyCursorAndKeypress {
|
||||
name = CSTRING(ForceShowOnlyCursorAndKeypress);
|
||||
value = 4;
|
||||
};
|
||||
};
|
||||
};
|
||||
class showNamesForAI {
|
||||
displayName = CSTRING(showNamesForAI_DisplayName);
|
||||
description = CSTRING(showNamesForAI_Description);
|
||||
@ -66,4 +98,4 @@ class CfgVehicles {
|
||||
description = CSTRING(Module_Description);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
GVAR(ShowNamesTime) = -10;
|
||||
GVAR(showNamesTime) = -10;
|
||||
|
||||
// Add keybinds
|
||||
["ACE3 Common", QGVAR(showNameTags), localize LSTRING(ShowNames),
|
||||
@ -14,7 +14,7 @@ GVAR(ShowNamesTime) = -10;
|
||||
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
GVAR(ShowNamesTime) = ACE_time;
|
||||
GVAR(showNamesTime) = ACE_time;
|
||||
if (call FUNC(canShow)) then{ call FUNC(doShow); };
|
||||
// Return false so it doesn't block other actions
|
||||
false
|
||||
@ -61,5 +61,13 @@ GVAR(ShowNamesTime) = -10;
|
||||
// Wait until the colors are defined before starting to draw the nametags
|
||||
["SettingsInitialized", {
|
||||
// Draw handle
|
||||
addMissionEventHandler ["Draw3D", {_this call FUNC(onDraw3d);}];
|
||||
call FUNC(updateSettings);
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
||||
// Change settings accordingly when they are changed
|
||||
["SettingChanged", {
|
||||
PARAMS_1(_name);
|
||||
if (_name == QGVAR(showPlayerNames)) then {
|
||||
call FUNC(updateSettings);
|
||||
};
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
|
@ -10,5 +10,6 @@ PREP(initIsSpeaking);
|
||||
PREP(moduleNameTags);
|
||||
PREP(onDraw3d);
|
||||
PREP(setText);
|
||||
PREP(updateSettings);
|
||||
|
||||
ADDON = true;
|
||||
|
@ -13,6 +13,7 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
||||
#include <RscTitles.hpp>
|
||||
|
@ -1,12 +1,8 @@
|
||||
/*
|
||||
Author: aeroson
|
||||
|
||||
Description:
|
||||
Images, index in images and order of roles.
|
||||
Defined number also implies order, lower number shows more on top of the list.
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
* Author: aeroson
|
||||
* Images, index in images and order of roles.
|
||||
* Defined number also implies order, lower number shows more on top of the list.
|
||||
*/
|
||||
|
||||
#define PILOT 0
|
||||
#define DRIVER 1
|
||||
|
@ -1,19 +1,22 @@
|
||||
/*
|
||||
Author: aeroson
|
||||
|
||||
Description:
|
||||
Might be called several times a second
|
||||
|
||||
Parameters:
|
||||
None
|
||||
|
||||
Returns:
|
||||
true if CrewInfo can be shown, false otherwise
|
||||
*/
|
||||
|
||||
* Author: aeroson
|
||||
* Checks if crew info can be shown.
|
||||
* Might be called several times a second.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* Can show Crew Info <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* call ace_nametags_fnc_doShow
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_player"];
|
||||
private ["_player"];
|
||||
|
||||
_player = ACE_player;
|
||||
|
||||
|
@ -1,16 +1,18 @@
|
||||
/*
|
||||
Author: aeroson
|
||||
|
||||
Description:
|
||||
Shows the actual text and sets text the crew info
|
||||
|
||||
Parameters:
|
||||
None
|
||||
|
||||
Returns:
|
||||
Nothing
|
||||
*/
|
||||
|
||||
* Author: aeroson
|
||||
* Shows the actual text and sets text the crew info.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* call ace_nametags_fnc_doShow
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "common.hpp";
|
||||
|
||||
|
@ -1,17 +1,21 @@
|
||||
/*
|
||||
* Author: commy2, esteldunedain
|
||||
*
|
||||
* Draw the nametag and rank icon.
|
||||
*
|
||||
* Argument:
|
||||
* Arguments:
|
||||
* 0: Unit (Player) <OBJECT>
|
||||
* 1: Target <OBJECT>
|
||||
* 2: alpha (Number)
|
||||
* 4: Height offset (Number)
|
||||
* 2: Alpha <NUMBER>
|
||||
* 4: Height offset <NUMBER>
|
||||
* 5: Draw Type <NUMBER>
|
||||
*
|
||||
* Return value:
|
||||
* None.
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [ACE_player, _target, _alpha, _distance * 0.026, _icon] call ace_nametags_fnc_drawNameTagIcon
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
@ -1,46 +1,38 @@
|
||||
/*
|
||||
Author: aeroson
|
||||
|
||||
Description:
|
||||
Gathers and caches data needed by AGM_CrewInfo_fnc_doShow
|
||||
What really does make difference for the engine is simulation of CfgAmmo
|
||||
Priority of roles is: driver/pilot, gunner, copilot, commander, ffv, cargo
|
||||
|
||||
Parameters:
|
||||
None
|
||||
|
||||
Returns:
|
||||
[
|
||||
Is vehicle inherited from Air ?
|
||||
Array categorizing each vehicle's turret
|
||||
]
|
||||
*/
|
||||
|
||||
* Author: aeroson
|
||||
* Gathers and caches data needed by AGM_CrewInfo_fnc_doShow.
|
||||
* What really does make difference for the engine is simulation of CfgAmmo.
|
||||
* Priority of roles is: driver/pilot, gunner, copilot, commander, FFV, cargo.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* Data <ARRAY>
|
||||
* 0: Vehicle inherits from Air <BOOL>
|
||||
* 1: Categorized vehicle's turrets <ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* call ace_nametags_fnc_updateSettings
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "common.hpp";
|
||||
|
||||
private ["_type", "_varName", "_data", "_isAir", "_config", "_fnc_addTurret", "_fnc_addTurretUnit"];
|
||||
|
||||
private ["_type", "_varName", "_data"];
|
||||
|
||||
_type = _this select 0;
|
||||
PARAMS_1(_type);
|
||||
|
||||
_varName = format ["ACE_CrewInfo_Cache_%1", _type];
|
||||
_data = + (uiNamespace getVariable _varName);
|
||||
|
||||
if (!isNil "_data") exitWith {
|
||||
_data
|
||||
};
|
||||
if (!isNil "_data") exitWith {_data};
|
||||
|
||||
_data = [];
|
||||
|
||||
|
||||
|
||||
private ["_isAir", "_config", "_fnc_addTurret", "_fnc_addTurretUnit"];
|
||||
|
||||
_isAir = _type isKindOf "Air";
|
||||
|
||||
_fnc_addTurretUnit = {
|
||||
|
||||
private ["_config", "_path", "_role", "_simulationEmpty", "_simulationLaserDesignate", "_simulationOther", "_magazine", "_ammo", "_simulation"];
|
||||
|
||||
_config = _this select 0;
|
||||
@ -83,7 +75,6 @@ _fnc_addTurretUnit = {
|
||||
};
|
||||
|
||||
_data pushBack [_path, _role];
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -108,9 +99,7 @@ _fnc_addTurret = {
|
||||
} else {
|
||||
_offset = _offset + 1;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -4,13 +4,13 @@
|
||||
* Compatiblity with TFR/ACRE and Arma's VON
|
||||
*
|
||||
* Arguments:
|
||||
* NONE
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* NONE
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ACE_nametags_fnc_initIsSpeaking
|
||||
* [] call ace_nametags_fnc_initIsSpeaking
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
@ -20,9 +20,14 @@ if !(_activated) exitWith {};
|
||||
|
||||
GVAR(Module) = true;
|
||||
|
||||
[_logic, QGVAR(PlayerNamesViewDistance), "PlayerNamesViewDistance" ] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(ShowNamesForAI), "ShowNamesForAI" ] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(playerNamesViewDistance), "playerNamesViewDistance" ] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(showNamesForAI), "showNamesForAI" ] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(showVehicleCrewInfo), "showVehicleCrewInfo" ] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(showCursorTagForVehicles), "showCursorTagForVehicles" ] call EFUNC(common,readSettingFromModule);
|
||||
[_logic, QGVAR(showCursorTagForVehicles), "showCursorTagForVehicles" ] call EFUNC(common,readSettingFromModule);
|
||||
|
||||
// Do Not Force - read module setting only non-default is set due to using SCALAR
|
||||
if ((_logic getVariable "showPlayerNames") != -1) then {
|
||||
[_logic, QGVAR(showPlayerNames), "showPlayerNames" ] call EFUNC(common,readSettingFromModule);
|
||||
};
|
||||
|
||||
diag_log text "[ACE]: NameTags Module Initialized.";
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Author: <N/A>
|
||||
* Draws names and icons.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* call ace_nametags_fnc_onDraw3d
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_onKeyPressAlphaMax", "_defaultIcon", "_distance", "_alpha", "_icon", "_targets", "_pos2", "_vecy", "_relPos", "_projDist", "_pos", "_target", "_targetEyePosASL", "_ambientBrightness", "_maxDistance"];
|
||||
@ -9,7 +24,7 @@ _ambientBrightness = ((([] call EFUNC(common,ambientBrightness)) + ([0, 0.4] sel
|
||||
_maxDistance = _ambientBrightness * GVAR(PlayerNamesViewDistance);
|
||||
|
||||
_onKeyPressAlphaMax = if ((GVAR(showPlayerNames) in [3,4])) then {
|
||||
2 + (GVAR(ShowNamesTime) - ACE_time); //after release 1 second of full opacity, 1 second of fading to 0
|
||||
2 + (GVAR(showNamesTime) - ACE_time); //after release 1 second of full opacity, 1 second of fading to 0
|
||||
} else {
|
||||
1
|
||||
};
|
||||
@ -29,10 +44,10 @@ if (GVAR(showCursorTagForVehicles) && {_onKeyPressAlphaMax > 0}) then {
|
||||
if ((!isNull _target) &&
|
||||
{(side (group _target)) == (side (group ACE_player))} &&
|
||||
{_target != ACE_player} &&
|
||||
{GVAR(ShowNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
||||
{GVAR(showNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
||||
{!(_target getVariable ["ACE_hideName", false])}) then {
|
||||
_distance = ACE_player distance _target;
|
||||
_alpha = (((1 - 0.2 * (_distance - _maxDistance)) min 1) * GVAR(PlayerNamesMaxAlpha)) min _onKeyPressAlphaMax;
|
||||
_alpha = (((1 - 0.2 * (_distance - _maxDistance)) min 1) * GVAR(playerNamesMaxAlpha)) min _onKeyPressAlphaMax;
|
||||
[ACE_player, _target, _alpha, _distance * 0.026, _defaultIcon] call FUNC(drawNameTagIcon);
|
||||
};
|
||||
};
|
||||
@ -45,10 +60,10 @@ if ((GVAR(showPlayerNames) in [2,4]) && {_onKeyPressAlphaMax > 0}) then {
|
||||
{_target isKindOf "CAManBase"} &&
|
||||
{(side (group _target)) == (side (group ACE_player))} &&
|
||||
{_target != ACE_player} &&
|
||||
{GVAR(ShowNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
||||
{GVAR(showNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
||||
{!(_target getVariable ["ACE_hideName", false])}) then {
|
||||
_distance = ACE_player distance _target;
|
||||
_alpha = (((1 - 0.2 * (_distance - _maxDistance)) min 1) * GVAR(PlayerNamesMaxAlpha)) min _onKeyPressAlphaMax;
|
||||
_alpha = (((1 - 0.2 * (_distance - _maxDistance)) min 1) * GVAR(playerNamesMaxAlpha)) min _onKeyPressAlphaMax;
|
||||
_icon = ICON_NONE;
|
||||
if (GVAR(showSoundWaves) == 2) then { //icon will be drawn below, so only show name here
|
||||
_icon = if (([_target] call FUNC(isSpeaking)) && {(vehicle _target) == _target}) then {ICON_NAME} else {_defaultIcon};
|
||||
@ -87,7 +102,7 @@ if (((GVAR(showPlayerNames) in [1,3]) && {_onKeyPressAlphaMax > 0}) || {GVAR(sho
|
||||
if ((_icon != ICON_NONE) &&
|
||||
{(side (group _target)) == (side (group ACE_player))} &&
|
||||
{_target != ACE_player} &&
|
||||
{GVAR(ShowNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
||||
{GVAR(showNamesForAI) || {[_target] call EFUNC(common,isPlayer)}} &&
|
||||
{!(_target getVariable ["ACE_hideName", false])}) then {
|
||||
|
||||
_targetEyePosASL = eyePos _target;
|
||||
@ -97,7 +112,7 @@ if (((GVAR(showPlayerNames) in [1,3]) && {_onKeyPressAlphaMax > 0}) || {GVAR(sho
|
||||
_distance = vectorMagnitude _relPos;
|
||||
_projDist = _relPos vectorDistance (_vecy vectorMultiply (_relPos vectorDotProduct _vecy));
|
||||
|
||||
_alpha = (((1 - 0.2 * (_distance - _maxDistance)) min 1) * GVAR(PlayerNamesMaxAlpha)) min _onKeyPressAlphaMax;
|
||||
_alpha = (((1 - 0.2 * (_distance - _maxDistance)) min 1) * GVAR(playerNamesMaxAlpha)) min _onKeyPressAlphaMax;
|
||||
|
||||
[ACE_player, _target, _alpha, _distance * 0.026, _icon] call FUNC(drawNameTagIcon);
|
||||
};
|
||||
|
@ -1,25 +1,28 @@
|
||||
/*
|
||||
Author: aeroson
|
||||
|
||||
Description:
|
||||
Sets the text on the dialog
|
||||
|
||||
Parameters:
|
||||
None
|
||||
|
||||
Returns:
|
||||
Nothing
|
||||
*/
|
||||
|
||||
/*
|
||||
* Author: aeroson
|
||||
* Sets the text on the dialog.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Text <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* call ace_nametags_fnc_setText
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define TextIDC 11123
|
||||
|
||||
private["_text", "_ctrl"];
|
||||
PARAMS_1(_text);
|
||||
|
||||
private["_ctrl"];
|
||||
|
||||
disableSerialization;
|
||||
|
||||
_text = _this select 0;
|
||||
_ctrl = (uiNamespace getVariable QGVAR(dialog)) displayCtrl TextIDC;
|
||||
_ctrl ctrlSetStructuredText parseText _text;
|
||||
_ctrl ctrlCommit 0;
|
||||
|
25
addons/nametags/functions/fnc_updateSettings.sqf
Normal file
25
addons/nametags/functions/fnc_updateSettings.sqf
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Author: Jonpas
|
||||
* Dynamically adds and removes Draw3D based on settings on run-time.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* call ace_nametags_fnc_updateSettings
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (isNil QGVAR(drawHandler) && {GVAR(showPlayerNames) != 0}) then {
|
||||
GVAR(drawHandler) = addMissionEventHandler ["Draw3D", {_this call FUNC(onDraw3d);}];
|
||||
} else {
|
||||
if (!isNil QGVAR(drawHandler) && {GVAR(showPlayerNames) == 0}) then {
|
||||
removeMissionEventHandler ["Draw3D", GVAR(drawHandler)];
|
||||
GVAR(drawHandler) = nil;
|
||||
};
|
||||
};
|
@ -152,7 +152,7 @@
|
||||
<German>Verstecken erzwingen</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_NameTags_ForceShow">
|
||||
<English>Force show</English>
|
||||
<English>Force Show</English>
|
||||
<Polish>Wymuś wyświetlanie</Polish>
|
||||
<Spanish>Mostrar forzado</Spanish>
|
||||
<German>Anzeigen erzwingen</German>
|
||||
@ -182,7 +182,7 @@
|
||||
<German>Zeige Maus-Namensanzeigen für Fahrzeugkommandanten (nur wenn der Client Namensanzeigen aktiviert hat). Standard: Nein</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_NameTags_Module_Description">
|
||||
<English></English>
|
||||
<English>This module allows you to customize settings and range of Name Tags.</English>
|
||||
<Polish>Moduł ten pozwala dostosować ustawienia i zasięg wyświetlania imion.</Polish>
|
||||
<German>Dieses Modul erlaubt die Einstellungen der Anzeigenamen zu verändern.</German>
|
||||
</Key>
|
||||
@ -199,23 +199,32 @@
|
||||
<German>Aktiviert</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_NameTags_OnlyCursor">
|
||||
<English>Only Cursor</English>
|
||||
<English>Only on Cursor</English>
|
||||
<Polish>Tylko pod kursorem</Polish>
|
||||
<Spanish>Solo cursor</Spanish>
|
||||
<German>Nur bei Maus</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_NameTags_OnlyOnKeypress">
|
||||
<English>Only On Keypress</English>
|
||||
<Key ID="STR_ACE_NameTags_OnlyKeypress">
|
||||
<English>Only on Keypress</English>
|
||||
<Polish>Tylko po wciśnięciu klawisza</Polish>
|
||||
<Spanish>Solo al pulsar tecla</Spanish>
|
||||
<German>Nur bei Tastendruck</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_NameTags_OnlyCursorAndKeyPress">
|
||||
<English>Only Cursor and KeyPress</English>
|
||||
<Key ID="STR_ACE_NameTags_OnlyCursorAndKeypress">
|
||||
<English>Only on Cursor and Keypress</English>
|
||||
<Polish>Tylko pod kursorem i po wciśnięciu klawisza</Polish>
|
||||
<Spanish>En cursor y al pulsar tecla</Spanish>
|
||||
<German>Nur Maus und Tastendruck</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_NameTags_ForceShowOnlyCursor">
|
||||
<English>Force Show Only on Cursor</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_NameTags_ForceShowOnlyKeypress">
|
||||
<English>Force Show Only on Keypress</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_NameTags_ForceShowOnlyCursorAndKeypress">
|
||||
<English>Force Show Only on Cursor and Keypress</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_NameTags_NameTagSettings">
|
||||
<English>Use Nametag settings</English>
|
||||
<Polish>Użyj ustawień imion</Polish>
|
||||
@ -229,17 +238,17 @@
|
||||
<German>Immer alle zeigen</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_NameTags_ShowPlayerNames_Desc">
|
||||
<English></English>
|
||||
<English>Show player names and set their activation. Default: Enabled</English>
|
||||
<Polish>Opcja ta pozwala dostosować sposób wyświetlania imion nad głowami graczy. Opcja "Tylko po wciśnięciu klawisza" wyświetla imiona tylko przytrzymania klawisza "Modyfikator" dostępnego w menu ustawień addonów -> ACE3.</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_NameTags_ShowSoundWaves_Desc">
|
||||
<English></English>
|
||||
<English>Effect of sound waves above the heads of speaking players after holding the PTT key. This option works with TFAR and ACRE2.</English>
|
||||
<Polish>Opcja ta pozwala dostosować sposób wyświetlania efektu fal dźwiękowych nad głowami mówiących graczy, wyświetlanych po przytrzymaniu klawisza PTT. Opcja ta współpracuje z TFAR oraz ACRE2.</Polish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_nametags_tagsize_name">
|
||||
<Key ID="STR_ACE_NameTags_TagSize_Name">
|
||||
<English>Nametags Size</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_nametags_tagsize_description">
|
||||
<Key ID="STR_ACE_NameTags_TagSize_Description">
|
||||
<English>Text and Icon Size Scaling</English>
|
||||
</Key>
|
||||
</Package>
|
||||
|
@ -1,12 +1,11 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
|
||||
};
|
||||
class ADDON {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
clientInit = QUOTE( call COMPILE_FILE(XEH_clientInit) );
|
||||
init = QUOTE( call COMPILE_FILE(XEH_postInit) );
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
|
||||
if (missionNamespace getVariable [QGVAR(EnableSwitchUnits), false]) then {
|
||||
[player] call FUNC(startSwitchUnits);
|
||||
} else {
|
||||
@ -24,5 +25,5 @@ if (missionNamespace getVariable [QGVAR(EnableSwitchUnits), false]) then {
|
||||
if ((_name == QGVAR(EnableSwitchUnits)) && {_value}) then {
|
||||
[player] call FUNC(startSwitchUnits);
|
||||
};
|
||||
}] call EFUNC(common,addEventhandler);
|
||||
}] call EFUNC(common,addEventhandler);
|
||||
};
|
@ -14,4 +14,4 @@ class CfgPatches {
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "ACE_Settings.hpp"
|
||||
|
Loading…
Reference in New Issue
Block a user