Files
dae16-VerhulstBram-GameProject/Game/Gui/GuiMeter.h
2024-05-14 12:28:37 +02:00

35 lines
919 B
C++

#pragma once
#include "GuiElement.h"
#include "Texture.h"
#include "Animations/Animation.h"
class TextureManager;
class GuiMeter final : public GuiElement
{
public:
GuiMeter(const std::string& filePath, Vector2f pos, Vector2f frameSize, int frameCount, TextureManager* manager);
GuiMeter(const std::string& filePath, Vector2f pos, Vector2f frameSize, Vector2f drawSize, int frameCount, TextureManager* manager);
GuiMeter(GuiMeter& other) = delete;
GuiMeter& operator=(const GuiMeter& other) = delete;
GuiMeter(GuiMeter&& other) = delete;
GuiMeter& operator=(GuiMeter&& other) = delete;
virtual ~GuiMeter() override;
virtual void Draw() const override;
virtual void Update(float elapsedSec) override;
void SetValue(float value);
private:
Animation* m_Animation{ nullptr };
Vector2f m_Position;
Vector2f m_DrawSize;
float m_Value{ 0.0f };
const float m_MaxValue{ 100.0f };
int m_FrameCount;
};