Add option to turn on/off cursor coordinates

This commit is contained in:
esteldunedain 2015-04-08 01:49:56 -03:00
parent 691ab012b4
commit b18bcf8835
4 changed files with 19 additions and 5 deletions

View File

@ -36,6 +36,15 @@ class CfgVehicles {
class No { name = "No"; value = 0; default = 1;};
};
};
class MapShowCursorCoordinates {
displayName = "Show cursor coordinates?";
description = "Show the grid coordinates on the mouse pointer?";
typeName = "BOOL";
class values {
class Yes { name = "Yes"; value = 1; };
class No { name = "No"; value = 0; default = 1;};
};
};
};
};

View File

@ -20,13 +20,13 @@ call FUNC(determineZoom);
};
// Note: doesn't work on postInit in SP, therefore use default setting
(findDisplay 12 displayCtrl 1016) ctrlShow (GETGVAR(showPositionOnCursor,false));
(findDisplay 12 displayCtrl 1016) ctrlShow GVAR(mapShowCursorCoordinates);
["mapDisplayLoaded", {
//hint str _this; systemChat str _this; diag_log str _this;
if (_this select 1 == "ingame") then {
((_this select 0) displayCtrl 1016) ctrlShow (GETGVAR(showPositionOnCursor,false));
((_this select 0) displayCtrl 1016) ctrlShow GVAR(mapShowCursorCoordinates);
};
}] call FUNC(addEventhandler);

View File

@ -48,6 +48,10 @@ class ACE_Settings {
value = 0;
typeName = "BOOL";
};
class GVAR(mapShowCursorCoordinates) {
value = 0;
typeName = "BOOL";
};
};
#include "CfgEventHandlers.hpp"

View File

@ -15,8 +15,9 @@ _activated = _this select 2;
if !(_activated) exitWith {};
[_logic, QGVAR(mapIllumination), "MapIllumination"] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(mapShake), "MapShake" ] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(mapLimitZoom), "MapLimitZoom" ] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(mapIllumination), "MapIllumination" ] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(mapShake), "MapShake" ] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(mapLimitZoom), "MapLimitZoom" ] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(mapShowCursorCoordinates), "MapShowCursorCoordinates"] call EFUNC(common,readSettingFromModule);
diag_log text "[ACE]: Interaction Module Initialized.";