feat: added health percentage to HUD
This commit is contained in:
parent
a2c80df0b8
commit
efe5607f60
3 changed files with 53 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue