From d74f834735ab44319fd1e51c53b8c11540ce2d1e Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Thu, 16 Jun 2011 18:12:50 +0200 Subject: [PATCH] make to boxes apear on the correct place even if the oldest is erased --- apps/openmw/mwgui/messagebox.cpp | 12 +++--------- .../openmw_resources/openmw_messagebox_layout.xml | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/apps/openmw/mwgui/messagebox.cpp b/apps/openmw/mwgui/messagebox.cpp index d9117a896..28aae874f 100644 --- a/apps/openmw/mwgui/messagebox.cpp +++ b/apps/openmw/mwgui/messagebox.cpp @@ -67,14 +67,8 @@ void MessageBoxManager::createMessageBox (const std::string& message) int height = 0; for(it = mMessageBoxes.begin(); it != mMessageBoxes.end(); ++it) { - if((*it) == box) - { - std::cout << "update(" << height << ")" << std::endl; - box->update(height); - } - else { - height += (*it)->getHeight(); - } + (*it)->update(height); + height += (*it)->getHeight(); } } @@ -156,7 +150,7 @@ MessageBox::MessageBox(MessageBoxManager& parMessageBoxManager, const std::strin size.height = mHeight = textSize.height + 20; // this is the padding between the text and the box mMainWidget->setSize(size); - size.width -= 5; // this is to center the text (see messagebox_layout.xml, Widget type="Edit" position="-2 -3 0 0") + size.width -= 15; // this is to center the text (see messagebox_layout.xml, Widget type="Edit" position="-2 -3 0 0") mMessageWidget->setSize(size); } diff --git a/extern/mygui_3.0.1/openmw_resources/openmw_messagebox_layout.xml b/extern/mygui_3.0.1/openmw_resources/openmw_messagebox_layout.xml index aa1e00258..fb4235ff1 100644 --- a/extern/mygui_3.0.1/openmw_resources/openmw_messagebox_layout.xml +++ b/extern/mygui_3.0.1/openmw_resources/openmw_messagebox_layout.xml @@ -5,7 +5,7 @@ - +