Files
letnik3koncni-prap/include/game/agame/sampletextbox.hpp
2026-03-24 09:00:23 +01:00

25 lines
834 B
C++

#pragma once
#include <object/ui/uitextbox.hpp>
namespace Game::AGame {
class SampleTextBox : public Object::UITextBox {
using Object::UITextBox::UITextBox; // Inherit constructors
public:
~SampleTextBox() override = default;
void start() override {
// Call the base class start to initialize the text box
mZIndex = 1000; // Ensure it renders on top of most other entities
Object::UITextBox::start();
setText("Hello, World!");
mIsActive = false;
mIsVisible = false;
}
void update(float deltaTime) override {
// Call the base class update to handle input and text refreshing
Object::UITextBox::update(deltaTime);
}
};
}