summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-18 19:04:02 -0700
committerIra Rice <irarice@gmail.com>2009-01-18 19:04:02 -0700
commitd2b804c1a817ccdd85b4b1220bf929e9d370d774 (patch)
tree35f82a41b5107802fab3bbca7b2a59f7a3271e18 /src/game.cpp
parentd975741a095ae0dee82ff1dfdaa8e03439d7cf2b (diff)
downloadmana-d2b804c1a817ccdd85b4b1220bf929e9d370d774.tar.gz
mana-d2b804c1a817ccdd85b4b1220bf929e9d370d774.tar.bz2
mana-d2b804c1a817ccdd85b4b1220bf929e9d370d774.tar.xz
mana-d2b804c1a817ccdd85b4b1220bf929e9d370d774.zip
Fixed the NPC Integer input field, as well as cut some bull from the
NPC String class. The Integer input field was rather horribly broken to the point where it could send invalid data, the increment and decrement buttons didn't work, and overall it was tripping over itself. As for the NPC String, "The Mana World" as a string is not needed to set the field to that length, but instead fills the text field with that text for starting. This is completely inappropriate for a text entry field, and a more sensible default would be to leave it empty, so that people can type in what they want without having to delete it. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index ec5bc267..752406b9 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -622,6 +622,11 @@ void Game::handleInput()
{
setupWindow->action(gcn::ActionEvent(NULL, "cancel"));
}
+ // Submits the text and proceeds to the next dialog
+ else if (npcStringDialog->isVisible())
+ {
+ npcStringDialog->action(gcn::ActionEvent(NULL, "ok"));
+ }
// Proceed to the next dialog option, or close the window
else if (npcTextDialog->isVisible())
{
@@ -632,6 +637,11 @@ void Game::handleInput()
{
npcListDialog->action(gcn::ActionEvent(NULL, "ok"));
}
+ // Submits the text and proceeds to the next dialog
+ else if (npcIntegerDialog->isVisible())
+ {
+ npcIntegerDialog->action(gcn::ActionEvent(NULL, "ok"));
+ }
// Else, open the chat edit box
else
{