summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Peter Nilsson <peppe@pappkartong.se>2011-06-26 10:43:59 +0200
committerJan-Peter Nilsson <peppe@pappkartong.se>2011-10-02 13:42:19 +0200
commit9960829650c247d9dcad64cc126340c8d2d071ed (patch)
treec8c6001bc616ed0b3e7a510a4a392d9c1eaa27fa
parentb4fea32e935cd3f97a62b867453c251ec76a9d67 (diff)
Implement Dialogue manager to GUI communicationnpc_dialogue
-rw-r--r--apps/openmw/mwdialogue/dialoguemanager.cpp89
-rw-r--r--apps/openmw/mwdialogue/dialoguemanager.hpp30
-rw-r--r--apps/openmw/mwgui/dialogue.cpp118
-rw-r--r--apps/openmw/mwgui/dialogue.hpp20
-rw-r--r--apps/openmw/mwgui/dialogue_history.cpp154
-rw-r--r--apps/openmw/mwgui/dialogue_history.hpp34
-rw-r--r--apps/openmw/mwgui/window_manager.cpp14
-rw-r--r--apps/openmw/mwgui/window_manager.hpp2
8 files changed, 366 insertions, 95 deletions
diff --git a/apps/openmw/mwdialogue/dialoguemanager.cpp b/apps/openmw/mwdialogue/dialoguemanager.cpp
index f78160c..bc94c60 100644
--- a/apps/openmw/mwdialogue/dialoguemanager.cpp
+++ b/apps/openmw/mwdialogue/dialoguemanager.cpp
@@ -205,10 +205,14 @@ namespace MWDialogue
ESMS::LiveCellRef<ESM::NPC, MWWorld::RefData> *cellRef = actor.get<ESM::NPC>();
if (!cellRef)
+ {
return false;
+ }
if (toLower (info.clas)!=toLower (cellRef->base->cls))
+ {
return false;
+ }
}
if (!info.npcFaction.empty())
@@ -226,8 +230,12 @@ namespace MWDialogue
// check cell
if (!info.cell.empty())
+ {
if (mEnvironment.mWorld->getPlayer().getPlayer().getCell()->cell->name != info.cell)
+ {
return false;
+ }
+ }
// TODO check DATAstruct
@@ -247,18 +255,70 @@ namespace MWDialogue
return true;
}
- DialogueManager::DialogueManager (MWWorld::Environment& environment) : mEnvironment (environment) {}
+ DialogueManager::DialogueManager (MWWorld::Environment& environment) :
+ mEnvironment (environment)
+ , mActor()
+ , mTopics()
+ {
+ mDiaInt = NULL;
+ }
+
+ void DialogueManager::updateTopics()
+ {
+ mTopics.clear();
+ std::map<std::string,ESM::Dialogue>::const_iterator i = mEnvironment.mWorld->getStore().dialogs.list.begin();
+ while(i != mEnvironment.mWorld->getStore().dialogs.list.end())
+ {
+ if(i->second.type == ESM::Dialogue::Topic)
+ {
+ bool include = false;
+ for (std::vector<ESM::DialInfo>::const_iterator j = i->second.mInfo.begin(); j != i->second.mInfo.end(); ++j)
+ {
+ if (isMatching(mActor, *j))
+ {
+ include = true;
+ break;
+ }
+ }
+
+ if(include)
+ {
+ mTopics.push_back(i->first);
+ }
+ }
+ i++;
+ }
+ }
void DialogueManager::startDialogue (const MWWorld::Ptr& actor)
{
- std::cout << "talking with " << MWWorld::Class::get (actor).getName (actor) << std::endl;
+ mActor = actor;
- const ESM::Dialogue *dialogue = mEnvironment.mWorld->getStore().dialogs.find ("hello");
+ std::string theName = MWWorld::Class::get(mActor).getName(mActor);
+ int theDisposition = 100; //FIXME set this to proper dispisition
+
+ std::cout << "talking with " << theName << std::endl;
+
+ //Update the list of available topics
+ updateTopics();
+
+ //Say hello
+ DialogueMessage theAnswer = getAnswer(std::string("hello"));
+
+ if(mDiaInt)
+ mDiaInt->startDialogue(theName, theDisposition, theAnswer, mTopics);
+ }
- for (std::vector<ESM::DialInfo>::const_iterator iter (dialogue->mInfo.begin());
- iter!=dialogue->mInfo.end(); ++iter)
+ const DialogueMessage DialogueManager::getAnswer(const std::string& parTopic, int parCond)
+ {
+ DialogueMessage theAnswer;
+
+ std::cout << "Saying '"<< parTopic << "' to " << MWWorld::Class::get(mActor).getName(mActor) << std::endl;
+ const ESM::Dialogue *dialogue = mEnvironment.mWorld->getStore().dialogs.find(parTopic);
+
+ for (std::vector<ESM::DialInfo>::const_iterator iter (dialogue->mInfo.begin()); iter!=dialogue->mInfo.end(); ++iter)
{
- if (isMatching (actor, *iter))
+ if (isMatching (mActor, *iter))
{
// start dialogue
std::cout << "found matching info record" << std::endl;
@@ -277,9 +337,26 @@ namespace MWDialogue
}
mEnvironment.mInputManager->setGuiMode(MWGui::GM_Dialogue);
+
+ theAnswer.mHeading = parTopic;
+ theAnswer.mText = iter->response;
break;
}
}
+ return theAnswer;
}
+ void DialogueManager::selectTopic(const std::string& parTopic, int parCond)
+ {
+ DialogueMessage theAnswer;
+ theAnswer = getAnswer(parTopic, parCond);
+ if(mDiaInt)
+ mDiaInt->addAnswer(theAnswer);
+ }
+
+ void DialogueManager::endDialogue()
+ {
+ //mActor = NULL;
+ mEnvironment.mInputManager->setGuiMode(MWGui::GM_Game);
+ }
}
diff --git a/apps/openmw/mwdialogue/dialoguemanager.hpp b/apps/openmw/mwdialogue/dialoguemanager.hpp
index 5b6b262..395ad32 100644
--- a/apps/openmw/mwdialogue/dialoguemanager.hpp
+++ b/apps/openmw/mwdialogue/dialoguemanager.hpp
@@ -1,4 +1,4 @@
-#ifndef GAME_MMDIALOG_DIALOGUEMANAGER_H
+#ifndef GAME_MWDIALOG_DIALOGUEMANAGER_H
#define GAME_MWDIALOG_DIALOGUEMANAGER_H
#include <components/esm/loadinfo.hpp>
@@ -12,19 +12,41 @@ namespace MWWorld
namespace MWDialogue
{
+ typedef struct
+ {
+ std::string mHeading;
+ std::string mText;
+ std::vector<std::string> mOptions;
+ } DialogueMessage;
+
+ class DialogueInterface
+ {
+ public:
+ virtual void startDialogue(std::string parName, int parDisposition, DialogueMessage& parAnswer, std::vector<std::string>& parTopics) = 0;
+ virtual void setDisposition(int parDisposition) = 0;
+ virtual void addAnswer(DialogueMessage& parAnswer) = 0;
+ virtual void setTopics(std::vector<std::string>& parTopics) = 0;
+ };
+
class DialogueManager
{
+ private:
MWWorld::Environment& mEnvironment;
+ MWWorld::Ptr mActor;
+ DialogueInterface* mDiaInt;
+ std::vector<std::string> mTopics;
bool isMatching (const MWWorld::Ptr& actor, const ESM::DialInfo::SelectStruct& select) const;
-
bool isMatching (const MWWorld::Ptr& actor, const ESM::DialInfo& info) const;
+ void updateTopics();
+ const DialogueMessage getAnswer(const std::string& parTopic, int parCond = -1);
public:
-
DialogueManager (MWWorld::Environment& environment);
-
void startDialogue (const MWWorld::Ptr& actor);
+ void endDialogue();
+ void setUi(DialogueInterface* parDi) { mDiaInt = parDi; }
+ void selectTopic(const std::string& parTopic, int parCond = -1);
};
}
diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp
index e48c142..a120347 100644
--- a/apps/openmw/mwgui/dialogue.cpp
+++ b/apps/openmw/mwgui/dialogue.cpp
@@ -1,6 +1,7 @@
#include "dialogue.hpp"
#include "dialogue_history.hpp"
#include "window_manager.hpp"
+#include "../mwdialogue/dialoguemanager.hpp"
#include "widgets.hpp"
#include "components/esm_store/store.hpp"
@@ -20,101 +21,96 @@ DialogueWindow::DialogueWindow(WindowManager& parWindowManager)
// Centre dialog
center();
- //WindowManager *wm = environment.mWindowManager;
- setText("NpcName", "Name of character");
-
+ //NPC Name text field
+ getWidget(npcName, "NpcName");
+
+ //Disposition
+ getWidget(disposition, "NpcDisposition");
+
//History view
getWidget(history, "History");
+ history->initialiseOverride(); //FIXME remove when upgrading MyGUI
history->setOverflowToTheLeft(true);
- history->getClient()->eventMouseButtonClick = MyGUI::newDelegate(this, &DialogueWindow::onHistoryClicked);
+ history->eventTopicSelected = MyGUI::newDelegate(this, &DialogueWindow::onHistorySelectTopic);
//Topics list
getWidget(topicsList, "TopicsList");
topicsList->setScrollVisible(true);
- topicsList->eventListSelectAccept = MyGUI::newDelegate(this, &DialogueWindow::onSelectTopic);
topicsList->eventListMouseItemActivate = MyGUI::newDelegate(this, &DialogueWindow::onSelectTopic);
- topicsList->eventListChangePosition = MyGUI::newDelegate(this, &DialogueWindow::onSelectTopic);
+ //Bye button
MyGUI::ButtonPtr byeButton;
getWidget(byeButton, "ByeButton");
byeButton->eventMouseButtonClick = MyGUI::newDelegate(this, &DialogueWindow::onByeClicked);
-
- updateOptions();
-}
-
-void DialogueWindow::onHistoryClicked(MyGUI::Widget* _sender)
-{
- ISubWidgetText* t = history->getSubWidgetText();
- if(t == nullptr)
- return;
-
- const IntPoint& lastPressed = InputManager::getInstance().getLastLeftPressed();
-
- size_t cursorPosition = t->getCursorPosition(lastPressed);
- if(history->getColorAtPos(cursorPosition) != "#FFFFFF")
- {
- UString key = history->getColorTextAt(cursorPosition);
- std::cout << "Clicked on key: " << key << std::endl;
- //eventTopicSelected(key);
- }
}
void DialogueWindow::open()
{
- updateOptions();
setVisible(true);
}
+
void DialogueWindow::onByeClicked(MyGUI::Widget* _sender)
{
+ history->clear();
+ setVisible(false);
eventBye();
}
+
+void DialogueWindow::onHistorySelectTopic(const std::string& parTopic, int parCond)
+{
+ eventTopicSelected(parTopic, parCond);
+}
+
+
void DialogueWindow::onSelectTopic(MyGUI::List* _sender, size_t _index)
{
if (_index == MyGUI::ITEM_NONE)
return;
- //const std::string* theTopic = topicsList->getItemDataAt<std::string>(_index);
- //std::cout << "Selected: "<< theTopic << std::endl;
- //eventTopicSelected(key);
+ const std::string* theTopic = topicsList->getItemDataAt<std::string>(_index);
+ eventTopicSelected(*theTopic, -1);
}
-void DialogueWindow::updateOptions()
+void DialogueWindow::startDialogue(std::string parName, int parDisposition, MWDialogue::DialogueMessage& parAnswer, std::vector<std::string>& parTopics)
{
- //FIXME Add this properly
- history->addDialogText("Through the translucent surface of the orb, you see shifting images of distant locations...");
- for(int z = 0; z < 10; z++)
+ //Set Name
+ npcName->setCaption(parName);
+
+ //Set Disposition
+ setDisposition(parDisposition);
+
+ setTopics(parTopics);
+ addAnswer(parAnswer);
+}
+
+
+void DialogueWindow::setDisposition(int parDisposition)
+{
+ std::stringstream ss;
+ ss << parDisposition;
+ disposition->setProperty("Progress_Position", ss.str());
+}
+
+
+void DialogueWindow::addAnswer(MWDialogue::DialogueMessage& parAnswer)
+{
+ history->addHistory(parAnswer);
+}
+
+
+void DialogueWindow::setTopics(std::vector<std::string>& parTopics)
+{
+ //Update the list of available topics
+ topicsList->removeAllItems();
+ std::vector<std::string>::iterator i;
+ for(i = parTopics.begin(); i < parTopics.end(); i++)
{
- history->addDialogHeading("Fort Frostmoth");
- history->addDialogText("The image in the orb flickers, and you see.... The cold courtyard of #FF0000Fort Frostmoth#FFFFFF, battered bu werewolf attack, but still standing, still projecting Imperial might even to this distant and cold corner of the world.");
+ topicsList->addItem(*i, *i);
}
- //Clear the list of topics
- topicsList->removeAllItems();
- int i = 0;
- topicsList->addItem("Ald'ruhn", i++);
- topicsList->addItem("Balmora", i++);
- topicsList->addItem("Sadrith Mora", i++);
- topicsList->addItem("Vivec", i++);
- topicsList->addItem("Ald Velothi", i++);
- topicsList->addItem("Caldera", i++);
- topicsList->addItem("Dagon Fel ", i++);
- topicsList->addItem("Gnaar Mok", i++);
- topicsList->addItem("Gnisis", i++);
- topicsList->addItem("Hla Oad", i++);
- topicsList->addItem("Khuul", i++);
- topicsList->addItem("Maar Gan", i++);
- topicsList->addItem("Molag Mar", i++);
- topicsList->addItem("Pelagiad", i++);
- topicsList->addItem("Seyda Neen", i++);
- topicsList->addItem("Suran", i++);
- topicsList->addItem("Tel Aruhn", i++);
- topicsList->addItem("Tel Branora", i++);
- topicsList->addItem("Tel Fyr", i++);
- topicsList->addItem("Tel Mora", i++);
- topicsList->addItem("Tel Vos", i++);
- topicsList->addItem("Vos", i++);
+ //Update links in history view
+ history->setTopics(parTopics);
}
-
diff --git a/apps/openmw/mwgui/dialogue.hpp b/apps/openmw/mwgui/dialogue.hpp
index ddb6f8a..a2713d5 100644
--- a/apps/openmw/mwgui/dialogue.hpp
+++ b/apps/openmw/mwgui/dialogue.hpp
@@ -2,6 +2,8 @@
#define MWGUI_DIALOGE_H
#include "window_base.hpp"
+#include "../mwdialogue/dialoguemanager.hpp"
+
#include <boost/array.hpp>
namespace MWGui
@@ -20,7 +22,7 @@ namespace MWGui
using namespace MyGUI;
- class DialogueWindow: public WindowBase
+ class DialogueWindow: public WindowBase, public MWDialogue::DialogueInterface
{
public:
DialogueWindow(WindowManager& parWindowManager);
@@ -29,22 +31,30 @@ namespace MWGui
// Events
typedef delegates::CDelegate0 EventHandle_Void;
+ typedef delegates::CDelegate2<const std::string&, int> EventHandle_String;
/** Event : Dialog finished, OK button clicked.\n
signature : void method()\n
*/
EventHandle_Void eventBye;
+ EventHandle_String eventTopicSelected;
+
+ virtual void startDialogue(std::string parName, int parDisposition, MWDialogue::DialogueMessage& parAnswer, std::vector<std::string>& parTopics);
+ virtual void setDisposition(int parDisposition);
+ virtual void addAnswer(MWDialogue::DialogueMessage& parAnswer);
+ virtual void setTopics(std::vector<std::string>& parTopics);
protected:
void onSelectTopic(MyGUI::List* _sender, size_t _index);
void onByeClicked(MyGUI::Widget* _sender);
- void onHistoryClicked(MyGUI::Widget* _sender);
private:
- void updateOptions();
+ void onHistorySelectTopic(const std::string& parTopic, int parCond);
- DialogeHistory* history;
- MyGUI::ListPtr topicsList;
+ DialogeHistory* history;
+ MyGUI::ListPtr topicsList;
+ MyGUI::StaticTextPtr npcName;
+ MyGUI::ProgressPtr disposition;
};
}
#endif
diff --git a/apps/openmw/mwgui/dialogue_history.cpp b/apps/openmw/mwgui/dialogue_history.cpp
index aaa559d..f8db71b 100644
--- a/apps/openmw/mwgui/dialogue_history.cpp
+++ b/apps/openmw/mwgui/dialogue_history.cpp
@@ -13,6 +13,21 @@
using namespace MWGui;
using namespace Widgets;
+DialogeHistory::DialogeHistory() : MyGUI::Edit()
+{
+ mTextColor = "#FFFFFF";
+ mHeadingColor = "#00FF00";
+ mLinkColor = "#FF0000";
+ mOptionColor = "#0000FF";
+}
+
+void DialogeHistory::initialiseOverride()
+{
+ //FIXME When updating myGUI remove call to this function from DialogueWindow and make it call base
+ //Base::initialiseOverride();
+ mClient->eventMouseButtonClick = MyGUI::newDelegate(this, &DialogeHistory::onHistoryClicked);
+}
+
UString DialogeHistory::getColorAtPos(size_t _pos)
{
UString colour = TextIterator::convertTagColour(mText->getTextColour());
@@ -59,17 +74,150 @@ UString DialogeHistory::getColorTextAt(size_t _pos)
return "";
}
+
+void DialogeHistory::onHistoryClicked(MyGUI::Widget* _sender)
+{
+ int option = -1;
+ ISubWidgetText* t = getSubWidgetText();
+ if(t == nullptr)
+ return;
+
+ const IntPoint& lastPressed = InputManager::getInstance().getLastLeftPressed();
+
+ size_t cursorPosition = t->getCursorPosition(lastPressed);
+ UString theColor = getColorAtPos(cursorPosition);
+
+ //Clicked on a topic
+ if(theColor == mLinkColor)
+ {
+ UString key = getColorTextAt(cursorPosition);
+ eventTopicSelected(key.asUTF8(), option);
+ }
+ //Clicked on an option
+ else if(theColor == mOptionColor)
+ {
+ UString key = getColorTextAt(cursorPosition);
+
+ MWDialogue::DialogueMessage msg = mHistory.back();
+ std::vector<std::string>::const_iterator i;
+ int index = 0;
+ for(i = msg.mOptions.begin(); i < msg.mOptions.end(); i++)
+ {
+ if(*i == key.asUTF8())
+ {
+ option = index;
+ key = msg.mHeading;
+ }
+ index++;
+ }
+
+ //Remove the question
+ mHistory.pop_back();
+ update();
+
+ eventTopicSelected(key.asUTF8(), option);
+ }
+}
+
+void DialogeHistory::setTopics(std::vector<std::string>& parTopics)
+{
+ mTopics = parTopics;
+ update();
+}
+
void DialogeHistory::addDialogHeading(const UString& parText)
{
- UString head("\n#00FF00");
+ UString head("\n");
+ head.append(mHeadingColor);
head.append(parText);
- head.append("#FFFFFF\n");
+ head.append(mTextColor);
+ head.append("\n");
addText(head);
}
+std::string::size_type DialogeHistory::replaceOnce(std::string& str, std::string what, std::string to, std::string::size_type start)
+{
+ std::string::size_type pos = str.find(what, start);
+ if (pos != std::string::npos)
+ {
+ str.replace(pos,what.length(),to);
+ return (pos+to.length());
+ }
+ return 0;
+}
+
+int DialogeHistory::replaceAll(std::string& str, std::string what, std::string to)
+{
+ int num = 0;
+ std::string::size_type start = 0;
+ while ((start = replaceOnce(str,what,to, start)) != 0)
+ {
+ num++;
+ if(num > 100)
+ break;
+ }
+ return num;
+}
+
void DialogeHistory::addDialogText(const UString& parText)
{
- addText(parText);
+ std::string tmp = parText.asUTF8();
+
+ //Mark all topics in a different colour
+ std::vector<std::string>::iterator i;
+ for(i = mTopics.begin(); i < mTopics.end(); i++)
+ {
+ std::string word(*i);
+ std::transform(word.begin(), word.begin()+1,word.begin(), ::toupper);
+
+ std::stringstream ss;
+ ss << mLinkColor << *i << mTextColor;
+ replaceAll(tmp, *i, ss.str());
+
+ std::stringstream ss2;
+ ss2 << mLinkColor << word << mTextColor;
+ replaceAll(tmp, word, ss2.str());
+ }
+ addText(tmp);
addText("\n");
}
+void DialogeHistory::addHistory(MWDialogue::DialogueMessage& parHistory)
+{
+ mHistory.push_back(parHistory);
+ addHistoryText(parHistory);
+}
+
+void DialogeHistory::addHistoryText(const MWDialogue::DialogueMessage& parHistory)
+{
+ if(!parHistory.mHeading.empty())
+ addDialogHeading(parHistory.mHeading);
+ if(!parHistory.mText.empty())
+ addDialogText(parHistory.mText);
+
+ if(!parHistory.mOptions.empty())
+ {
+ std::vector<std::string>::const_iterator i;
+ for(i = parHistory.mOptions.begin(); i < parHistory.mOptions.end(); i++)
+ {
+ std::stringstream ss;
+ ss << "\n" << mOptionColor << *i << mTextColor << "\n";
+ addText(ss.str());
+ }
+ }
+}
+
+void DialogeHistory::update()
+{
+ setCaption("");
+ for(std::vector<MWDialogue::DialogueMessage>::const_iterator i = mHistory.begin(); i != mHistory.end(); i++)
+ {
+ addHistoryText(*i);
+ }
+}
+
+void DialogeHistory::clear()
+{
+ mHistory.clear();
+ setCaption("");
+}
diff --git a/apps/openmw/mwgui/dialogue_history.hpp b/apps/openmw/mwgui/dialogue_history.hpp
index ec41678..8abed88 100644
--- a/apps/openmw/mwgui/dialogue_history.hpp
+++ b/apps/openmw/mwgui/dialogue_history.hpp
@@ -1,19 +1,47 @@
#ifndef MWGUI_DIALOGE_HISTORY_H
#define MWGUI_DIALOGE_HISTORY_H
#include <openengine/gui/layout.hpp>
+#include <vector>
+#include "../mwdialogue/dialoguemanager.hpp"
namespace MWGui
{
using namespace MyGUI;
- class DialogeHistory : public MyGUI::Edit
+ class MYGUI_EXPORT DialogeHistory : public MyGUI::Edit
{
MYGUI_RTTI_DERIVED( DialogeHistory )
- public:
- Widget* getClient() { return mClient; }
+ private:
+ //Data
+ std::vector<MWDialogue::DialogueMessage> mHistory;
+ std::vector<std::string> mTopics;
+
+ //Colours
+ std::string mTextColor;
+ std::string mHeadingColor;
+ std::string mLinkColor;
+ std::string mOptionColor;
+
+ void onHistoryClicked(MyGUI::Widget* _sender);
UString getColorAtPos(size_t _pos);
UString getColorTextAt(size_t _pos);
+
+ std::string::size_type replaceOnce(std::string& str, std::string what, std::string to, std::string::size_type start = 0);
+ int replaceAll(std::string& str, std::string what, std::string to);
+ void update();
void addDialogHeading(const UString& parText);
void addDialogText(const UString& parText);
+ void addHistoryText(const MWDialogue::DialogueMessage& parHistory);
+
+ public:
+ typedef delegates::CDelegate2<const std::string&, int> EventHandle_String;
+ EventHandle_String eventTopicSelected;
+
+ DialogeHistory();
+ virtual void initialiseOverride();
+ //Widget* getClient() { return mClient; }
+ void addHistory(MWDialogue::DialogueMessage& parHistory);
+ void setTopics(std::vector<std::string>& parTopics);
+ void clear();
};
}
#endif
diff --git a/apps/openmw/mwgui/window_manager.cpp b/apps/openmw/mwgui/window_manager.cpp
index 84e4585..e7f6e47 100644
--- a/apps/openmw/mwgui/window_manager.cpp
+++ b/apps/openmw/mwgui/window_manager.cpp
@@ -324,7 +324,9 @@ void WindowManager::updateVisible()
if (!dialogueWindow)
{
dialogueWindow = new DialogueWindow(*this);
- dialogueWindow->eventBye = MyGUI::newDelegate(this, &WindowManager::onDialogueWindowBye);
+ environment.mDialogueManager->setUi(dialogueWindow);
+ dialogueWindow->eventTopicSelected = MyGUI::newDelegate(environment.mDialogueManager, &MWDialogue::DialogueManager::selectTopic);
+ dialogueWindow->eventBye = MyGUI::newDelegate(environment.mDialogueManager, &MWDialogue::DialogueManager::endDialogue);
}
dialogueWindow->open();
return;
@@ -524,16 +526,6 @@ void WindowManager::onRaceDialogDone(WindowBase* parWindow)
}
}
-void WindowManager::onDialogueWindowBye()
-{
- if (dialogueWindow)
- {
- //FIXME set some state and stuff?
- removeDialog(dialogueWindow);
- }
- setGuiMode(GM_Game);
-}
-
void WindowManager::onRaceDialogBack()
{
if (raceDialog)
diff --git a/apps/openmw/mwgui/window_manager.hpp b/apps/openmw/mwgui/window_manager.hpp
index 293bac6..45a801d 100644
--- a/apps/openmw/mwgui/window_manager.hpp
+++ b/apps/openmw/mwgui/window_manager.hpp
@@ -268,8 +268,6 @@ namespace MWGui
private:
- void onDialogueWindowBye();
-
// Character generation: Name dialog
void onNameDialogDone(WindowBase* parWindow);