From ac97a0f99d769d8692f55b7df486d78a4f5a4bb8 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 18 Sep 2014 04:10:17 +0200 Subject: [PATCH] Fix dialogue choices being displayed in incorrect order --- apps/openmw/mwgui/dialogue.cpp | 4 ++-- apps/openmw/mwgui/dialogue.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp index 33b768dfc..5a5da8ea1 100644 --- a/apps/openmw/mwgui/dialogue.cpp +++ b/apps/openmw/mwgui/dialogue.cpp @@ -509,7 +509,7 @@ namespace MWGui const MyGUI::Colour linkHot (223/255.f, 201/255.f, 159/255.f); const MyGUI::Colour linkNormal (150/255.f, 50/255.f, 30/255.f); const MyGUI::Colour linkActive (243/255.f, 237/255.f, 221/255.f); - for (std::map::reverse_iterator it = mChoices.rbegin(); it != mChoices.rend(); ++it) + for (std::vector >::iterator it = mChoices.begin(); it != mChoices.end(); ++it) { Choice* link = new Choice(it->second); mLinks.push_back(link); @@ -600,7 +600,7 @@ namespace MWGui void DialogueWindow::addChoice(const std::string& choice, int id) { - mChoices[choice] = id; + mChoices.push_back(std::make_pair(choice, id)); updateHistory(); } diff --git a/apps/openmw/mwgui/dialogue.hpp b/apps/openmw/mwgui/dialogue.hpp index 71935dfaf..6f16fcb03 100644 --- a/apps/openmw/mwgui/dialogue.hpp +++ b/apps/openmw/mwgui/dialogue.hpp @@ -161,7 +161,7 @@ namespace MWGui bool mGoodbye; std::vector mHistoryContents; - std::map mChoices; + std::vector > mChoices; std::vector mLinks; std::map mTopicLinks;