-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add diary record with all addon versions (#188)
- Loading branch information
1 parent
e361921
commit bb456a9
Showing
8 changed files
with
61 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "script_component.hpp" | ||
|
||
params ["_title"]; | ||
|
||
assert(!isNil QGVAR(helpRecords)); | ||
GVAR(helpRecords) getOrDefault [_title, diaryRecordNull]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#include "..\script_component.hpp" | ||
|
||
private _pad = { | ||
params ["_str", "_targetLen"]; | ||
private _strLen = count _str; | ||
if (_strLen >= _targetLen) exitWith {_str}; | ||
|
||
private _a = []; | ||
_a resize (_targetLen - _strLen); | ||
(_str + ((_a apply {" "}) joinString "")); | ||
}; | ||
|
||
private _description = [ | ||
" LOCAL | SERVER | ADDON <br/>", | ||
"------------|------------|---------- <br/>" | ||
]; | ||
|
||
private _addonNames = keys grad_versionCheck_versions; | ||
_addonNames sort true; | ||
{ | ||
private _name = _x; | ||
|
||
private _myVersion = (grad_versionCheck_versions getOrDefault [_name, ["-", false]])#0; | ||
if (_myVersion isEqualTo "") then { | ||
_myVersion = "-"; | ||
}; | ||
_myVersion = [_myVersion, 10] call _pad; | ||
private _serverVersion = (grad_versionCheck_versions_server getOrDefault [_name, ["-", false]])#0; | ||
if (_serverVersion isEqualTo "") then { | ||
_serverVersion = "-"; | ||
}; | ||
_serverVersion = [_serverVersion, 10] call _pad; | ||
|
||
_description pushBack (format [" %1 | %2 | %3 <br/>", _myVersion, _serverVersion, _name]); | ||
|
||
} forEach _addonNames; | ||
|
||
player setDiaryRecordText [["grad_ui_helpSubject", [GVAR(addonVersionsTitle)] call EFUNC(ui,getHelpRecord)], [GVAR(addonVersionsTitle), "<font face=""EtelkaMonospacePro"" size=""8"">" + (_description joinString "") + "</font>"]] |