ACE3/addons/optionsmenu/init_loadMainMenuBox.sqf

32 lines
973 B
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"
if (missionNamespace getVariable [QGVAR(newsLoaded), false]) exitWith {};
GVAR(newsLoaded) = true;
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 {
((_this select 0) displayCtrl 80086) ctrlShow true;
2015-05-13 19:05:13 +00:00
2015-06-05 22:23:51 +00:00
private ["_version"];
_version = getText (configFile >> "CfgPatches" >> "ace_main" >> "versionStr");
((_this select 0) displayCtrl 68) ctrlSetText format ["Installed Version: %1", _version];
((_this select 0) displayCtrl 69) htmlLoad "http://ace3mod.com/version.html";
} else {
((_this select 0) displayCtrl 80086) ctrlShow false;
};