summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-05-14 10:32:17 -0600
committerJared Adams <jaxad0127@gmail.com>2009-05-14 10:32:48 -0600
commit2032ca0fb1fd6b59c025180b673e6760d9c12bdc (patch)
tree043e8783ce04dcdaf802a79d5992b5197feb3db4 /src/game.cpp
parent39e06227df101a73aa5b9078a3afb6a7a71b89ba (diff)
downloadmana-2032ca0fb1fd6b59c025180b673e6760d9c12bdc.tar.gz
mana-2032ca0fb1fd6b59c025180b673e6760d9c12bdc.tar.bz2
mana-2032ca0fb1fd6b59c025180b673e6760d9c12bdc.tar.xz
mana-2032ca0fb1fd6b59c025180b673e6760d9c12bdc.zip
Add QOAL's outfit window
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 59c57607..98985e74 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -57,6 +57,7 @@
#include "gui/ministatus.h"
#include "gui/npcdialog.h"
#include "gui/okdialog.h"
+#include "gui/outfitwindow.h"
#include "gui/sdlinput.h"
#include "gui/sell.h"
#include "gui/setup.h"
@@ -138,6 +139,7 @@ HelpWindow *helpWindow;
DebugWindow *debugWindow;
ShortcutWindow *itemShortcutWindow;
ShortcutWindow *emoteShortcutWindow;
+OutfitWindow *outfitWindow;
BeingManager *beingManager = NULL;
FloorItemManager *floorItemManager = NULL;
@@ -232,6 +234,7 @@ static void createGuiWindows()
new ItemShortcutContainer);
emoteShortcutWindow = new ShortcutWindow("EmoteShortcut",
new EmoteShortcutContainer);
+ outfitWindow = new OutfitWindow();
localChatTab = new ChatTab(_("General"));
@@ -277,6 +280,7 @@ static void destroyGuiWindows()
delete itemShortcutWindow;
delete emoteShortcutWindow;
delete storageWindow;
+ delete outfitWindow;
}
Game::Game():
@@ -606,6 +610,65 @@ void Game::handleInput()
}
}
+ if (event.key.keysym.mod & KMOD_RCTRL && !chatWindow->isInputFocused())
+ {
+ switch (event.key.keysym.sym)
+ {
+ case SDLK_1:
+ outfitWindow->wearOutfit(0);
+ used = true;
+ break;
+
+ case SDLK_2:
+ outfitWindow->wearOutfit(1);
+ used = true;
+ break;
+
+ case SDLK_3:
+ outfitWindow->wearOutfit(2);
+ used = true;
+ break;
+
+ case SDLK_4:
+ outfitWindow->wearOutfit(3);
+ used = true;
+ break;
+
+ case SDLK_5:
+ outfitWindow->wearOutfit(4);
+ used = true;
+ break;
+
+ case SDLK_6:
+ outfitWindow->wearOutfit(5);
+ used = true;
+ break;
+
+ case SDLK_7:
+ outfitWindow->wearOutfit(6);
+ used = true;
+ break;
+
+ case SDLK_8:
+ outfitWindow->wearOutfit(7);
+ used = true;
+ break;
+
+ case SDLK_9:
+ outfitWindow->wearOutfit(8);
+ used = true;
+ break;
+
+ case SDLK_0:
+ outfitWindow->wearOutfit(9);
+ used = true;
+ break;
+
+ default:
+ break;
+ }
+ }
+
const int tKey = keyboard.getKeyIndex(event.key.keysym.sym);
switch (tKey)
{
@@ -782,6 +845,9 @@ void Game::handleInput()
case KeyboardConfig::KEY_WINDOW_EMOTE_SHORTCUT:
requestedWindow = emoteShortcutWindow;
break;
+ case KeyboardConfig::KEY_WINDOW_OUTFIT:
+ requestedWindow = outfitWindow;
+ break;
case KeyboardConfig::KEY_SCREENSHOT:
// Screenshot (picture, hence the p)
saveScreenshot();