Carpenter Engine
A C++ game engine with a build once run anywhere solution
Loading...
Searching...
No Matches
UILabel.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_UILABEL
8#define ENGINE_UILABEL
9
10#include "UIElement.hpp"
11
12namespace Engine::UI {
13
23 class UILabel : public UIElement {
24 protected:
25 std::string m_text;
26
27 public:
28
37 UILabel(std::string name, std::string text);
38
42 void Init() override;
43
49 void SetText(std::string text);
50 };
51}
52
53#endif
Base class for UI elements.
Definition UIElement.hpp:24
A Label associated with a scene.
Definition UILabel.hpp:23
void SetText(std::string text)
Updates the text of the label.
Definition UILabel.cpp:21
void Init() override
Override of UIElement::Init(). Nothing important.
Definition UILabel.cpp:16