iMenu - Add some localization and fix veh icons

This commit is contained in:
PabstMirror 2015-04-03 00:42:25 -05:00
parent e99e35d70b
commit 33ee7dc07c
3 changed files with 29 additions and 5 deletions

View File

@ -1,6 +1,8 @@
//XEH_clientInit.sqf
#include "script_component.hpp"
if (!hasInterface) exitWith {};
// Install the render EH on the main display
addMissionEventHandler ["Draw3D", DFUNC(render)];
@ -10,17 +12,17 @@ addMissionEventHandler ["Draw3D", DFUNC(render)];
// Wait until the map display is detected
waitUntil {(!isNull findDisplay 12)};
// Install the render EH on the map screen
// Install the render EH on the map screen
((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", DFUNC(render)];
};
["ACE3", QGVAR(InteractKey), "Interact Key",
["ACE3", QGVAR(InteractKey), (localize "STR_ACE_Interact_Menu_InteractKey"),
{[0] call FUNC(keyDown)},
{[0] call FUNC(keyUp)},
[219, [false, false, false]], false] call cba_fnc_addKeybind; //Left Windows Key
["ACE3", QGVAR(SelfInteractKey), "Self Actions Key",
["ACE3", QGVAR(SelfInteractKey), (localize "STR_ACE_Interact_Menu_SelfInteractKey"),
{[1] call FUNC(keyDown)},
{[1] call FUNC(keyUp)},
[219, [false, true, false]], false] call cba_fnc_addKeybind; //Left Windows Key + Ctrl/Strg

View File

@ -83,11 +83,19 @@ private ["_baseDisplayName", "_baseIcon"];
_baseDisplayName = "";
_baseIcon = "";
if (_objectType isKindOf "CAManBase") then {
_baseDisplayName = "Self Actions";
_baseDisplayName = localize "STR_ACE_Interact_Menu_SelfActionsRoot";
_baseIcon = "\a3\ui_f\data\IGUI\Cfg\Actions\eject_ca.paa";
} else {
_baseDisplayName = getText (configFile >> "CfgVehicles" >> _objectType >> "displayName");
//Alt would be to just use a static text, if veh names end up being too long:
// _baseDisplayName = localize "STR_ACE_Interact_Menu_VehicleActionsRoot";
//Pull the icon from the vehicle's config:
_baseIcon = getText (configFile >> "CfgVehicles" >> _objectType >> "Icon");
//icon could be a CfgVehicleIcons
if isText (configFile >> "CfgVehicleIcons" >> _baseIcon) then {
_baseIcon = getText (configFile >> "CfgVehicleIcons" >> _baseIcon);
};
};
// Create a master action to base on self action

View File

@ -1,7 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Edited with tabler - 2015-04-03 -->
<Project name="ACE">
<Package name="Interact_Menu">
<Key ID="STR_ACE_Interact_Menu_AlwaysUseCursorSelfInteraction">
<English>Always display cursor for self interaction</English>
</Key>
</Project>
<Key ID="STR_ACE_Interact_Menu_InteractKey">
<English>Interact Key</English>
</Key>
<Key ID="STR_ACE_Interact_Menu_SelfInteractKey">
<English>Self Interaction Key</English>
</Key>
<Key ID="STR_ACE_Interact_Menu_SelfActionsRoot">
<English>Self Actions</English>
</Key>
<Key ID="STR_ACE_Interact_Menu_VehicleActionsRoot">
<English>Vehicle Actions</English>
</Key>
</Package>
</Project>