Update keyboard.sqf

Pressing the F3 increases variable DZE_UI by one each time. The variable gets reset to zero when it reaches 6.
This commit is contained in:
worldwidesorrow
2020-04-21 14:35:07 -05:00
committed by GitHub
parent f768226065
commit 8ab9c2252a

View File

@@ -69,13 +69,10 @@ if (isNil "keyboard_keys") then {
_handled = true;
};
_statusUI = {
if (profileNamespace getVariable ["statusUI",1] == 1) then {
profileNamespace setVariable ["statusUI",0];
[format[localize "STR_UI_STATUS_ICONS" + " %1",localize "STR_DISABLED"],1] call dayz_rollingMessages;
} else {
profileNamespace setVariable ["statusUI",1];
[format[localize "STR_UI_STATUS_ICONS" + " %1",localize "STR_ENABLED"],1] call dayz_rollingMessages;
};
DZE_UI = DZE_UI + 1;
if (DZE_UI == 6) then {DZE_UI = 0; [format[localize "STR_UI_STATUS_ICONS" + " %1",localize "STR_DISABLED"],1] call dayz_rollingMessages;};
if (DZE_UI == 1) then {[format[localize "STR_UI_STATUS_ICONS" + " %1",localize "STR_ENABLED"],1] call dayz_rollingMessages;};
profileNamespace setVariable ["statusUI",DZE_UI];
saveProfileNamespace;
call ui_changeDisplay;
_handled = true;
@@ -344,4 +341,4 @@ if (!isNil "_code") then {
call _code;
};
_handled
_handled