From 386bb98fd2fa9f2157ca5e684896da51fd1141cb Mon Sep 17 00:00:00 2001 From: MiroslavR Date: Wed, 3 Sep 2014 03:03:03 +0200 Subject: [PATCH] Do not attach coin widgets to a box --- apps/openmw/mwgui/levelupdialog.cpp | 5 ++-- apps/openmw/mwgui/levelupdialog.hpp | 1 + files/mygui/openmw_levelup_dialog.layout | 36 ++++++++++++------------ 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/apps/openmw/mwgui/levelupdialog.cpp b/apps/openmw/mwgui/levelupdialog.cpp index 021613571..272a9b27b 100644 --- a/apps/openmw/mwgui/levelupdialog.cpp +++ b/apps/openmw/mwgui/levelupdialog.cpp @@ -26,6 +26,7 @@ namespace MWGui getWidget(mLevelText, "LevelText"); getWidget(mLevelDescription, "LevelDescription"); getWidget(mCoinBox, "Coins"); + getWidget(mAssignWidget, "AssignWidget"); mOkButton->eventMouseButtonClick += MyGUI::newDelegate(this, &LevelupDialog::onOkButtonClicked); @@ -106,13 +107,13 @@ namespace MWGui { MyGUI::ImageBox* image = mCoins[i]; image->detachFromWidget(); - image->attachToWidget(mMainWidget); + image->attachToWidget(mAssignWidget); int attribute = mSpentAttributes[i]; int xdiff = mAttributeMultipliers[attribute]->getCaption() == "" ? 0 : 20; - MyGUI::IntPoint pos = mAttributes[attribute]->getAbsolutePosition() - mMainWidget->getAbsolutePosition() - MyGUI::IntPoint(22+xdiff,0); + MyGUI::IntPoint pos = mAttributes[attribute]->getAbsolutePosition() - mAssignWidget->getAbsolutePosition() - MyGUI::IntPoint(22+xdiff,0); pos.top += (mAttributes[attribute]->getHeight() - image->getHeight())/2; image->setPosition(pos); } diff --git a/apps/openmw/mwgui/levelupdialog.hpp b/apps/openmw/mwgui/levelupdialog.hpp index 5ca9c8c75..e5edbd53c 100644 --- a/apps/openmw/mwgui/levelupdialog.hpp +++ b/apps/openmw/mwgui/levelupdialog.hpp @@ -20,6 +20,7 @@ namespace MWGui MyGUI::EditBox* mLevelDescription; MyGUI::Widget* mCoinBox; + MyGUI::Widget* mAssignWidget; std::vector mAttributes; std::vector mAttributeValues; diff --git a/files/mygui/openmw_levelup_dialog.layout b/files/mygui/openmw_levelup_dialog.layout index 07e1e560b..190f16e5d 100644 --- a/files/mygui/openmw_levelup_dialog.layout +++ b/files/mygui/openmw_levelup_dialog.layout @@ -16,7 +16,7 @@ - + @@ -27,20 +27,20 @@ - + - - - - - - - - + + + + + + + + - + @@ -54,7 +54,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -82,7 +82,7 @@ - + @@ -97,7 +97,7 @@ - + @@ -111,7 +111,7 @@ - + @@ -125,7 +125,7 @@ - + @@ -139,7 +139,7 @@ - +