diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-05-01 18:18:24 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-05-01 18:18:24 +0000 |
commit | 84a403f0a0590ebc11f66955e864c12886da5815 (patch) | |
tree | 628d49ac79ea159ba0109eb8817cfd9144dbab13 /src/game.cpp | |
parent | e02192d7d1a34088d66072a60cf3ed57d638a695 (diff) | |
download | mana-84a403f0a0590ebc11f66955e864c12886da5815.tar.gz mana-84a403f0a0590ebc11f66955e864c12886da5815.tar.bz2 mana-84a403f0a0590ebc11f66955e864c12886da5815.tar.xz mana-84a403f0a0590ebc11f66955e864c12886da5815.zip |
Chat input now hides when not focussed, and doesn't allow player be controlled
by keyboard when it is.
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game.cpp b/src/game.cpp index 8e0168b2..51a0a0c7 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -206,7 +206,7 @@ void do_input() { if (!chatWindow->isFocused()) { - chatWindow->requestFocus(); + chatWindow->requestChatFocus(); used = true; } } @@ -287,7 +287,7 @@ void do_input() state = EXIT; } - if (keysym.sym == SDLK_g) + if (keysym.sym == SDLK_g && !chatWindow->isFocused()) { // Get the item code if (!chatWindow->isFocused()) @@ -405,7 +405,8 @@ void do_input() int yDirection = 0; int Direction = DIR_NONE; - if (player_node->action != DEAD && current_npc == 0) + if (player_node->action != DEAD && current_npc == 0 && + !chatWindow->isFocused()) { int x = player_node->x; int y = player_node->y; @@ -1368,14 +1369,13 @@ void do_parse() inventoryWindow->items->setEquipped( equipmentWindow->equipments[position - 1].inventoryIndex, false); - inventoryWindow->items->setEquipped(RFIFOW(2), true); equipmentWindow->addEquipment(position - 1, inventoryWindow->items->getId(RFIFOW(2))); equipmentWindow->equipments[position - 1].inventoryIndex = RFIFOW(2); - + // Trick to use the proper graphic until I find // the right packet switch (inventoryWindow->items->getId(RFIFOW(2))) { |