summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-09-09 00:47:31 +0300
committerAndrei Karas <akaras@inbox.ru>2011-09-09 00:47:57 +0300
commite72f26151bca6c5a73d0377e385c0f7dd7cab3aa (patch)
tree6960f1846e0258a5f3658cae6e2f40f643074e3f /src/game.cpp
parentf1c17766c66394ce875854430f8f028c0fa5b3a5 (diff)
downloadmv-e72f26151bca6c5a73d0377e385c0f7dd7cab3aa.tar.gz
mv-e72f26151bca6c5a73d0377e385c0f7dd7cab3aa.tar.bz2
mv-e72f26151bca6c5a73d0377e385c0f7dd7cab3aa.tar.xz
mv-e72f26151bca6c5a73d0377e385c0f7dd7cab3aa.zip
Add to inventory filter by letters from item names.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 5a372a6bd..aaa9694bf 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -785,7 +785,8 @@ void Game::handleInput()
&& !chatWindow->isInputFocused()
&& !setupWindow->isVisible()
&& !player_node->getAwayMode()
- && !NpcDialog::isAnyInputFocused())
+ && !NpcDialog::isAnyInputFocused()
+ && !InventoryWindow::isAnyInputFocused())
{
bool wearOutfit = false;
bool copyOutfit = false;
@@ -848,8 +849,11 @@ void Game::handleInput()
}
if (keyboard.isKeyActive(keyboard.KEY_TOGGLE_CHAT))
{
- if (chatWindow->requestChatFocus())
- used = true;
+ if (!InventoryWindow::isAnyInputFocused())
+ {
+ if (chatWindow->requestChatFocus())
+ used = true;
+ }
}
if (dialog)
{
@@ -861,7 +865,8 @@ void Game::handleInput()
}
if ((!chatWindow->isInputFocused() &&
- !NpcDialog::isAnyInputFocused())
+ !NpcDialog::isAnyInputFocused() &&
+ !InventoryWindow::isAnyInputFocused())
|| (event.key.keysym.mod & KMOD_ALT))
{
if (keyboard.isKeyActive(keyboard.KEY_PREV_CHAT_TAB))
@@ -948,7 +953,8 @@ void Game::handleInput()
&& mValidSpeed
&& !setupWindow->isVisible()
&& !player_node->getAwayMode()
- && !NpcDialog::isAnyInputFocused())
+ && !NpcDialog::isAnyInputFocused()
+ && !InventoryWindow::isAnyInputFocused())
{
switch (tKey)
{
@@ -1085,7 +1091,8 @@ void Game::handleInput()
&& !chatWindow->isInputFocused()
&& !NpcDialog::isAnyInputFocused()
&& !player_node->getAwayMode()
- && !keyboard.isKeyActive(keyboard.KEY_TARGET))
+ && !keyboard.isKeyActive(keyboard.KEY_TARGET)
+ && !InventoryWindow::isAnyInputFocused())
{
const int tKey = keyboard.getKeyIndex(event.key.keysym.sym);