Make CreateClassDialog use the new WindowBase

actorid
Jan-Peter Nilsson 14 years ago
parent 6fc0e4d6d6
commit 770b490539

@ -380,19 +380,14 @@ ClassChoiceDialog::ClassChoiceDialog(MWWorld::Environment& environment)
/* CreateClassDialog */
CreateClassDialog::CreateClassDialog(MWWorld::Environment& environment)
: Layout("openmw_chargen_create_class_layout.xml")
, environment(environment)
: WindowBase("openmw_chargen_create_class_layout.xml", environment)
, specDialog(nullptr)
, attribDialog(nullptr)
, skillDialog(nullptr)
, descDialog(nullptr)
{
// 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;
setText("SpecializationT", wm->getGameSettingString("sChooseClassMenu1", "Specialization"));

@ -273,7 +273,7 @@ namespace MWGui
MyGUI::EditPtr textEdit;
};
class CreateClassDialog : public OEngine::GUI::Layout
class CreateClassDialog : public WindowBase
{
public:
CreateClassDialog(MWWorld::Environment& environment);
@ -317,8 +317,6 @@ namespace MWGui
void onDialogCancel();
private:
MWWorld::Environment& environment;
MyGUI::EditPtr editName;
MyGUI::WidgetPtr specializationName;
Widgets::MWAttributePtr favoriteAttribute0, favoriteAttribute1;

Loading…
Cancel
Save