-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathGUIMsgNew.h
60 lines (39 loc) · 1.32 KB
/
GUIMsgNew.h
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//
// GUIMsgNew.h
// Coin Checkers 2
//
// Created by Nathan Daly on 11/19/12.
// Copyright (c) 2012 Lions Entertainment. All rights reserved.
//
#ifndef Coin_Checkers_2_GUIMsgNew_h
#define Coin_Checkers_2_GUIMsgNew_h
#include "GUIView.h"
#include <string>
#include <vector>
namespace GUI {
class Button;
class TextView;
class MsgNew : public View {
public:
typedef std::vector<Button*> Button_ctrs_t;
// Size of button_texts must == num_buttons
MsgNew(int w_, int h_, const std::string& msg = "", Button_ctrs_t buttons = Button_ctrs_t());
void set_msg(const std::string msg_);
void add_button(GUI::Button* button);
virtual void pop_up(int timeout = -1) = 0; // ms until window disappears.
// Note, this is not yet implemented.
// virtual void pop_up_modal(); // stop everything else.
private:
std::vector<Button*> buttons;
TextView *msg_text;
};
class MsgNew_Scroll_In : public MsgNew {
public:
typedef std::vector<Button*> Button_ctrs_t;
// Size of button_texts must == num_buttons
MsgNew_Scroll_In(int w_, int h_, const std::string& msg = "", Button_ctrs_t buttons = Button_ctrs_t());
virtual void pop_up(int timeout = -1) = 0; // ms until window disappears.
// virtual void pop_up_modal(); // stop everything else.
};
} // namespace GUI
#endif