From f5868f7ae138cafda38e65d3708a0892c89f22e9 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 20 Sep 2014 13:07:38 +0200 Subject: [PATCH] Fix layout problems in generate class result dialog --- apps/openmw/mwgui/class.cpp | 7 ++++--- .../openmw_chargen_generate_class_result.layout | 13 +++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/apps/openmw/mwgui/class.cpp b/apps/openmw/mwgui/class.cpp index 9f6306830..b661f9945 100644 --- a/apps/openmw/mwgui/class.cpp +++ b/apps/openmw/mwgui/class.cpp @@ -17,9 +17,6 @@ namespace MWGui GenerateClassResultDialog::GenerateClassResultDialog() : WindowModal("openmw_chargen_generate_class_result.layout") { - // Centre dialog - center(); - setText("ReflectT", MWBase::Environment::get().getWindowManager()->getGameSettingString("sMessageQuestionAnswer1", "")); getWidget(mClassImage, "ClassImage"); @@ -34,6 +31,8 @@ namespace MWGui getWidget(okButton, "OKButton"); okButton->setCaptionWithReplacing("#{sMessageQuestionAnswer2}"); okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &GenerateClassResultDialog::onOkClicked); + + center(); } std::string GenerateClassResultDialog::getClassId() const @@ -46,6 +45,8 @@ namespace MWGui mCurrentClassId = classId; mClassImage->setImageTexture(std::string("textures\\levelup\\") + mCurrentClassId + ".dds"); mClassName->setCaption(MWBase::Environment::get().getWorld()->getStore().get().find(mCurrentClassId)->mName); + + center(); } // widget controls diff --git a/files/mygui/openmw_chargen_generate_class_result.layout b/files/mygui/openmw_chargen_generate_class_result.layout index f7178042f..edbbaeb57 100644 --- a/files/mygui/openmw_chargen_generate_class_result.layout +++ b/files/mygui/openmw_chargen_generate_class_result.layout @@ -1,29 +1,30 @@ - + + + + + - + - + - - -