going/modules/going/game_ui.h
2025-06-02 17:17:49 +02:00

23 lines
524 B
C++

#ifndef GAME_UI_H
#define GAME_UI_H
#include "core/string/ustring.h"
#include "scene/main/canvas_layer.h"
#include "scene/gui/rich_text_label.h"
#include "scene/main/timer.h"
class GameUI : public CanvasLayer {
GDCLASS(GameUI, CanvasLayer);
static void _bind_methods();
void _notification(int what);
static GameUI *singleton_instance;
public:
static GameUI *get_singleton();
void display_message(String text);
private:
RichTextLabel *message{nullptr};
Timer *clear_message_timer{nullptr};
};
#endif // !GAME_UI_H