1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 02:53:51 +00:00

Make PickClassDialog use the new WindowBase

This commit is contained in:
Jan-Peter Nilsson 2010-11-06 11:38:29 +01:00
parent ed05c5752b
commit 4e8f55b630
2 changed files with 3 additions and 10 deletions

View file

@ -69,15 +69,10 @@ void GenerateClassResultDialog::onBackClicked(MyGUI::Widget* _sender)
/* PickClassDialog */ /* PickClassDialog */
PickClassDialog::PickClassDialog(MWWorld::Environment& environment) PickClassDialog::PickClassDialog(MWWorld::Environment& environment)
: Layout("openmw_chargen_class_layout.xml") : WindowBase("openmw_chargen_class_layout.xml", environment)
, environment(environment)
{ {
// 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;
setText("SpecializationT", wm->getGameSettingString("sChooseClassMenu1", "Specialization")); setText("SpecializationT", wm->getGameSettingString("sChooseClassMenu1", "Specialization"));

View file

@ -109,7 +109,7 @@ namespace MWGui
std::string currentClassId; std::string currentClassId;
}; };
class PickClassDialog : public OEngine::GUI::Layout class PickClassDialog : public WindowBase
{ {
public: public:
PickClassDialog(MWWorld::Environment& environment); PickClassDialog(MWWorld::Environment& environment);
@ -143,8 +143,6 @@ namespace MWGui
void updateClasses(); void updateClasses();
void updateStats(); void updateStats();
MWWorld::Environment& environment;
MyGUI::StaticImagePtr classImage; MyGUI::StaticImagePtr classImage;
MyGUI::ListPtr classList; MyGUI::ListPtr classList;
MyGUI::StaticTextPtr specializationName; MyGUI::StaticTextPtr specializationName;