mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-23 15:40:42 +00:00
make to boxes apear on the correct place even if the oldest is erased
This commit is contained in:
parent
315f4078c6
commit
d74f834735
@ -67,14 +67,8 @@ void MessageBoxManager::createMessageBox (const std::string& message)
|
|||||||
int height = 0;
|
int height = 0;
|
||||||
for(it = mMessageBoxes.begin(); it != mMessageBoxes.end(); ++it)
|
for(it = mMessageBoxes.begin(); it != mMessageBoxes.end(); ++it)
|
||||||
{
|
{
|
||||||
if((*it) == box)
|
(*it)->update(height);
|
||||||
{
|
height += (*it)->getHeight();
|
||||||
std::cout << "update(" << height << ")" << std::endl;
|
|
||||||
box->update(height);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
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
|
size.height = mHeight = textSize.height + 20; // this is the padding between the text and the box
|
||||||
|
|
||||||
mMainWidget->setSize(size);
|
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);
|
mMessageWidget->setSize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<Widget type="StaticText" skin="StaticText" position="4 4 4 4" name="message" />
|
<Widget type="StaticText" skin="StaticText" position="4 4 4 4" name="message" />
|
||||||
</Widget-->
|
</Widget-->
|
||||||
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 0 0" name="_Main">
|
<Widget type="Window" skin="MW_Dialog" layer="Windows" position="0 0 0 0" name="_Main">
|
||||||
<Widget type="Edit" skin="MW_TextEditClient" position="-2 -3 0 0" name="message" align="ALIGN_LEFT ALIGN_TOP STRETCH">
|
<Widget type="Edit" skin="MW_TextEditClient" position="5 -5 0 0" name="message" align="ALIGN_LEFT ALIGN_TOP STRETCH">
|
||||||
<Property key="Edit_Static" value="true"/>
|
<Property key="Edit_Static" value="true"/>
|
||||||
<Property key="Edit_WordWrap" value="true"/>
|
<Property key="Edit_WordWrap" value="true"/>
|
||||||
<Property key="Text_FontHeight" value="18"/>
|
<Property key="Text_FontHeight" value="18"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user