diff --git a/apps/openmw/mwgui/class.cpp b/apps/openmw/mwgui/class.cpp index f52836f47..b8ce4b71f 100644 --- a/apps/openmw/mwgui/class.cpp +++ b/apps/openmw/mwgui/class.cpp @@ -721,13 +721,10 @@ void SelectSpecializationDialog::onCancelClicked(MyGUI::Widget* _sender) /* SelectAttributeDialog */ SelectAttributeDialog::SelectAttributeDialog(MWWorld::Environment& environment, MyGUI::IntSize gameWindowSize) - : Layout("openmw_chargen_select_attribute_layout.xml") + : WindowBase("openmw_chargen_select_attribute_layout.xml", environment) { // Centre dialog - MyGUI::IntCoord coord = mMainWidget->getCoord(); - coord.left = (gameWindowSize.width - coord.width)/2; - coord.top = (gameWindowSize.height - coord.height)/2; - mMainWidget->setCoord(coord); + center(); WindowManager *wm = environment.mWindowManager; diff --git a/apps/openmw/mwgui/class.hpp b/apps/openmw/mwgui/class.hpp index 59d4d721c..6236263af 100644 --- a/apps/openmw/mwgui/class.hpp +++ b/apps/openmw/mwgui/class.hpp @@ -183,7 +183,7 @@ namespace MWGui ESM::Class::Specialization specializationId; }; - class SelectAttributeDialog : public OEngine::GUI::Layout + class SelectAttributeDialog : public WindowBase { public: SelectAttributeDialog(MWWorld::Environment& environment, MyGUI::IntSize gameWindowSize);