use DisplayLoad for main menu box and to disable options when world=Empty

This commit is contained in:
commy2 2016-02-21 23:28:02 +01:00
parent 9ac1f8fc47
commit dd10fac470
3 changed files with 11 additions and 4 deletions

View File

@ -1,10 +1,21 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
class Extended_DisplayLoad_EventHandlers {
class RscDisplayMain {
GVAR(loadMainMenuBox) = QUOTE(_this call COMPILE_FILE(init_loadMainMenuBox));
//Hide the button if there is no world (-world=empty)
GVAR(hideButtonEmptyWorld) = "((_this select 0) displayCtrl 80085) ctrlShow (missionName != '');";
};
};

View File

@ -101,10 +101,6 @@ class RscDisplayMovieInterrupt: RscStandardDisplay {
};
};
class RscDisplayMain: RscStandardDisplay {
//Hide the button if there is no world (-world=empty)
//Seems odd to use onMouseMoving, but I don't want to overload onLoad
onMouseMoving = QUOTE(((_this select 0) displayCtrl 80085) ctrlShow (missionName != ''); _this execVM QUOTE(QUOTE(PATHTOF(script_loadMainMenuBox.sqf))););
class controls {
class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {
action = "if (missionName != '') then {createDialog 'ACE_settingsMenu';};";