diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2011-04-09 00:11:54 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2011-04-09 17:54:12 +0200 |
commit | 1e1f619b9ae5aa26058c499c988f45d1fb1b6d53 (patch) | |
tree | 1fe58c53388054ced122b5327e33fc2851a0606a /src/client.cpp | |
parent | 30d4b0adf4f17f05d1d62fc3428c896ef1079b6b (diff) | |
download | mana-1e1f619b9ae5aa26058c499c988f45d1fb1b6d53.tar.gz mana-1e1f619b9ae5aa26058c499c988f45d1fb1b6d53.tar.bz2 mana-1e1f619b9ae5aa26058c499c988f45d1fb1b6d53.tar.xz mana-1e1f619b9ae5aa26058c499c988f45d1fb1b6d53.zip |
Moved Channels to Mana::Event::Channel
Acked-by: Jared Adams
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client.cpp b/src/client.cpp index 0752b70a..4fb76b4b 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -471,12 +471,12 @@ Client::Client(const Options &options): // Initialize frame limiting SDL_initFramerate(&mFpsManager); - listen(CHANNEL_CONFIG); + listen(Mana::Event::ConfigChannel); //TODO: fix having to fake a option changed event Mana::Event fakeevent(Mana::Event::ConfigOptionChanged); fakeevent.setString("option", "fpslimit"); - event(CHANNEL_CONFIG, fakeevent); + event(Mana::Event::ConfigChannel, fakeevent); // Initialize PlayerInfo PlayerInfo::init(); @@ -637,7 +637,7 @@ int Client::exec() Mana::Event event(Mana::Event::StateChange); event.setInt("oldState", mOldState); event.setInt("newState", mState); - event.trigger(CHANNEL_CLIENT); + event.trigger(Mana::Event::ClientChannel); } if (mOldState == STATE_GAME) @@ -797,7 +797,7 @@ int Client::exec() paths.init("paths.xml", true); paths.setDefaultValues(getPathsDefaults()); - Mana::Event::trigger(CHANNEL_CLIENT, Mana::Event::LoadingDatabases); + Mana::Event::trigger(Mana::Event::ClientChannel, Mana::Event::LoadingDatabases); // Load XML databases ColorDB::load(); @@ -1072,9 +1072,9 @@ int Client::exec() return 0; } -void Client::event(Channels channel, const Mana::Event &event) +void Client::event(Mana::Event::Channel channel, const Mana::Event &event) { - if (channel == CHANNEL_CONFIG && + if (channel == Mana::Event::ConfigChannel && event.getType() == Mana::Event::ConfigOptionChanged && event.getString("option") == "fpslimit") { |