summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2009-09-29 21:09:13 +0300
committerChuck Miller <shadowmil@gmail.com>2009-09-29 15:09:24 -0400
commit805edb864a489b8af91db18c7b53bd80b60b0fe0 (patch)
tree6ccf7ece48022e39e3d79fdf04a1215180b34b6f /src/game.cpp
parent50c23cbae082f4aba50620e97ab1f08a16f9703d (diff)
downloadmana-805edb864a489b8af91db18c7b53bd80b60b0fe0.tar.gz
mana-805edb864a489b8af91db18c7b53bd80b60b0fe0.tar.bz2
mana-805edb864a489b8af91db18c7b53bd80b60b0fe0.tar.xz
mana-805edb864a489b8af91db18c7b53bd80b60b0fe0.zip
Outfits update
Increased outfits count to 15 Changed unequip outfits feature Added copy outfits feature
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp62
1 files changed, 41 insertions, 21 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 2acb8bc2..de455b30 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -616,63 +616,83 @@ void Game::handleInput()
}
}
- if (event.key.keysym.mod & KMOD_RCTRL && !chatWindow->isInputFocused())
+ if ((event.key.keysym.mod & KMOD_RCTRL || event.key.keysym.mod & KMOD_LCTRL)
+ && !chatWindow->isInputFocused())
{
+ int outfitNum = -1;
switch (event.key.keysym.sym)
{
case SDLK_1:
- outfitWindow->wearOutfit(0);
- used = true;
+ outfitNum = 0;
break;
case SDLK_2:
- outfitWindow->wearOutfit(1);
- used = true;
+ outfitNum = 1;
break;
case SDLK_3:
- outfitWindow->wearOutfit(2);
- used = true;
+ outfitNum = 2;
break;
case SDLK_4:
- outfitWindow->wearOutfit(3);
- used = true;
+ outfitNum = 3;
break;
case SDLK_5:
- outfitWindow->wearOutfit(4);
- used = true;
+ outfitNum = 4;
break;
case SDLK_6:
- outfitWindow->wearOutfit(5);
- used = true;
+ outfitNum = 5;
break;
case SDLK_7:
- outfitWindow->wearOutfit(6);
- used = true;
+ outfitNum = 6;
break;
case SDLK_8:
- outfitWindow->wearOutfit(7);
- used = true;
+ outfitNum = 7;
break;
case SDLK_9:
- outfitWindow->wearOutfit(8);
- used = true;
+ outfitNum = 8;
break;
case SDLK_0:
- outfitWindow->wearOutfit(9);
- used = true;
+ outfitNum = 9;
+ break;
+
+ case SDLK_MINUS:
+ outfitNum = 10;
+ break;
+
+ case SDLK_EQUALS:
+ outfitNum = 11;
+ break;
+
+ case SDLK_BACKSPACE:
+ outfitNum = 12;
+ break;
+
+ case SDLK_INSERT:
+ outfitNum = 13;
+ break;
+
+ case SDLK_HOME:
+ outfitNum = 14;
break;
default:
break;
}
+ if (outfitNum >= 0)
+ {
+ used = true;
+ if (event.key.keysym.mod & KMOD_RCTRL)
+ outfitWindow->wearOutfit(outfitNum);
+ else if (event.key.keysym.mod & KMOD_LCTRL)
+ outfitWindow->copyOutfit(outfitNum);
+ }
}
const int tKey = keyboard.getKeyIndex(event.key.keysym.sym);