Sanity check for if the GuiPlatformGenericMenuBar class is valid before trying to load a menubar that uses it, in the event that SDL isn't enabled, or other similar circumstances.

This commit is contained in:
Areloch 2016-11-08 23:39:07 -06:00
parent 00a4a21e3f
commit 36f679f539
2 changed files with 38 additions and 2 deletions

View file

@ -1 +1,19 @@
exec("./guiPlatformGenericMenubar.ed.gui");
if(isClass(GuiPlatformGenericMenuBar))
{
exec("./guiPlatformGenericMenubar.ed.gui");
}
else
{
%guiContent = new GuiControl(PlatformGenericMenubar) {
profile = "GuiModelessDialogProfile";
new GuiControl()
{
internalName = "menubar";
extent = "1024 20";
minExtent = "320 20";
horizSizing = "width";
profile = "GuiMenuBarProfile";
};
};
}

View file

@ -1 +1,19 @@
exec("./guiPlatformGenericMenubar.ed.gui");
if(isClass(GuiPlatformGenericMenuBar))
{
exec("./guiPlatformGenericMenubar.ed.gui");
}
else
{
%guiContent = new GuiControl(PlatformGenericMenubar) {
profile = "GuiModelessDialogProfile";
new GuiControl()
{
internalName = "menubar";
extent = "1024 20";
minExtent = "320 20";
horizSizing = "width";
profile = "GuiMenuBarProfile";
};
};
}