diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2012-01-03 23:11:20 +0100 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2012-01-09 23:40:16 +0100 |
commit | f5172d4fcc10be73b72c1033cf9357a4dfe3544d (patch) | |
tree | a0fe53924fd3c82769a2a55cbbf7c01a045c435a /src/gui/npcdialog.h | |
parent | 91306f28b85b553254853cc5e07e4beffbc15dea (diff) | |
download | mana-f5172d4fcc10be73b72c1033cf9357a4dfe3544d.tar.gz mana-f5172d4fcc10be73b72c1033cf9357a4dfe3544d.tar.bz2 mana-f5172d4fcc10be73b72c1033cf9357a4dfe3544d.tar.xz mana-f5172d4fcc10be73b72c1033cf9357a4dfe3544d.zip |
Added a close button to the npc dialog window.
The close button will only display when the window is waiting
for the server, so that crashed windows can be closed without
restarting the client.
Pushing the QUIT key (Escape by default) will also close
the crashed windows in that case.
I also fixed a memleak with the "next" button.
Resolves: Mana-Mantis #72, 93, 389.
Reviewed-by: Ablu.
Diffstat (limited to 'src/gui/npcdialog.h')
-rw-r--r-- | src/gui/npcdialog.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/npcdialog.h b/src/gui/npcdialog.h index abea5753..07e1abb1 100644 --- a/src/gui/npcdialog.h +++ b/src/gui/npcdialog.h @@ -92,8 +92,9 @@ class NpcDialog : public Window, /** * Notifies the server that the client has performed a close action. + * @overrides Window::close() */ - void closeDialog(); + void close(); /** * Returns the number of items in the choices list. @@ -157,6 +158,9 @@ class NpcDialog : public Window, */ static NpcDialog *getActive(); + bool isWaitingForTheServer() const + { return mActionState == NPC_ACTION_WAIT; } + /** * Closes all instances. */ @@ -196,7 +200,7 @@ class NpcDialog : public Window, Button *mClearButton; // Used for the button - Button *mButton; + Button *mNextButton; // Will reset the text and integer input to the provided default Button *mResetButton; |