mirror of https://github.com/AxioDL/metaforce.git
Block space switching when requested space type matches current
This commit is contained in:
parent
4f401acdca
commit
48bcecff9a
|
@ -243,10 +243,22 @@ void Space::SpaceMenuNode::SubNode::activated(const boo::SWindowCoord &coord)
|
|||
std::unique_ptr<Space> newSpace;
|
||||
switch(m_data.m_cls)
|
||||
{
|
||||
case Class::InformationCenter: newSpace.reset(new InformationCenter(m_space.m_parent->m_vm, m_space.m_parent)); break;
|
||||
case Class::EffectEditor: newSpace.reset(new EffectEditor(m_space.m_parent->m_vm, m_space.m_parent)); break;
|
||||
case Class::ResourceBrowser: newSpace.reset(new ResourceBrowser(m_space.m_parent->m_vm, m_space.m_parent)); break;
|
||||
case Class::ModelViewer: newSpace.reset(new ModelViewer(m_space.m_parent->m_vm, m_space.m_parent)); break;
|
||||
case Class::InformationCenter:
|
||||
if (typeid(InformationCenter) != typeid(m_space))
|
||||
newSpace.reset(new InformationCenter(m_space.m_parent->m_vm, m_space.m_parent));
|
||||
break;
|
||||
case Class::EffectEditor:
|
||||
if (typeid(EffectEditor) != typeid(m_space))
|
||||
newSpace.reset(new EffectEditor(m_space.m_parent->m_vm, m_space.m_parent));
|
||||
break;
|
||||
case Class::ResourceBrowser:
|
||||
if (typeid(ResourceBrowser) != typeid(m_space))
|
||||
newSpace.reset(new ResourceBrowser(m_space.m_parent->m_vm, m_space.m_parent));
|
||||
break;
|
||||
case Class::ModelViewer:
|
||||
if (typeid(ModelViewer) != typeid(m_space))
|
||||
newSpace.reset(new ModelViewer(m_space.m_parent->m_vm, m_space.m_parent));
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
if (newSpace)
|
||||
|
|
|
@ -35,6 +35,8 @@ struct Application : boo::IApplicationCallback
|
|||
m_viewManager.reset(new ViewManager(m_fileMgr, m_cvarManager));
|
||||
}
|
||||
|
||||
virtual ~Application() = default;
|
||||
|
||||
int appMain(boo::IApplication* app)
|
||||
{
|
||||
initialize(app);
|
||||
|
@ -53,12 +55,9 @@ struct Application : boo::IApplicationCallback
|
|||
{
|
||||
m_running = false;
|
||||
}
|
||||
void appFilesOpen(boo::IApplication*, const std::vector<boo::SystemString>&)
|
||||
{
|
||||
void appFilesOpen(boo::IApplication*, const std::vector<boo::SystemString>&);
|
||||
|
||||
}
|
||||
|
||||
void initialize(boo::IApplication* app)
|
||||
void initialize(boo::IApplication* /*app*/)
|
||||
{
|
||||
zeus::detectCPU();
|
||||
//hecl::VerbosityLevel = 1;
|
||||
|
@ -102,6 +101,12 @@ struct Application : boo::IApplicationCallback
|
|||
}
|
||||
};
|
||||
|
||||
/* This is here to prevent a vtable being dumped into every translation unit */
|
||||
void Application::appFilesOpen(boo::IApplication *, const std::vector<boo::SystemString> &)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if _WIN32
|
||||
|
|
Loading…
Reference in New Issue