Carpenter Engine
A C++ game engine with a build once run anywhere solution
Loading...
Searching...
No Matches
src
engine
UI
UIInput.hpp
1
/*
2
* This Source Code Form is subject to the terms of the Mozilla Public
3
* License, v. 2.0. If a copy of the MPL was not distributed with this
4
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
5
*/
6
7
#ifndef ENGINE_UIINPUT
8
#define ENGINE_UIINPUT
9
10
#include "UIElement.hpp"
11
#include <string>
12
13
namespace
Engine::UI {
14
25
class
UIInput
:
public
UIElement
{
26
const
char
* m_placeholder;
27
std::string m_value;
28
29
public
:
30
41
UIInput
(std::string name,
const
char
* placeholder =
""
);
42
43
void
Init
()
override
;
44
50
int
getInputInt
();
51
57
double
getInputDouble
();
58
64
std::string
getInputString
();
65
};
66
67
}
68
69
#endif
Engine::UI::UIElement
Base class for UI elements.
Definition
UIElement.hpp:24
Engine::UI::UIInput
An input field for UI.
Definition
UIInput.hpp:25
Engine::UI::UIInput::Init
void Init() override
Creates the UI element and adds it to the DOM.
Definition
UIInput.cpp:20
Engine::UI::UIInput::getInputString
std::string getInputString()
Returns the input as a string.
Definition
UIInput.cpp:40
Engine::UI::UIInput::getInputInt
int getInputInt()
Returns the input as an integer.
Definition
UIInput.cpp:28
Engine::UI::UIInput::getInputDouble
double getInputDouble()
Returns the input as a double.
Definition
UIInput.cpp:34
Generated by
1.9.8