From 84a403f0a0590ebc11f66955e864c12886da5815 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 1 May 2005 18:18:24 +0000 Subject: Chat input now hides when not focussed, and doesn't allow player be controlled by keyboard when it is. --- src/game.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/game.cpp') 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))) { -- cgit v1.2.3-70-g09d2