|
|
|
@ -586,13 +586,32 @@ namespace MWGui
|
|
|
|
|
//Clear the list of topics
|
|
|
|
|
mTopicsList->clear();
|
|
|
|
|
|
|
|
|
|
if (mPtr.getTypeName() == typeid(ESM::NPC).name())
|
|
|
|
|
bool dispositionVisible = false;
|
|
|
|
|
if (mPtr.getClass().isNpc())
|
|
|
|
|
{
|
|
|
|
|
dispositionVisible = true;
|
|
|
|
|
mDispositionBar->setProgressRange(100);
|
|
|
|
|
mDispositionBar->setProgressPosition(MWBase::Environment::get().getMechanicsManager()->getDerivedDisposition(mPtr));
|
|
|
|
|
mDispositionText->eraseText(0, mDispositionText->getTextLength());
|
|
|
|
|
mDispositionText->addText("#B29154"+boost::lexical_cast<std::string>(MWBase::Environment::get().getMechanicsManager()->getDerivedDisposition(mPtr))+std::string("/100")+"#B29154");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool dispositionWasVisible = mDispositionBar->getVisible();
|
|
|
|
|
|
|
|
|
|
if (dispositionVisible && !dispositionWasVisible)
|
|
|
|
|
{
|
|
|
|
|
mDispositionBar->setVisible(true);
|
|
|
|
|
float offset = mDispositionBar->getHeight()+5;
|
|
|
|
|
mTopicsList->setCoord(mTopicsList->getCoord() + MyGUI::IntCoord(0,offset,0,-offset));
|
|
|
|
|
mTopicsList->adjustSize();
|
|
|
|
|
}
|
|
|
|
|
else if (!dispositionVisible && dispositionWasVisible)
|
|
|
|
|
{
|
|
|
|
|
mDispositionBar->setVisible(false);
|
|
|
|
|
float offset = mDispositionBar->getHeight()+5;
|
|
|
|
|
mTopicsList->setCoord(mTopicsList->getCoord() - MyGUI::IntCoord(0,offset,0,-offset));
|
|
|
|
|
mTopicsList->adjustSize();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void DialogueWindow::goodbye()
|
|
|
|
|