summaryrefslogtreecommitdiff
path: root/src/gui/npcdialog.h
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-04-16 21:02:23 -0600
committerJared Adams <jaxad0127@gmail.com>2010-04-21 01:36:54 +0000
commit3c6fac14b67b86e2af9bbcac9e017f4b485e8149 (patch)
treeed0016d841a35ac0288ceeba7cc1dd4e1717dfd7 /src/gui/npcdialog.h
parent959708c60c119e03183ba97177f13e92d61e342c (diff)
downloadMana-3c6fac14b67b86e2af9bbcac9e017f4b485e8149.tar.gz
Mana-3c6fac14b67b86e2af9bbcac9e017f4b485e8149.tar.bz2
Mana-3c6fac14b67b86e2af9bbcac9e017f4b485e8149.tar.xz
Mana-3c6fac14b67b86e2af9bbcac9e017f4b485e8149.zip
Add a clear button to the NPC dialog
Reviewed-by: Bertram
Diffstat (limited to 'src/gui/npcdialog.h')
-rw-r--r--src/gui/npcdialog.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/npcdialog.h b/src/gui/npcdialog.h
index 50e9e2cc..a8521ce9 100644
--- a/src/gui/npcdialog.h
+++ b/src/gui/npcdialog.h
@@ -22,6 +22,7 @@
#ifndef NPCDIALOG_H
#define NPCDIALOG_H
+#include "configlistener.h"
#include "npc.h"
#include "gui/widgets/window.h"
@@ -45,7 +46,7 @@ class Button;
* \ingroup Interface
*/
class NpcDialog : public Window, public gcn::ActionListener,
- public gcn::ListModel
+ public gcn::ListModel, public ConfigListener
{
public:
/**
@@ -75,7 +76,7 @@ class NpcDialog : public Window, public gcn::ActionListener,
*
* @param string The text to add.
*/
- void addText(const std::string &string);
+ void addText(const std::string &string, bool save = true);
/**
* When called, the widget will show a "Next" button.
@@ -151,6 +152,8 @@ class NpcDialog : public Window, public gcn::ActionListener,
void setVisible(bool visible);
+ void optionChanged(const std::string &name);
+
/**
* Returns true if any instances exist.
*/
@@ -174,6 +177,7 @@ class NpcDialog : public Window, public gcn::ActionListener,
void buildLayout();
int mNpcId;
+ bool mLogInteraction;
int mDefaultInt;
std::string mDefaultString;
@@ -182,6 +186,7 @@ class NpcDialog : public Window, public gcn::ActionListener,
gcn::ScrollArea *mScrollArea;
TextBox *mTextBox;
std::string mText;
+ std::string mNewText;
// Used for choice input
ListBox *mItemList;
@@ -194,6 +199,8 @@ class NpcDialog : public Window, public gcn::ActionListener,
Button *mPlusButton;
Button *mMinusButton;
+ Button *mClearButton;
+
// Used for the button
Button *mButton;