1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +00:00

Make ReviewDialog use the new WindowBase

This commit is contained in:
Jan-Peter Nilsson 2010-11-06 11:29:03 +01:00
parent 5db021e99b
commit 2e7e79f596
2 changed files with 4 additions and 11 deletions

View File

@ -14,16 +14,11 @@ using namespace Widgets;
const int ReviewDialog::lineHeight = 18; const int ReviewDialog::lineHeight = 18;
ReviewDialog::ReviewDialog(MWWorld::Environment& environment) ReviewDialog::ReviewDialog(MWWorld::Environment& environment)
: Layout("openmw_chargen_review_layout.xml") : WindowBase("openmw_chargen_review_layout.xml", environment)
, environment(environment)
, lastPos(0) , lastPos(0)
{ {
// Centre dialog // Centre dialog
MyGUI::IntSize gameWindowSize = environment.mWindowManager->getGui()->getViewSize(); center();
MyGUI::IntCoord coord = mMainWidget->getCoord();
coord.left = (gameWindowSize.width - coord.width)/2;
coord.top = (gameWindowSize.height - coord.height)/2;
mMainWidget->setCoord(coord);
WindowManager *wm = environment.mWindowManager; WindowManager *wm = environment.mWindowManager;

View File

@ -1,8 +1,7 @@
#ifndef MWGUI_REVIEW_H #ifndef MWGUI_REVIEW_H
#define MWGUI_REVIEW_H #define MWGUI_REVIEW_H
#include <components/esm_store/store.hpp> #include "window_base.hpp"
#include <openengine/gui/layout.hpp>
#include "../mwmechanics/stat.hpp" #include "../mwmechanics/stat.hpp"
#include "widgets.hpp" #include "widgets.hpp"
@ -20,7 +19,7 @@ namespace MWGui
{ {
using namespace MyGUI; using namespace MyGUI;
class ReviewDialog : public OEngine::GUI::Layout class ReviewDialog : public WindowBase
{ {
public: public:
typedef std::vector<int> SkillList; typedef std::vector<int> SkillList;
@ -106,7 +105,6 @@ namespace MWGui
static const int lineHeight; static const int lineHeight;
MWWorld::Environment& environment;
MyGUI::StaticTextPtr nameWidget, raceWidget, classWidget, birthSignWidget; MyGUI::StaticTextPtr nameWidget, raceWidget, classWidget, birthSignWidget;
MyGUI::WidgetPtr skillAreaWidget, skillClientWidget; MyGUI::WidgetPtr skillAreaWidget, skillClientWidget;
MyGUI::VScrollPtr skillScrollerWidget; MyGUI::VScrollPtr skillScrollerWidget;