#595 - Hide ace optino button if no world loaded

I wanted to use a rscMapControl onDraw, but it throws an error
onMouseMoving seems odd, but it works and I don't have to overload
onLoad
This commit is contained in:
PabstMirror 2015-04-14 19:52:30 -05:00
parent b39209cc28
commit 1488ba2aac
2 changed files with 17 additions and 14 deletions

View File

@ -1,23 +1,23 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = {"ACE_moduleAllowConfigExport"};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"Glowbal", "PabstMirror"};
authorUrl = "http://github.com/Glowbal";
VERSION_CONFIG;
};
class ADDON {
units[] = {"ACE_moduleAllowConfigExport"};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"Glowbal", "PabstMirror"};
authorUrl = "http://github.com/Glowbal";
VERSION_CONFIG;
};
};
class CfgAddons {
class PreloadAddons {
class ADDON {
list[] = {QUOTE(ADDON)};
class PreloadAddons {
class ADDON {
list[] = {QUOTE(ADDON)};
};
};
};
};

View File

@ -96,11 +96,14 @@ class RscDisplayInterruptEditor3D: 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 = "((_this select 0) displayCtrl 80085) ctrlShow (missionName != '');";
class controls {
class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {
action = "if (missionName != '') then {createDialog 'ACE_settingsMenu';};";
y = "4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY";
idc = 80085;
};
};
};