diff options
Diffstat (limited to 'src/dialogues/TextPrompt.h')
| -rw-r--r-- | src/dialogues/TextPrompt.h | 35 |
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_ */ |
