ACE3/addons/optionsmenu/init_loadMainMenuBox.sqf

33 lines
1.0 KiB
Plaintext
Raw Normal View History

2015-05-13 19:05:13 +00:00
/*
* Author: PabstMirror
* Loads the version info HTML box from main menu
*
* Arguments:
* 0: Display (from onMouseMoving) <DISPLAY>
*
* Return Value:
* None
*
* Example:
* onMouseMovingEvent execVM "script_loadMainMenuBox.sqf";
*
* Public: No
*/
#include "script_component.hpp"
2015-06-05 22:23:51 +00:00
//Need to load from profileNamespace because ace_settings might not be init if world = empty
if (profileNamespace getVariable [QGVAR(showNewsOnMainMenu), true]) then {
2016-07-04 20:31:25 +00:00
((_this select 0) displayCtrl 80090) ctrlShow true;
2015-05-13 19:05:13 +00:00
2016-07-04 20:31:25 +00:00
private _ace3VersionStr = (getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr")) select [0,5];
((_this select 0) displayCtrl 80094) ctrlSetText format ["Version: %1", _ace3VersionStr];
((_this select 0) displayCtrl 80095) htmlLoad "http://ace3mod.com/version.html";
2015-06-05 22:23:51 +00:00
} else {
2016-07-04 20:31:25 +00:00
((_this select 0) displayCtrl 80090) ctrlShow false;
2015-06-05 22:23:51 +00:00
};
2016-07-04 20:31:25 +00:00
/*
Note: switch version.html to simpler format and right align
<h1 align="right">Latest: {{site.ace.version.major}}.{{site.ace.version.minor}}.{{site.ace.version.patch}}</h1>
*/