mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 11:53:51 +00:00
MyGUI version guard.
This commit is contained in:
parent
f451bf2a35
commit
b7bda3544b
1 changed files with 7 additions and 0 deletions
|
@ -85,6 +85,7 @@ namespace MWGui
|
||||||
|
|
||||||
void Layout::setLayerPick(bool pick)
|
void Layout::setLayerPick(bool pick)
|
||||||
{
|
{
|
||||||
|
#if MYGUI_VERSION >= MYGUI_DEFINE_VERSION(3,4,0)
|
||||||
MyGUI::ILayer* layer = mMainWidget->getLayer();
|
MyGUI::ILayer* layer = mMainWidget->getLayer();
|
||||||
// MyGUI exposes pick on the implementations of ILayer only, but not ILayer itself.
|
// MyGUI exposes pick on the implementations of ILayer only, but not ILayer itself.
|
||||||
auto* oLayer = layer->castType<MyGUI::OverlappedLayer>(false);
|
auto* oLayer = layer->castType<MyGUI::OverlappedLayer>(false);
|
||||||
|
@ -93,6 +94,12 @@ namespace MWGui
|
||||||
oLayer->setPick(pick);
|
oLayer->setPick(pick);
|
||||||
if (sLayer)
|
if (sLayer)
|
||||||
sLayer->setPick(pick);
|
sLayer->setPick(pick);
|
||||||
|
#else
|
||||||
|
#ifdef USE_OPENXR
|
||||||
|
#error "MyGUI version 3.4.0 or greater required to build for VR"
|
||||||
|
#endif
|
||||||
|
throw std::logic_error("Not implemented");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
MyGUI::Widget* Layout::getWidget(const std::string &_name)
|
MyGUI::Widget* Layout::getWidget(const std::string &_name)
|
||||||
|
|
Loading…
Reference in a new issue