summaryrefslogtreecommitdiff
path: root/src/dialogues/TextPrompt.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-04-13 17:56:05 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-04-13 17:56:05 (GMT)
commitdb1dbb1afa9f74c3b3b69fb8d52b618ca245927e (patch)
tree639d87d1f2c3cca5ffc89a2ff2a372e79035dc22 /src/dialogues/TextPrompt.h
parent71516b39fa2abb552db56f2e3f1589704dbcc987 (diff)
downloadpowder-db1dbb1afa9f74c3b3b69fb8d52b618ca245927e.zip
powder-db1dbb1afa9f74c3b3b69fb8d52b618ca245927e.tar.gz
Text input dialogue
Diffstat (limited to 'src/dialogues/TextPrompt.h')
-rw-r--r--src/dialogues/TextPrompt.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/dialogues/TextPrompt.h b/src/dialogues/TextPrompt.h
new file mode 100644
index 0000000..efca128
--- /dev/null
+++ b/src/dialogues/TextPrompt.h
@@ -0,0 +1,35 @@
+/*
+ * ConfirmPrompt.h
+ *
+ * Created on: Apr 6, 2012
+ * Author: Simon
+ */
+
+#ifndef CONFIRMPROMPT_H_
+#define CONFIRMPROMPT_H_
+
+#include "interface/Window.h"
+#include "interface/Textbox.h"
+
+class TextDialogueCallback;
+class TextPrompt: public ui::Window {
+protected:
+ ui::Textbox * textField;
+public:
+ //class CloseAction;
+ friend class CloseAction;
+ enum DialogueResult { ResultCancel, ResultOkay };
+ TextPrompt(std::string title, std::string message, bool multiline, TextDialogueCallback * callback_);
+ virtual void OnDraw();
+ virtual ~TextPrompt();
+ TextDialogueCallback * callback;
+};
+
+class TextDialogueCallback
+{
+ public:
+ virtual void TextCallback(TextPrompt::DialogueResult result, std::string resultText) {}
+ virtual ~TextDialogueCallback() {}
+};
+
+#endif /* CONFIRMPROMPT_H_ */