From babaec33e51991475ba2ab9ec06c95bbe5f220c0 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sat, 1 Nov 2008 16:44:58 +0000 Subject: Merged revisions 4207-4209,4221-4222 via svnmerge from https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/branches/0.0 ........ r4207 | b_lindeijer | 2008-04-29 11:10:43 +0200 (Tue, 29 Apr 2008) | 6 lines * Fixed issue with determining whether chat input is focused (method no longer virtual). * Fixed sometimes rendering with the wrong font. * Fixed warnings about hiding virtual method, Window now always deletes its children (the option not to do so was never used anyway). ........ r4208 | b_lindeijer | 2008-04-29 13:25:26 +0200 (Tue, 29 Apr 2008) | 3 lines Removed unused option from GCContainer to not delete a child, fixing warnings about hiding virtual method gcn::Container::add. ........ r4209 | b_lindeijer | 2008-04-29 14:58:21 +0200 (Tue, 29 Apr 2008) | 3 lines When compiling with GCC, use the printf format attribute for the log method so that the compiler checks the type of its parameters. ........ r4221 | peaveydk | 2008-05-06 21:23:49 +0200 (Tue, 06 May 2008) | 1 line Dont allow dragging of empty placeholders. ........ r4222 | peaveydk | 2008-05-08 00:49:38 +0200 (Thu, 08 May 2008) | 1 line Make F8 toggle shortcut window as suggested by And1 an fate. ........ --- src/game.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index 6ae1a0f4..80d5610f 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -516,14 +516,14 @@ void Game::handleInput() case SDLK_F5: requestedWindow = skillDialog; break; case SDLK_F6: requestedWindow = minimap; break; case SDLK_F7: requestedWindow = chatWindow; break; - //case SDLK_F8: requestedWindow = buddyWindow; break; + case SDLK_F8: requestedWindow = itemShortcutWindow; break; case SDLK_F9: requestedWindow = setupWindow; break; case SDLK_F10: requestedWindow = debugWindow; break; //case SDLK_F11: requestedWindow = newSkillWindow; break; case SDLK_RETURN: // Input chat window - if (chatWindow->isFocused() || + if (chatWindow->isInputFocused() || deathNotice != NULL || weightNotice != NULL) { @@ -572,7 +572,8 @@ void Game::handleInput() break; } - if (keyboard.isEnabled() && !chatWindow->isFocused() && !guildWindow->isFocused()) + if (keyboard.isEnabled() && !chatWindow->isInputFocused() + && !guildWindow->isWindowFocused()) { const int tKey = keyboard.getKeyIndex(event.key.keysym.sym); // Checks if any item shortcut is pressed. @@ -634,7 +635,7 @@ void Game::handleInput() case KeyboardConfig::KEY_HIDE_WINDOWS: // Hide certain windows - if (!chatWindow->isFocused()) + if (!chatWindow->isInputFocused()) { statusWindow->setVisible(false); inventoryWindow->setVisible(false); @@ -759,7 +760,7 @@ void Game::handleInput() } // Moving player around if (player_node->mAction != Being::DEAD && - !chatWindow->isFocused()) + !chatWindow->isInputFocused()) { // Get the state of the keyboard keys keyboard.refreshActiveKeys(); -- cgit v1.2.3-70-g09d2