2024-02-25 15:46:47 +01:00
|
|
|
#pragma once
|
2023-06-20 14:33:09 +10:00
|
|
|
|
|
|
|
#include "StarWidget.hpp"
|
|
|
|
|
|
|
|
namespace Star {
|
|
|
|
|
|
|
|
STAR_CLASS(FuelWidget);
|
|
|
|
|
|
|
|
class FuelWidget : public Widget {
|
|
|
|
public:
|
|
|
|
FuelWidget();
|
|
|
|
virtual ~FuelWidget() {}
|
|
|
|
|
2023-07-21 00:58:49 +10:00
|
|
|
virtual void update(float dt);
|
2023-06-20 14:33:09 +10: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;
|
|
|
|
|
2024-04-22 06:07:59 +10:00
|
|
|
TextStyle m_textStyle;
|
2023-06-20 14:33:09 +10:00
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|