2023-06-20 04:33:09 +00:00
|
|
|
#ifndef STAR_FUEL_WIDGET_HPP
|
|
|
|
#define STAR_FUEL_WIDGET_HPP
|
|
|
|
|
|
|
|
#include "StarWidget.hpp"
|
|
|
|
|
|
|
|
namespace Star {
|
|
|
|
|
|
|
|
STAR_CLASS(FuelWidget);
|
|
|
|
|
|
|
|
class FuelWidget : public Widget {
|
|
|
|
public:
|
|
|
|
FuelWidget();
|
|
|
|
virtual ~FuelWidget() {}
|
|
|
|
|
2023-07-20 14:58:49 +00:00
|
|
|
virtual void update(float dt);
|
2023-06-20 04:33:09 +00:00
|
|
|
|
|
|
|
void setCurrentFuelLevel(float amount);
|
|
|
|
void setMaxFuelLevel(float amount);
|
|
|
|
void setPotentialFuelAmount(float amount);
|
|
|
|
void setRequestedFuelAmount(float amount);
|
|
|
|
|
|
|
|
void ping();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void renderImpl();
|
|
|
|
|
|
|
|
float m_fuelLevel;
|
|
|
|
float m_maxLevel;
|
|
|
|
float m_potential;
|
|
|
|
float m_requested;
|
|
|
|
|
|
|
|
float m_pingTimeout;
|
|
|
|
|
|
|
|
unsigned m_fontSize;
|
2023-06-21 12:29:40 +00:00
|
|
|
String m_font;
|
2023-06-20 04:33:09 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|