mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Localization/ headers
This commit is contained in:
parent
f7ff4a2f36
commit
05f1b884fa
@ -254,7 +254,7 @@ if(isMultiplayer && { time > 0 || isNull player } ) then {
|
||||
GVAR(deviceKeyHandlingArray) = [];
|
||||
GVAR(deviceKeyCurrentIndex) = -1;
|
||||
|
||||
["ACE3 Equipment", QGVAR(openDevice), "Open Device", //(localize "STR_ACE_microdagr_toggleUnit"),
|
||||
["ACE3 Equipment", QGVAR(openDevice), (localize "STR_ACE_Common_toggleHandheldDevice"),
|
||||
{
|
||||
[] call FUNC(deviceKeyFindValidIndex);
|
||||
if (GVAR(deviceKeyCurrentIndex) == -1) exitWith {false};
|
||||
@ -264,7 +264,7 @@ GVAR(deviceKeyCurrentIndex) = -1;
|
||||
{false},
|
||||
[0xC7, [false, false, false]], false] call cba_fnc_addKeybind; //Home Key
|
||||
|
||||
["ACE3 Equipment", QGVAR(closeDevice), "Close Device", //(localize "STR_ACE_microdagr_toggleUnit"),
|
||||
["ACE3 Equipment", QGVAR(closeDevice), (localize "STR_ACE_Common_closeHandheldDevice"),
|
||||
{
|
||||
[] call FUNC(deviceKeyFindValidIndex);
|
||||
if (GVAR(deviceKeyCurrentIndex) == -1) exitWith {false};
|
||||
@ -273,14 +273,12 @@ GVAR(deviceKeyCurrentIndex) = -1;
|
||||
{false},
|
||||
[0xC7, [false, true, false]], false] call cba_fnc_addKeybind; //CTRL + Home Key
|
||||
|
||||
["ACE3 Equipment", QGVAR(cycleDevice), "Cycle Devices", //(localize "STR_ACE_microdagr_toggleUnit"),
|
||||
["ACE3 Equipment", QGVAR(cycleDevice), (localize "STR_ACE_Common_cycleHandheldDevices"),
|
||||
{
|
||||
systemChat "here";
|
||||
[1] call FUNC(deviceKeyFindValidIndex);
|
||||
if (GVAR(deviceKeyCurrentIndex) == -1) exitWith {false};
|
||||
_displayName = ((GVAR(deviceKeyHandlingArray) select GVAR(deviceKeyCurrentIndex)) select 0);
|
||||
_iconImage = ((GVAR(deviceKeyHandlingArray) select GVAR(deviceKeyCurrentIndex)) select 1);
|
||||
systemChat str [_displayName, _iconImage];
|
||||
[_displayName, _iconImage] call FUNC(displayTextPicture);
|
||||
},
|
||||
{false},
|
||||
|
@ -1,4 +1,18 @@
|
||||
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Finds next valid index for the device array.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Offset from currentIndex (use 1 to find next valid) <NUMBER><OPTIONAL>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_common_fnc_deviceKeyFindValidIndex
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
DEFAULT_PARAM(0,_offsetBy,0);
|
||||
|
@ -1,5 +1,24 @@
|
||||
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Finds next valid index for the device array.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Localized Device Display Name <STRING>
|
||||
* 1: Image <STRING>
|
||||
* 2: Condtion Code (do they have the device) <CODE>
|
||||
* 3: Toggle Code (on home press) <CODE>
|
||||
* 4: Close Code (on ctrl-home press) <CODE>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [(localize "STR_ACE_microdagr_itemName"), QUOTE(PATHTOF(images\microDAGR_item.paa)), _conditonCode, _toggleCode, _closeCode] call ace_common_fnc_deviceKeyRegisterNew
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_5(_displayName,_iconImage,_conditionCode,_toggleCode,_closeCode);
|
||||
|
||||
GVAR(deviceKeyHandlingArray) pushBack [_displayName,_iconImage,_conditionCode,_toggleCode,_closeCode];
|
||||
|
@ -470,5 +470,14 @@
|
||||
<French>Une banane est un fruit qui, d'un point de vue botanique, fait partie du groupe des baies. Produite par plusieurs sortes de grandes plantes à fleurs herbacées du type Musa.</French>
|
||||
<Portuguese>A banana é uma fruta comestível, botanicamente uma baga, produzida por vários tipos de plantas herbáceas grandes do genero Musa.</Portuguese>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_toggleHandheldDevice">
|
||||
<English>Toggle Device</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_closeHandheldDevice">
|
||||
<English>Close Device</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Common_cycleHandheldDevices">
|
||||
<English>Cycle Devices</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
</Project>
|
@ -3,8 +3,10 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
//Add deviceKey entry:
|
||||
private ["_conditonCode", "_toggleCode", "_closeCode"];
|
||||
_conditonCode = {
|
||||
("ACE_microDAGR" in (items ace_player))
|
||||
("ACE_microDAGR" in (items ace_player))
|
||||
};
|
||||
_toggleCode = {
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
@ -16,37 +18,7 @@ _closeCode = {
|
||||
[DISPLAY_MODE_CLOSED] call FUNC(openDisplay);
|
||||
true
|
||||
};
|
||||
|
||||
["Mdagr", "", _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
||||
|
||||
|
||||
/* //Add Keybinds:
|
||||
["ACE3 Equipment", QGVAR(openGPS), (localize "STR_ACE_microdagr_toggleUnit"),
|
||||
{
|
||||
// canInteractWith (can use on map)
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!("ACE_microDAGR" in (items ace_player))) exitWith {false};
|
||||
|
||||
[] call FUNC(openDisplay); //toggle display mode
|
||||
true;
|
||||
},
|
||||
{false},
|
||||
[0xC7, [false, false, false]], false] call cba_fnc_addKeybind; //Home Key
|
||||
|
||||
["ACE3 Equipment", QGVAR(closeGPS), (localize "STR_ACE_microdagr_closeUnit"),
|
||||
{
|
||||
// canInteractWith (can use on map)
|
||||
if !([ACE_player, objNull, ["notOnMap", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!("ACE_microDAGR" in (items ace_player))) exitWith {false};
|
||||
if (GVAR(currentShowMode) == DISPLAY_MODE_CLOSED) exitWith {false};
|
||||
|
||||
[DISPLAY_MODE_CLOSED] call FUNC(openDisplay); //close unit
|
||||
true;
|
||||
},
|
||||
{false},
|
||||
[0xC7, [false, true, false]], false] call cba_fnc_addKeybind; //CTRL + Home Key */
|
||||
[(localize "STR_ACE_microdagr_itemName"), QUOTE(PATHTOF(images\microDAGR_item.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew);
|
||||
|
||||
//Add Eventhandler:
|
||||
["RangerfinderData", {_this call FUNC(recieveRangefinderData)}] call EFUNC(common,addEventHandler);
|
||||
|
Loading…
Reference in New Issue
Block a user