mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 06:35:30 +00:00
Disposition is now updated everyframe
This commit is contained in:
parent
9ebe9cb40c
commit
2841d831a6
@ -51,7 +51,7 @@ std::string::size_type find_str_ci(const std::string& str, const std::string& su
|
||||
|
||||
DialogueWindow::DialogueWindow(MWBase::WindowManager& parWindowManager)
|
||||
: WindowBase("openmw_dialogue_window.layout", parWindowManager)
|
||||
, mEnabled(true)
|
||||
, mEnabled(false)
|
||||
, mServices(0)
|
||||
{
|
||||
// Centre dialog
|
||||
@ -311,3 +311,14 @@ void DialogueWindow::onReferenceUnavailable()
|
||||
{
|
||||
mWindowManager.removeGuiMode(GM_Dialogue);
|
||||
}
|
||||
|
||||
void DialogueWindow::onFrame()
|
||||
{
|
||||
if(mEnabled)
|
||||
{
|
||||
mDispositionBar->setProgressRange(100);
|
||||
mDispositionBar->setProgressPosition(MWBase::Environment::get().getMechanicsManager()->disposition(mPtr));
|
||||
mDispositionText->eraseText(0, mDispositionText->getTextLength());
|
||||
mDispositionText->addText("#B29154"+boost::lexical_cast<std::string>(MWBase::Environment::get().getMechanicsManager()->disposition(mPtr))+std::string("/100")+"#B29154");
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ namespace MWGui
|
||||
void addTitle(std::string text);
|
||||
void askQuestion(std::string question);
|
||||
void goodbye();
|
||||
void onFrame();
|
||||
|
||||
// make sure to call these before setKeywords()
|
||||
void setServices(int services) { mServices = services; }
|
||||
|
@ -582,6 +582,8 @@ void WindowManager::onFrame (float frameDuration)
|
||||
mDragAndDrop->mDraggedWidget->setPosition(MyGUI::InputManager::getInstance().getMousePosition());
|
||||
}
|
||||
|
||||
mDialogueWindow->onFrame();
|
||||
|
||||
mInventoryWindow->onFrame();
|
||||
|
||||
mStatsWindow->onFrame();
|
||||
|
@ -366,7 +366,6 @@ namespace MWMechanics
|
||||
}
|
||||
else if (npcFaction != "")
|
||||
{
|
||||
std::cout << "npc has a faction!";
|
||||
for(std::vector<ESM::Faction::Reaction>::const_iterator it = store.factions.find(toLower(npcFaction))->mReactions.begin();it != store.factions.find(toLower(npcFaction))->mReactions.end();it++)
|
||||
{
|
||||
if(playerSkill.getFactionRanks().find(toLower(it->mFaction)) != playerSkill.getFactionRanks().end() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user