| 59dcb571 |
sago007 |
2016-02-14 15:34 |
1 |
/* |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
2 |
=========================================================================== |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
3 |
blockattack - Block Attack - Rise of the Blocks |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
4 |
Copyright (C) 2005-2016 Poul Sander |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
5 |
|
| 7a956470 |
sago007 |
2016-02-14 17:09 |
6 |
This program is free software: you can redistribute it and/or modify |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
7 |
it under the terms of the GNU General Public License as published by |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
8 |
the Free Software Foundation, either version 2 of the License, or |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
9 |
(at your option) any later version. |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
10 |
|
| 7a956470 |
sago007 |
2016-02-14 17:09 |
11 |
This program is distributed in the hope that it will be useful, |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
14 |
GNU General Public License for more details. |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
15 |
|
| 7a956470 |
sago007 |
2016-02-14 17:09 |
16 |
You should have received a copy of the GNU General Public License |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
17 |
along with this program. If not, see http://www.gnu.org/licenses/ |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
18 |
|
| 7a956470 |
sago007 |
2016-02-14 17:09 |
19 |
Source information and contacts persons can be found at |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
20 |
http://www.blockattack.net |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
21 |
=========================================================================== |
| 7a956470 |
sago007 |
2016-02-14 17:09 |
22 |
*/ |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
23 |
|
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
24 |
#ifndef DIALOGBOX_HPP |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
25 |
#define DIALOGBOX_HPP |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
26 |
|
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
27 |
#include "sago/GameStateInterface.hpp" |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
28 |
#include <string> |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
29 |
#include "ReadKeyboard.h" |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
30 |
#include <memory> |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
31 |
#include "scopeHelpers.hpp" |
| 0c201300 |
sago007 |
2016-02-20 12:12 |
32 |
#include "global.hpp" |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
33 |
|
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
34 |
class DialogBox : public sago::GameStateInterface { |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
35 |
public: |
| 96e759d9 |
sago007 |
2016-04-17 18:45 |
36 |
DialogBox(int x, int y, const std::string& name, const std::string& header); |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
37 |
DialogBox(const DialogBox& orig) = delete; |
| e373cd75 |
Poul Sander |
2018-11-07 19:21 |
38 |
DialogBox& operator=(const DialogBox& orig) = delete; |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
39 |
virtual ~DialogBox(); |
| e373cd75 |
Poul Sander |
2018-11-07 19:21 |
40 |
|
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
41 |
bool IsActive() override; |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
42 |
void Draw(SDL_Renderer* target) override; |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
43 |
void ProcessInput(const SDL_Event& event, bool &processed) override; |
| 47fef8e8 |
sago007 |
2016-11-24 21:37 |
44 |
void SetName(const std::string& name); |
| 47fef8e8 |
sago007 |
2016-11-24 21:37 |
45 |
std::string GetName() const; |
| 47fef8e8 |
sago007 |
2016-11-24 21:37 |
46 |
bool IsUpdated() const; |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
47 |
private: |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
48 |
bool isActive = true; |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
49 |
std::shared_ptr<ReadKeyboard> rk; |
| e373cd75 |
Poul Sander |
2018-11-07 19:21 |
50 |
int x; |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
51 |
int y; |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
52 |
std::string name; |
| 96e759d9 |
sago007 |
2016-04-17 18:45 |
53 |
std::string header; |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
54 |
bool updated = false; |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
55 |
SDL_TextInput textInputScope; |
| 34f6ec6d |
sago007 |
2018-03-29 16:17 |
56 |
sago::SagoTextField headerLabel; |
| 34f6ec6d |
sago007 |
2018-03-29 16:17 |
57 |
sago::SagoTextField enterLabel; |
| 34f6ec6d |
sago007 |
2018-03-29 16:17 |
58 |
sago::SagoTextField cancelLabel; |
| bd788178 |
sago007 |
2018-03-31 16:03 |
59 |
sago::SagoTextField textField; |
| bd788178 |
sago007 |
2018-03-31 16:03 |
60 |
sago::SagoTextField cursorLabel; |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
61 |
}; |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
62 |
|
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
63 |
#endif /* DIALOGBOX_HPP */ |
| 59dcb571 |
sago007 |
2016-02-14 15:34 |
64 |
|
|
|
1970-01-01 00:00 |
65 |
|