feat: added HUD class

This commit is contained in:
Sara 2025-08-10 18:53:30 +02:00
parent a4e158930d
commit fbecc9f684
2 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,23 @@
#include "heads_up_display.h"
void HeadsUpDisplay::_bind_methods() {
}
void HeadsUpDisplay::enter_tree() {
}
void HeadsUpDisplay::_notification(int what) {
if (Engine::get_singleton()->is_editor_hint()) {
return;
}
switch (what) {
default:
return;
case NOTIFICATION_ENTER_TREE:
enter_tree();
return;
}
}
void HeadsUpDisplay::set_reticle_visibility(bool visible) {
}

View file

@ -0,0 +1,21 @@
#ifndef HEADS_UP_DISPLAY_H
#define HEADS_UP_DISPLAY_H
#include "scene/gui/control.h"
class HeadsUpDisplay : public Control {
GDCLASS(HeadsUpDisplay, Control);
static void _bind_methods();
void on_child_entered(Node *node);
void enter_tree();
protected:
void _notification(int what);
public:
void set_reticle_visibility(bool visible);
private:
Control *reticle{ nullptr };
};
#endif // !HEADS_UP_DISPLAY_H