feat: added health percentage to HUD

This commit is contained in:
Sara 2025-08-30 23:08:16 +02:00
parent a2c80df0b8
commit efe5607f60
3 changed files with 53 additions and 1 deletions

View file

@ -3,6 +3,7 @@
#include "scene/gui/control.h"
#include "scene/gui/label.h"
#include "scene/gui/progress_bar.h"
class HeadsUpDisplay : public Control {
GDCLASS(HeadsUpDisplay, Control);
@ -18,9 +19,11 @@ protected:
public:
static HeadsUpDisplay *get_singleton();
void set_tooltip(String const &tooltip);
void set_health_percentage(double health_percentage);
private:
Label *tooltip{ nullptr };
ProgressBar *healthbar{ nullptr };
};
#endif // !HEADS_UP_DISPLAY_H