forked from teamnwah/openmw-tes3coop
window caption fix
This commit is contained in:
parent
b3dc1931a9
commit
14377ba789
2 changed files with 2 additions and 1 deletions
|
@ -111,6 +111,7 @@ void StatsWindow::setBar(const std::string& name, const std::string& tname, int
|
||||||
void StatsWindow::setPlayerName(const std::string& playerName)
|
void StatsWindow::setPlayerName(const std::string& playerName)
|
||||||
{
|
{
|
||||||
static_cast<MyGUI::Window*>(mMainWidget)->setCaption(playerName);
|
static_cast<MyGUI::Window*>(mMainWidget)->setCaption(playerName);
|
||||||
|
adjustWindowCaption();
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatsWindow::setValue (const std::string& id, const MWMechanics::Stat<int>& value)
|
void StatsWindow::setValue (const std::string& id, const MWMechanics::Stat<int>& value)
|
||||||
|
|
|
@ -85,7 +85,7 @@ namespace GUI
|
||||||
// adjust the size of the window caption so that all text is visible
|
// adjust the size of the window caption so that all text is visible
|
||||||
// NOTE: this assumes that mMainWidget is of type Window.
|
// NOTE: this assumes that mMainWidget is of type Window.
|
||||||
MyGUI::TextBox* box = static_cast<MyGUI::Window*>(mMainWidget)->getCaptionWidget();
|
MyGUI::TextBox* box = static_cast<MyGUI::Window*>(mMainWidget)->getCaptionWidget();
|
||||||
box->setSize(box->getTextSize().width + 48, box->getSize().height);
|
box->setSize(box->getTextSize().width + 24, box->getSize().height);
|
||||||
|
|
||||||
// in order to trigger alignment updates, we need to update the parent
|
// in order to trigger alignment updates, we need to update the parent
|
||||||
// mygui doesn't provide a proper way of doing this, so we are just changing size
|
// mygui doesn't provide a proper way of doing this, so we are just changing size
|
||||||
|
|
Loading…
Reference in a new issue