1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 03:54:40 +00:00

Make BirthDialog use the new WindowBase

This commit is contained in:
Jan-Peter Nilsson 2010-11-06 11:26:17 +01:00
parent 6bf10c93c8
commit 933af72d60
2 changed files with 4 additions and 11 deletions

View File

@ -12,15 +12,10 @@ using namespace MWGui;
using namespace Widgets;
BirthDialog::BirthDialog(MWWorld::Environment& environment)
: Layout("openmw_chargen_birth_layout.xml")
, environment(environment)
: WindowBase("openmw_chargen_birth_layout.xml", environment)
{
// 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();
getWidget(spellArea, "SpellArea");

View File

@ -1,7 +1,7 @@
#ifndef MWGUI_BIRTH_H
#define MWGUI_BIRTH_H
#include <openengine/gui/layout.hpp>
#include "window_base.hpp"
namespace MWWorld
{
@ -17,7 +17,7 @@ namespace MWGui
{
using namespace MyGUI;
class BirthDialog : public OEngine::GUI::Layout
class BirthDialog : public WindowBase
{
public:
BirthDialog(MWWorld::Environment& environment);
@ -57,8 +57,6 @@ namespace MWGui
void updateBirths();
void updateSpells();
MWWorld::Environment& environment;
MyGUI::ListPtr birthList;
MyGUI::WidgetPtr spellArea;
MyGUI::StaticImagePtr birthImage;