diff --git a/addons/markers/functions/fnc_onButtonClickConfirm.sqf b/addons/markers/functions/fnc_onButtonClickConfirm.sqf index d8bb76795b..b5f9e4a78b 100644 --- a/addons/markers/functions/fnc_onButtonClickConfirm.sqf +++ b/addons/markers/functions/fnc_onButtonClickConfirm.sqf @@ -21,59 +21,61 @@ private _description = _display displayCtrl IDC_INSERT_MARKER; private _aceTimestamp = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP; // handle timestamp -if (cbChecked _aceTimestamp && {ACE_player call FUNC(canTimestamp)}) then { - private _time = []; +if (cbChecked _aceTimestamp && { + ACE_player call FUNC(canTimestamp) +}) then { + private _time = []; - switch (GVAR(timestampTimezone)) do - { - default - { - _time = dayTime; - }; - case 1: - { - systemTime params ["", "", "", "_hour", "_min", "_sec"]; - _time = _hour + _min/60 + _sec/3600; - }; - case 2: - { - _offset = GVAR(timestampUTCOffset); - systemTimeUTC params["", "", "", "_hour", "_min", "_sec"]; - _hour = _hour + _offset; - if (_hour < 0) then { - _hour = 24 + _hour; - }; - if (_hour > 24) then { - _hour = _hour - 24; - }; - _time = _hour + _min/60 + _sec/3600; - }; - }; + switch (GVAR(timestampTimezone)) do + { + default + { + _time = dayTime; + }; + case 1: + { + systemTime params ["", "", "", "_hour", "_min", "_sec"]; + _time = _hour + _min/60 + _sec/3600; + }; + case 2: + { + _offset = GVAR(timestampUTCOffset); + systemTimeUTC params["", "", "", "_hour", "_min", "_sec"]; + _hour = _hour + round(_offset); + if (_hour < 0) then { + _hour = 24 + _hour; + }; + if (_hour > 24) then { + _hour = _hour - 24; + }; + _time = _hour + _min/60 + _sec/3600; + }; + }; - // add timestamp suffix - private _periodPostfix = ""; - if (GVAR(timestampHourFormat) == 12) then { - if (floor _time == 0) exitWith { - _time = _time + 12; - _periodPostfix = " am"; - }; + // add timestamp suffix + private _periodPostfix = ""; + if (GVAR(timestampHourFormat) == 12) then { + if (floor _time == 0) exitWith { + _time = _time + 12; + _periodPostfix = " am"; + }; - if (floor _time == 12) exitWith { - _periodPostfix = " pm"; - }; + if (floor _time == 12) exitWith { + _periodPostfix = " pm"; + }; - if (_time < 12) then { - _periodPostfix = " am"; - } else { - _time = _time - 12; - _periodPostfix = " pm"; - }; - }; + if (_time < 12) then { + _periodPostfix = " am"; + } else { + _time = _time - 12; + _periodPostfix = " pm"; + }; + }; - _description ctrlSetText format [ - "%1 [%2%3]", - ctrlText _description, - [_time, GVAR(timestampFormat)] call BIS_fnc_timeToString, - _periodPostfix - ]; + _description ctrlSetText format [ + "%1 [%2%3]", + ctrlText _description, + [_time, GVAR(timestampFormat)] call BIS_fnc_timeToString, + _periodPostfix + ]; }; \ No newline at end of file diff --git a/addons/markers/initSettings.sqf b/addons/markers/initSettings.sqf index 1c76c8a839..7e36cae16f 100644 --- a/addons/markers/initSettings.sqf +++ b/addons/markers/initSettings.sqf @@ -1,81 +1,83 @@ -private _categoryName = format ["ACE %1", localize ELSTRING(map, Module_DisplayName)]; +private _categoryName = format ["ACE %1", localize ELSTRING(map,Module_DisplayName)]; [ - QGVAR(moveRestriction), "LIST", - [LSTRING(MoveRestriction), LSTRING(MoveRestriction_Description)], - [_categoryName, LLSTRING(Module_DisplayName)], - [ - [ - MOVE_RESTRICTION_NOBODY, - MOVE_RESTRICTION_ALL, - MOVE_RESTRICTION_ADMINS, - MOVE_RESTRICTION_GROUP_LEADERS, - MOVE_RESTRICTION_GROUP_LEADERS_ADMINS, - MOVE_RESTRICTION_OWNER - ], - [ - LSTRING(MoveRestriction_Nobody), - LSTRING(MoveRestriction_All), - LSTRING(MoveRestriction_Admins), - LSTRING(MoveRestriction_GroupLeaders), - LSTRING(MoveRestriction_GroupLeadersAndAdmins), - LSTRING(MoveRestriction_Owner) - ], - 1 - ] + QGVAR(moveRestriction), "LIST", + [LSTRING(MoveRestriction), LSTRING(MoveRestriction_Description)], + [_categoryName, LLSTRING(Module_DisplayName)], + [ + [ + MOVE_RESTRICTION_NOBODY, + MOVE_RESTRICTION_ALL, + MOVE_RESTRICTION_ADMINS, + MOVE_RESTRICTION_GROUP_LEADERS, + MOVE_RESTRICTION_GROUP_LEADERS_ADMINS, + MOVE_RESTRICTION_OWNER + ], + [ + LSTRING(MoveRestriction_Nobody), + LSTRING(MoveRestriction_All), + LSTRING(MoveRestriction_Admins), + LSTRING(MoveRestriction_GroupLeaders), + LSTRING(MoveRestriction_GroupLeadersAndAdmins), + LSTRING(MoveRestriction_Owner) + ], + 1 + ] ] call CBA_fnc_addSetting; [ - QGVAR(timestampEnabled), "CHECKBOX", - [LSTRING(TimestampEnabled), LSTRING(TimestampEnabledDescription)], - [_categoryName, LLSTRING(Module_DisplayName)], - true + QGVAR(timestampEnabled), "CHECKBOX", + [LSTRING(TimestampEnabled), LSTRING(TimestampEnabledDescription)], + [_categoryName, LLSTRING(Module_DisplayName)], + true ] call CBA_fnc_addSetting; [ - QGVAR(timestampTimezone), "LIST", - [LSTRING(TimestampTimezone), LSTRING(TimestampTimezoneDescription)], - [_categoryName, LLSTRING(Module_DisplayName)], - [ - [0, 1, 2], - [LSTRING(TimestampTimezoneIngameTime), LSTRING(TimestampTimezoneSystemTime), LSTRING(TimestampTimezoneUTCTime)], - 0 - ] + QGVAR(timestampTimezone), "LIST", + [LSTRING(TimestampTimezone), LSTRING(TimestampTimezoneDescription)], + [_categoryName, LLSTRING(Module_DisplayName)], + [ + [0, 1, 2], + [LSTRING(TimestampTimezoneIngameTime), LSTRING(TimestampTimezoneSystemTime), LSTRING(TimestampTimezoneUTCTime)], + 0 + ], + true ] call CBA_fnc_addSetting; [ - QGVAR(timestampUTCOffset), "SLIDER", - [LSTRING(TimestampUTCOffset), LSTRING(TimestampUTCOffsetDescription)], - [_categoryName, LLSTRING(Module_DisplayName)], - [-12, 12, 0, 0] + QGVAR(timestampUTCOffset), "SLIDER", + [LSTRING(TimestampUTCOffset), LSTRING(TimestampUTCOffsetDescription)], + [_categoryName, LLSTRING(Module_DisplayName)], + [-12, 12, 0, 0], + true ] call CBA_fnc_addSetting; [ - QGVAR(timestampHourFormat), "LIST", - [LSTRING(TimestampHourFormat), LSTRING(TimestampHourFormatDescription)], - [_categoryName, LLSTRING(Module_DisplayName)], - [ - [24, 12], - [LSTRING(TimestampHourFormat24), LSTRING(TimestampHourFormat12)], - 0 - ] + QGVAR(timestampHourFormat), "LIST", + [LSTRING(TimestampHourFormat), LSTRING(TimestampHourFormatDescription)], + [_categoryName, LLSTRING(Module_DisplayName)], + [ + [24, 12], + [LSTRING(TimestampHourFormat24), LSTRING(TimestampHourFormat12)], + 0 + ] ] call CBA_fnc_addSetting; private _formatDescription = [ - LLSTRING(TimestampFormatDescription0), - LLSTRING(TimestampFormatDescription1), - LLSTRING(TimestampFormatDescription2), - LLSTRING(TimestampFormatDescription3), - LLSTRING(TimestampFormatDescription4) + LLSTRING(TimestampFormatDescription0), + LLSTRING(TimestampFormatDescription1), + LLSTRING(TimestampFormatDescription2), + LLSTRING(TimestampFormatDescription3), + LLSTRING(TimestampFormatDescription4) ] joinString endl; [ - QGVAR(timestampFormat), "LIST", - [LSTRING(timestampFormat), _formatDescription], - [_categoryName, LLSTRING(Module_DisplayName)], - [ - ["HH", "HH:MM", "HH:MM:SS", "HH:MM:SS:MM"], - ["HH", "HH:MM", "HH:MM:SS", "HH:MM:SS:MM"], - 1 - ] + QGVAR(timestampFormat), "LIST", + [LSTRING(timestampFormat), _formatDescription], + [_categoryName, LLSTRING(Module_DisplayName)], + [ + ["HH", "HH:MM", "HH:MM:SS", "HH:MM:SS:MM"], + ["HH", "HH:MM", "HH:MM:SS", "HH:MM:SS:MM"], + 1 + ] ] call CBA_fnc_addSetting; \ No newline at end of file diff --git a/build/_deps/googletest-src b/build/_deps/googletest-src new file mode 160000 index 0000000000..9345421658 --- /dev/null +++ b/build/_deps/googletest-src @@ -0,0 +1 @@ +Subproject commit 934542165899c786cb5d8a710529c37184730183