diff --git a/apps/openmw/mwgui/class.cpp b/apps/openmw/mwgui/class.cpp index 3ebe1067cb..b2385d4dab 100644 --- a/apps/openmw/mwgui/class.cpp +++ b/apps/openmw/mwgui/class.cpp @@ -855,14 +855,10 @@ void SelectSkillDialog::onCancelClicked(MyGUI::Widget* _sender) /* DescriptionDialog */ DescriptionDialog::DescriptionDialog(MWWorld::Environment& environment, MyGUI::IntSize gameWindowSize) - : Layout("openmw_chargen_class_description_layout.xml") - , environment(environment) + : WindowBase("openmw_chargen_class_description_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(); getWidget(textEdit, "TextEdit"); diff --git a/apps/openmw/mwgui/class.hpp b/apps/openmw/mwgui/class.hpp index bb76703f32..39d8b8851b 100644 --- a/apps/openmw/mwgui/class.hpp +++ b/apps/openmw/mwgui/class.hpp @@ -250,7 +250,7 @@ namespace MWGui ESM::Skill::SkillEnum skillId; }; - class DescriptionDialog : public OEngine::GUI::Layout + class DescriptionDialog : public WindowBase { public: DescriptionDialog(MWWorld::Environment& environment, MyGUI::IntSize gameWindowSize); @@ -270,8 +270,6 @@ namespace MWGui void onOkClicked(MyGUI::Widget* _sender); private: - MWWorld::Environment& environment; - MyGUI::EditPtr textEdit; };