mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
- Fixed tab problem
Was a bit enthusiastic with removing tabs. This should to the trick.
This commit is contained in:
parent
e44246b244
commit
d13071baf6
@ -21,61 +21,59 @@ 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 + _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
|
||||
];
|
||||
};
|
@ -1,81 +1,81 @@
|
||||
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
|
||||
]
|
||||
] 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]
|
||||
] 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;
|
Loading…
Reference in New Issue
Block a user