diff --git a/apps/openmw/mwgui/layout.cpp b/apps/openmw/mwgui/layout.cpp index 2e51f8289..ab201ae64 100644 --- a/apps/openmw/mwgui/layout.cpp +++ b/apps/openmw/mwgui/layout.cpp @@ -85,6 +85,7 @@ namespace MWGui void Layout::setLayerPick(bool pick) { +#if MYGUI_VERSION >= MYGUI_DEFINE_VERSION(3,4,0) MyGUI::ILayer* layer = mMainWidget->getLayer(); // MyGUI exposes pick on the implementations of ILayer only, but not ILayer itself. auto* oLayer = layer->castType(false); @@ -93,6 +94,12 @@ namespace MWGui oLayer->setPick(pick); if (sLayer) 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)