diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-01-07 15:22:44 +0000 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-01-18 14:10:43 -0700 |
commit | 8c79a56c0f3710e20888d1031f179dc98f37e0a4 (patch) | |
tree | 7051569ba28b217941cf39cf4776d1343b2c173f /src/game.cpp | |
parent | 8446b826926ebbdb584cdfcd3dc5e4eb5bd142f1 (diff) | |
download | mana-8c79a56c0f3710e20888d1031f179dc98f37e0a4.tar.gz mana-8c79a56c0f3710e20888d1031f179dc98f37e0a4.tar.bz2 mana-8c79a56c0f3710e20888d1031f179dc98f37e0a4.tar.xz mana-8c79a56c0f3710e20888d1031f179dc98f37e0a4.zip |
Add dialogs to input text and numbers for scripts
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp index 7791d641..ec5bc267 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -60,7 +60,9 @@ #include "gui/menuwindow.h" #include "gui/minimap.h" #include "gui/ministatus.h" +#include "gui/npcintegerdialog.h" #include "gui/npclistdialog.h" +#include "gui/npcstringdialog.h" #include "gui/npc_text.h" #include "gui/ok_dialog.h" #include "gui/sdlinput.h" @@ -118,8 +120,10 @@ SellDialog *sellDialog; BuySellDialog *buySellDialog; InventoryWindow *inventoryWindow; EmoteWindow *emoteWindow; +NpcIntegerDialog *npcIntegerDialog; NpcListDialog *npcListDialog; NpcTextDialog *npcTextDialog; +NpcStringDialog *npcStringDialog; SkillDialog *skillDialog; Setup* setupWindow; Minimap *minimap; @@ -203,7 +207,9 @@ void createGuiWindows(Network *network) inventoryWindow = new InventoryWindow(); emoteWindow = new EmoteWindow(); npcTextDialog = new NpcTextDialog(); + npcIntegerDialog = new NpcIntegerDialog(); npcListDialog = new NpcListDialog(); + npcStringDialog = new NpcStringDialog(); skillDialog = new SkillDialog(); setupWindow = new Setup(); minimap = new Minimap(); @@ -251,8 +257,10 @@ void destroyGuiWindows() delete buySellDialog; delete inventoryWindow; delete emoteWindow; + delete npcIntegerDialog; delete npcListDialog; delete npcTextDialog; + delete npcStringDialog; delete skillDialog; delete setupWindow; delete minimap; @@ -648,7 +656,8 @@ void Game::handleInput() default: break; } - if (keyboard.isEnabled() && !chatWindow->isInputFocused()) + if (keyboard.isEnabled() && !chatWindow->isInputFocused() + && !npcStringDialog->isInputFocused()) { const int tKey = keyboard.getKeyIndex(event.key.keysym.sym); // Do not activate shortcuts if tradewindow is visible |