-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTextInputBox.cpp
More file actions
72 lines (54 loc) · 2.05 KB
/
Copy pathTextInputBox.cpp
File metadata and controls
72 lines (54 loc) · 2.05 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
#include "raygui-cpp/TextInputBox.h"
RAYGUI_CPP_BEGIN_NAMESPACE
TextInputBox::TextInputBox()
: title(""), message(""), buttons(""), text(nullptr), textMaxSize(0), secretViewActive(false) {}
TextInputBox::TextInputBox(const char *title, const char *message, const char *buttons, char *text, int textMaxSize,
bool secretViewActive)
: title(title), message(message), buttons(buttons), text(text), textMaxSize(textMaxSize),
secretViewActive(secretViewActive) {}
TextInputBox::TextInputBox(Bounds bounds, const char *title, const char *message, const char *buttons, char *text,
int textMaxSize, bool secretViewActive)
: Component<int>(bounds), title(title), message(message), buttons(buttons), text(text), textMaxSize(textMaxSize),
secretViewActive(secretViewActive) {}
const char *TextInputBox::GetTitle() const {
return title;
}
void TextInputBox::SetTitle(const char *newTitle) {
this->title = newTitle;
}
const char *TextInputBox::GetMessage() const {
return message;
}
void TextInputBox::SetMessage(const char *newMessage) {
this->message = newMessage;
}
const char *TextInputBox::GetButtons() const {
return buttons;
}
void TextInputBox::SetButtons(const char *newButtons) {
this->buttons = newButtons;
}
char *TextInputBox::GetText() const {
return text;
}
void TextInputBox::SetText(char *newText) {
this->text = newText;
}
int TextInputBox::GetTextMaxSize() const {
return textMaxSize;
}
void TextInputBox::SetTextMaxSize(int newTextMaxSize) {
this->textMaxSize = newTextMaxSize;
}
bool TextInputBox::GetSecretViewActive() const {
return secretViewActive;
}
void TextInputBox::SetSecretViewActive(bool newSecretViewActive) {
this->secretViewActive = newSecretViewActive;
}
int TextInputBox::Show(const bool canClick) {
WITH_STATE_RENDER(int ret = ::GuiTextInputBox(GetBounds().GetRectangle(), title, message, buttons, text,
textMaxSize, &secretViewActive))
return ret;
}
RAYGUI_CPP_END_NAMESPACE