diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/npcdialog.cpp | 24 | ||||
-rw-r--r-- | src/gui/npcpostdialog.cpp | 4 | ||||
-rw-r--r-- | src/gui/recorder.cpp | 2 | ||||
-rw-r--r-- | src/gui/socialwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/trade.cpp | 2 |
5 files changed, 17 insertions, 17 deletions
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp index a14e88eb..935962a0 100644 --- a/src/gui/npcdialog.cpp +++ b/src/gui/npcdialog.cpp @@ -22,7 +22,7 @@ #include "gui/npcdialog.h" #include "configuration.h" -#include "eventmanager.h" +#include "event.h" #include "listener.h" #include "playerinfo.h" @@ -50,10 +50,6 @@ #define NpcEvent(name) Mana::Event event(name);\ event.setInt("npcId", mNpcId); -#define FireEvent(event) Mana::EventManager::trigger("NPC", event); - -#define FireEvent2(name) NpcEvent(name) FireEvent(event) - typedef std::map<int, NpcDialog*> NpcDialogs; class NpcEventListener : public Mana::Listener @@ -231,7 +227,7 @@ void NpcDialog::action(const gcn::ActionEvent &event) NpcEvent("doMenu") event.setInt("choice", selectedIndex + 1); - FireEvent(event); + event.trigger("NPC"); } else if (mInputState == NPC_INPUT_STRING) { @@ -239,7 +235,7 @@ void NpcDialog::action(const gcn::ActionEvent &event) NpcEvent("doStringInput") event.setString("value", printText); - FireEvent(event); + event.trigger("NPC"); } else if (mInputState == NPC_INPUT_INTEGER) { @@ -247,7 +243,7 @@ void NpcDialog::action(const gcn::ActionEvent &event) NpcEvent("doIntegerInput") event.setInt("value", mIntField->getValue()); - FireEvent(event); + event.trigger("NPC"); } // addText will auto remove the input layout addText(strprintf("\n> \"%s\"\n", printText.c_str()), false); @@ -285,12 +281,14 @@ void NpcDialog::action(const gcn::ActionEvent &event) void NpcDialog::nextDialog() { - FireEvent2("doNext") + NpcEvent("doNext"); + event.trigger("NPC"); } void NpcDialog::closeDialog() { - FireEvent2("doClose") + NpcEvent("doClose"); + event.trigger("NPC"); close(); } @@ -561,7 +559,8 @@ void NpcEventListener::event(const std::string &channel, if (!dialog) { int mNpcId = id; - FireEvent2("doNext") + NpcEvent("doNext"); + event.trigger("NPC"); return; } @@ -575,7 +574,8 @@ void NpcEventListener::event(const std::string &channel, if (!dialog) { int mNpcId = id; - FireEvent2("doClose") + NpcEvent("doClose"); + event.trigger("NPC"); return; } diff --git a/src/gui/npcpostdialog.cpp b/src/gui/npcpostdialog.cpp index c35f77a3..0662515e 100644 --- a/src/gui/npcpostdialog.cpp +++ b/src/gui/npcpostdialog.cpp @@ -21,7 +21,7 @@ #include "gui/npcpostdialog.h" -#include "eventmanager.h" +#include "event.h" #include "playerinfo.h" #include "gui/widgets/button.h" @@ -101,7 +101,7 @@ void NpcPostDialog::action(const gcn::ActionEvent &event) event.setInt("npcId", mNpcId); event.setString("recipient", mSender->getText()); event.setString("text", mText->getText()); - Mana::EventManager::trigger("NPC", event); + event.trigger("NPC"); } setVisible(false); } diff --git a/src/gui/recorder.cpp b/src/gui/recorder.cpp index 53024e7c..2345369e 100644 --- a/src/gui/recorder.cpp +++ b/src/gui/recorder.cpp @@ -21,7 +21,7 @@ #include "gui/recorder.h" #include "client.h" -#include "eventmanager.h" +#include "event.h" #include "gui/chat.h" diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp index 8911c8fd..88cd5732 100644 --- a/src/gui/socialwindow.cpp +++ b/src/gui/socialwindow.cpp @@ -20,7 +20,7 @@ #include "gui/socialwindow.h" -#include "eventmanager.h" +#include "event.h" #include "guild.h" #include "localplayer.h" #include "party.h" diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp index 6d3c7b21..bfb61c33 100644 --- a/src/gui/trade.cpp +++ b/src/gui/trade.cpp @@ -21,7 +21,7 @@ #include "gui/trade.h" -#include "eventmanager.h" +#include "event.h" #include "inventory.h" #include "item.h" #include "localplayer.h" |