mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
Properly redraw the topics list when disposition bar state changes
This commit is contained in:
parent
a6e07dd33a
commit
c4ed812567
@ -364,9 +364,8 @@ namespace MWGui
|
|||||||
if (mCurrentWindowSize == _sender->getSize())
|
if (mCurrentWindowSize == _sender->getSize())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mTopicsList->adjustSize();
|
redrawTopicsList();
|
||||||
updateHistory();
|
updateHistory();
|
||||||
updateTopicFormat();
|
|
||||||
mCurrentWindowSize = _sender->getSize();
|
mCurrentWindowSize = _sender->getSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -534,6 +533,14 @@ namespace MWGui
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DialogueWindow::redrawTopicsList()
|
||||||
|
{
|
||||||
|
mTopicsList->adjustSize();
|
||||||
|
|
||||||
|
// The topics list has been regenerated so topic formatting needs to be updated
|
||||||
|
updateTopicFormat();
|
||||||
|
}
|
||||||
|
|
||||||
void DialogueWindow::updateTopicsPane()
|
void DialogueWindow::updateTopicsPane()
|
||||||
{
|
{
|
||||||
mTopicsList->clear();
|
mTopicsList->clear();
|
||||||
@ -591,11 +598,9 @@ namespace MWGui
|
|||||||
t->eventTopicActivated += MyGUI::newDelegate(this, &DialogueWindow::onTopicActivated);
|
t->eventTopicActivated += MyGUI::newDelegate(this, &DialogueWindow::onTopicActivated);
|
||||||
mTopicLinks[topicId] = std::move(t);
|
mTopicLinks[topicId] = std::move(t);
|
||||||
}
|
}
|
||||||
mTopicsList->adjustSize();
|
|
||||||
|
|
||||||
|
redrawTopicsList();
|
||||||
updateHistory();
|
updateHistory();
|
||||||
// The topics list has been regenerated so topic formatting needs to be updated
|
|
||||||
updateTopicFormat();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogueWindow::updateHistory(bool scrollbar)
|
void DialogueWindow::updateHistory(bool scrollbar)
|
||||||
@ -756,21 +761,12 @@ namespace MWGui
|
|||||||
+ std::string("/100"));
|
+ std::string("/100"));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool dispositionWasVisible = mDispositionBar->getVisible();
|
if (mDispositionBar->getVisible() != dispositionVisible)
|
||||||
|
|
||||||
if (dispositionVisible && !dispositionWasVisible)
|
|
||||||
{
|
{
|
||||||
mDispositionBar->setVisible(true);
|
mDispositionBar->setVisible(dispositionVisible);
|
||||||
int offset = mDispositionBar->getHeight() + 5;
|
const int offset = (mDispositionBar->getHeight() + 5) * (dispositionVisible ? 1 : -1);
|
||||||
mTopicsList->setCoord(mTopicsList->getCoord() + MyGUI::IntCoord(0, offset, 0, -offset));
|
mTopicsList->setCoord(mTopicsList->getCoord() + MyGUI::IntCoord(0, offset, 0, -offset));
|
||||||
mTopicsList->adjustSize();
|
redrawTopicsList();
|
||||||
}
|
|
||||||
else if (!dispositionVisible && dispositionWasVisible)
|
|
||||||
{
|
|
||||||
mDispositionBar->setVisible(false);
|
|
||||||
int offset = mDispositionBar->getHeight() + 5;
|
|
||||||
mTopicsList->setCoord(mTopicsList->getCoord() - MyGUI::IntCoord(0, offset, 0, -offset));
|
|
||||||
mTopicsList->adjustSize();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,6 +190,7 @@ namespace MWGui
|
|||||||
void updateDisposition();
|
void updateDisposition();
|
||||||
void restock();
|
void restock();
|
||||||
void deleteLater();
|
void deleteLater();
|
||||||
|
void redrawTopicsList();
|
||||||
|
|
||||||
bool mIsCompanion;
|
bool mIsCompanion;
|
||||||
std::list<std::string> mKeywords;
|
std::list<std::string> mKeywords;
|
||||||
|
Loading…
Reference in New Issue
Block a user