blob: b866338e96ffc96410587b913846b53ad75a4317 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/*
* ConfirmPrompt.h
*
* Created on: Apr 6, 2012
* Author: Simon
*/
#ifndef CONFIRMPROMPT_H_
#define CONFIRMPROMPT_H_
#include "interface/Window.h"
class ConfirmDialogueCallback;
class ConfirmPrompt: public ui::Window {
public:
enum DialogueResult { ResultCancel, ResultOkay };
ConfirmPrompt(std::string title, std::string message, ConfirmDialogueCallback * callback_ = NULL);
ConfirmPrompt(std::string title, std::string message, std::string buttonText, ConfirmDialogueCallback * callback_ = NULL);
static bool Blocking(std::string title, std::string message, std::string buttonText = "Confirm");
virtual void OnDraw();
virtual ~ConfirmPrompt();
ConfirmDialogueCallback * callback;
};
class ConfirmDialogueCallback
{
public:
virtual void ConfirmCallback(ConfirmPrompt::DialogueResult result) {}
virtual ~ConfirmDialogueCallback() {}
};
#endif /* CONFIRMPROMPT_H_ */
|