diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/tradewindow.cpp | 5 | ||||
-rw-r--r-- | src/gui/tradewindow.h | 2 | ||||
-rw-r--r-- | src/inputmanager.cpp | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/tradewindow.cpp b/src/gui/tradewindow.cpp index 8f85f677f..1d3d7ef39 100644 --- a/src/gui/tradewindow.cpp +++ b/src/gui/tradewindow.cpp @@ -459,3 +459,8 @@ bool TradeWindow::checkItem(Item *item) } return true; } + +bool TradeWindow::isInpupFocused() +{ + return (mMoneyField && mMoneyField->isFocused()); +} diff --git a/src/gui/tradewindow.h b/src/gui/tradewindow.h index 268d2f108..c917845fc 100644 --- a/src/gui/tradewindow.h +++ b/src/gui/tradewindow.h @@ -133,6 +133,8 @@ class TradeWindow : public Window, gcn::ActionListener, gcn::SelectionListener bool checkItem(Item *item); + bool isInpupFocused(); + private: enum Status { diff --git a/src/inputmanager.cpp b/src/inputmanager.cpp index 46a2265c6..f57a48b30 100644 --- a/src/inputmanager.cpp +++ b/src/inputmanager.cpp @@ -29,6 +29,7 @@ #include "gui/inventorywindow.h" #include "gui/npcdialog.h" #include "gui/setup.h" +#include "gui/tradewindow.h" #include <guichan/focushandler.hpp> @@ -52,7 +53,8 @@ int InputManager::getInputConditionMask() mask += COND_ENABLED; if ((!chatWindow || !chatWindow->isInputFocused()) && !NpcDialog::isAnyInputFocused() && - !InventoryWindow::isAnyInputFocused()) + !InventoryWindow::isAnyInputFocused() && + (!tradeWindow || !tradeWindow->isInpupFocused())) { mask += COND_NOINPUT; } |