From 2e7e79f596ebc39da69f19fd48f63c112a7270fa Mon Sep 17 00:00:00 2001 From: Jan-Peter Nilsson Date: Sat, 6 Nov 2010 11:29:03 +0100 Subject: [PATCH] Make ReviewDialog use the new WindowBase --- apps/openmw/mwgui/review.cpp | 9 ++------- apps/openmw/mwgui/review.hpp | 6 ++---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/apps/openmw/mwgui/review.cpp b/apps/openmw/mwgui/review.cpp index e193b6072d..9eb6092ced 100644 --- a/apps/openmw/mwgui/review.cpp +++ b/apps/openmw/mwgui/review.cpp @@ -14,16 +14,11 @@ using namespace Widgets; const int ReviewDialog::lineHeight = 18; ReviewDialog::ReviewDialog(MWWorld::Environment& environment) - : Layout("openmw_chargen_review_layout.xml") - , environment(environment) + : WindowBase("openmw_chargen_review_layout.xml", environment) , lastPos(0) { // Centre dialog - MyGUI::IntSize gameWindowSize = environment.mWindowManager->getGui()->getViewSize(); - 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/review.hpp b/apps/openmw/mwgui/review.hpp index 2809b67c9a..25a183f653 100644 --- a/apps/openmw/mwgui/review.hpp +++ b/apps/openmw/mwgui/review.hpp @@ -1,8 +1,7 @@ #ifndef MWGUI_REVIEW_H #define MWGUI_REVIEW_H -#include -#include +#include "window_base.hpp" #include "../mwmechanics/stat.hpp" #include "widgets.hpp" @@ -20,7 +19,7 @@ namespace MWGui { using namespace MyGUI; - class ReviewDialog : public OEngine::GUI::Layout + class ReviewDialog : public WindowBase { public: typedef std::vector SkillList; @@ -106,7 +105,6 @@ namespace MWGui static const int lineHeight; - MWWorld::Environment& environment; MyGUI::StaticTextPtr nameWidget, raceWidget, classWidget, birthSignWidget; MyGUI::WidgetPtr skillAreaWidget, skillClientWidget; MyGUI::VScrollPtr skillScrollerWidget;