forked from mirror/openmw-tes3mp
Don't show disposition bar for creatures
This commit is contained in:
parent
4aab4e1c26
commit
44fd526c98
3 changed files with 22 additions and 2 deletions
|
@ -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()
|
||||
|
|
|
@ -170,7 +170,7 @@ namespace MWGui
|
|||
BookPage* mHistory;
|
||||
Widgets::MWList* mTopicsList;
|
||||
MyGUI::ScrollBar* mScrollBar;
|
||||
MyGUI::ProgressPtr mDispositionBar;
|
||||
MyGUI::Progress* mDispositionBar;
|
||||
MyGUI::EditBox* mDispositionText;
|
||||
|
||||
PersuasionDialog mPersuasionDialog;
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<Property key="Colour" value="0000FF"/>
|
||||
<Property key="Static" value="1"/>
|
||||
<Property key="WordWrap" value="true"/>
|
||||
<Property key="TextShadow" value="true"/>
|
||||
<Child type="TextBox" skin="MW_DispEdit" offset="0 0 0 -4" align="Stretch" name="Client"/>
|
||||
</Skin>
|
||||
|
||||
|
|
Loading…
Reference in a new issue