summaryrefslogtreecommitdiff
path: root/src/gui/npcdialog.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-04-09 00:16:28 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-04-09 17:54:13 +0200
commit404d3f7f2f9aa455bea423a6a00025df23cd6687 (patch)
tree27f6655b3345be1ab109433a55b0512dfe48cb34 /src/gui/npcdialog.cpp
parent1e1f619b9ae5aa26058c499c988f45d1fb1b6d53 (diff)
downloadmana-404d3f7f2f9aa455bea423a6a00025df23cd6687.tar.gz
mana-404d3f7f2f9aa455bea423a6a00025df23cd6687.tar.bz2
mana-404d3f7f2f9aa455bea423a6a00025df23cd6687.tar.xz
mana-404d3f7f2f9aa455bea423a6a00025df23cd6687.zip
Removed the Mana namespace
It's just an annoyance when it's only applied to a few classes. Either we place everything in this namespace or nothing, and at the moment I don't see any rationale for placing everything in a Mana namespace. Acked-by: Jared Adams
Diffstat (limited to 'src/gui/npcdialog.cpp')
-rw-r--r--src/gui/npcdialog.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index 8322a735..a8f61a1a 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -52,10 +52,10 @@
typedef std::map<int, NpcDialog*> NpcDialogs;
-class NpcEventListener : public Mana::Listener
+class NpcEventListener : public Listener
{
public:
- void event(Mana::Event::Channel channel, const Mana::Event &event);
+ void event(Event::Channel channel, const Event &event);
NpcDialog *getDialog(int id, bool make = true);
@@ -143,7 +143,7 @@ NpcDialog::NpcDialog(int npcId)
setVisible(true);
requestFocus();
- listen(Mana::Event::ConfigChannel);
+ listen(Event::ConfigChannel);
PlayerInfo::setNPCInteractionCount(PlayerInfo::getNPCInteractionCount()
+ 1);
}
@@ -387,12 +387,12 @@ void NpcDialog::setVisible(bool visible)
}
}
-void NpcDialog::event(Mana::Event::Channel channel, const Mana::Event &event)
+void NpcDialog::event(Event::Channel channel, const Event &event)
{
- if (channel != Mana::Event::ConfigChannel)
+ if (channel != Event::ConfigChannel)
return;
- if (event.getType() == Mana::Event::ConfigOptionChanged &&
+ if (event.getType() == Event::ConfigOptionChanged &&
event.getString("option") == "logNpcInGui")
{
mLogInteraction = config.getBoolValue("logNpcInGui");
@@ -436,7 +436,7 @@ void NpcDialog::setup()
npcListener = new NpcEventListener();
- npcListener->listen(Mana::Event::NpcChannel);
+ npcListener->listen(Event::NpcChannel);
}
void NpcDialog::buildLayout()
@@ -506,19 +506,19 @@ void NpcDialog::buildLayout()
mScrollArea->setVerticalScrollAmount(mScrollArea->getVerticalMaxScroll());
}
-void NpcEventListener::event(Mana::Event::Channel channel,
- const Mana::Event &event)
+void NpcEventListener::event(Event::Channel channel,
+ const Event &event)
{
- if (channel != Mana::Event::NpcChannel)
+ if (channel != Event::NpcChannel)
return;
- if (event.getType() == Mana::Event::Message)
+ if (event.getType() == Event::Message)
{
NpcDialog *dialog = getDialog(event.getInt("id"));
dialog->addText(event.getString("text"));
}
- else if (event.getType() == Mana::Event::Menu)
+ else if (event.getType() == Event::Menu)
{
NpcDialog *dialog = getDialog(event.getInt("id"));
@@ -528,7 +528,7 @@ void NpcEventListener::event(Mana::Event::Channel channel,
for (int i = 1; i <= count; i++)
dialog->addChoice(event.getString("choice" + toString(i)));
}
- else if (event.getType() == Mana::Event::IntegerInput)
+ else if (event.getType() == Event::IntegerInput)
{
NpcDialog *dialog = getDialog(event.getInt("id"));
@@ -538,7 +538,7 @@ void NpcEventListener::event(Mana::Event::Channel channel,
dialog->integerRequest(defaultValue, min, max);
}
- else if (event.getType() == Mana::Event::StringInput)
+ else if (event.getType() == Event::StringInput)
{
NpcDialog *dialog = getDialog(event.getInt("id"));
@@ -546,12 +546,12 @@ void NpcEventListener::event(Mana::Event::Channel channel,
{
dialog->textRequest(event.getString("default"));
}
- catch (Mana::BadEvent)
+ catch (BadEvent)
{
dialog->textRequest("");
}
}
- else if (event.getType() == Mana::Event::Next)
+ else if (event.getType() == Event::Next)
{
int id = event.getInt("id");
NpcDialog *dialog = getDialog(id, false);
@@ -565,7 +565,7 @@ void NpcEventListener::event(Mana::Event::Channel channel,
dialog->showNextButton();
}
- else if (event.getType() == Mana::Event::Close)
+ else if (event.getType() == Event::Close)
{
int id = event.getInt("id");
NpcDialog *dialog = getDialog(id, false);
@@ -579,11 +579,11 @@ void NpcEventListener::event(Mana::Event::Channel channel,
dialog->showCloseButton();
}
- else if (event.getType() == Mana::Event::CloseAll)
+ else if (event.getType() == Event::CloseAll)
{
NpcDialog::closeAll();
}
- else if (event.getType() == Mana::Event::End)
+ else if (event.getType() == Event::End)
{
int id = event.getInt("id");
NpcDialog *dialog = getDialog(id, false);
@@ -591,7 +591,7 @@ void NpcEventListener::event(Mana::Event::Channel channel,
if (dialog)
dialog->close();
}
- else if (event.getType() == Mana::Event::Post)
+ else if (event.getType() == Event::Post)
{
new NpcPostDialog(event.getInt("id"));
}