summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-01-07 15:22:44 +0000
committerJared Adams <jaxad0127@gmail.com>2009-01-18 10:24:58 +0000
commitccef6c4284a9cc250da72c5835501ae03c2c513f (patch)
tree0edc78d5572fe8a407884f772031bf6f1cac4ec2 /src/game.cpp
parent5340364ee4b91d5d26358d1ec131016946f2998b (diff)
downloadmana-ccef6c4284a9cc250da72c5835501ae03c2c513f.tar.gz
mana-ccef6c4284a9cc250da72c5835501ae03c2c513f.tar.bz2
mana-ccef6c4284a9cc250da72c5835501ae03c2c513f.tar.xz
mana-ccef6c4284a9cc250da72c5835501ae03c2c513f.zip
Add dialogs to input text and numbers for scripts
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp
index a788c51a..1b6f2d5c 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -55,7 +55,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"
@@ -107,8 +109,10 @@ BuyDialog *buyDialog;
SellDialog *sellDialog;
BuySellDialog *buySellDialog;
InventoryWindow *inventoryWindow;
+NpcIntegerDialog *npcIntegerDialog;
NpcListDialog *npcListDialog;
NpcTextDialog *npcTextDialog;
+NpcStringDialog *npcStringDialog;
SkillDialog *skillDialog;
Setup* setupWindow;
Minimap *minimap;
@@ -187,7 +191,9 @@ void createGuiWindows(Network *network)
buySellDialog = new BuySellDialog();
inventoryWindow = new InventoryWindow();
npcTextDialog = new NpcTextDialog();
+ npcIntegerDialog = new NpcIntegerDialog();
npcListDialog = new NpcListDialog();
+ npcStringDialog = new NpcStringDialog();
skillDialog = new SkillDialog();
setupWindow = new Setup();
minimap = new Minimap();
@@ -237,8 +243,10 @@ void destroyGuiWindows()
delete sellDialog;
delete buySellDialog;
delete inventoryWindow;
+ delete npcIntegerDialog;
delete npcListDialog;
delete npcTextDialog;
+ delete npcStringDialog;
delete skillDialog;
delete setupWindow;
delete minimap;
@@ -643,7 +651,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