Add uiNamespace variable to spectator display (#5520)

* Add uiNamespace variable to spectator UI

* Update spectator keys to match docs branch
This commit is contained in:
SilentSpike 2017-09-16 21:20:32 +01:00 committed by PabstMirror
parent 357f3a9ceb
commit b0c27d1071
2 changed files with 5 additions and 3 deletions

View File

@ -147,20 +147,20 @@ if (_key == DIK_F1) exitWith {
};
// Handle toggle focus info widget
if (_key == DIK_P) exitWith {
if (_key == DIK_I) exitWith {
GVAR(uiWidgetVisible) = !GVAR(uiWidgetVisible);
[] call FUNC(ui_updateWidget);
true
};
// Handle toggling projectile drawing
if (_key == DIK_O) exitWith {
if (_key == DIK_P) exitWith {
GVAR(drawProjectiles) = !GVAR(drawProjectiles);
true
};
// Handle toggling unit drawing
if (_key == DIK_I) exitWith {
if (_key == DIK_O) exitWith {
GVAR(drawUnits) = !GVAR(drawUnits);
true
};

View File

@ -17,6 +17,8 @@ class GVAR(display) {
enableSimulation = 1;
movingEnable = 0;
closeOnMissionEnd = 1;
onLoad = QUOTE(SETUVAR(GVAR(display),_this select 0));
onKeyDown = QUOTE(_this call FUNC(ui_handleKeyDown));
onKeyUp = QUOTE(_this call FUNC(ui_handleKeyUp));