From 8f334d1df2e2b51fd7d5ebaca48896a8f630635b Mon Sep 17 00:00:00 2001 From: Jan-Peter Nilsson Date: Sat, 6 Nov 2010 11:40:41 +0100 Subject: [PATCH] Make SelectAttributeDialog use the new WindowBase --- apps/openmw/mwgui/class.cpp | 7 ++----- apps/openmw/mwgui/class.hpp | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/openmw/mwgui/class.cpp b/apps/openmw/mwgui/class.cpp index f52836f471..b8ce4b71f0 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 59d4d721ca..6236263af5 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);