osb/source/frontend/StarQuestIndicatorPainter.hpp
2024-02-25 15:46:47 +01:00

34 lines
636 B
C++

#pragma once
#include "StarWorldCamera.hpp"
#include "StarWorldClient.hpp"
namespace Star {
STAR_CLASS(UniverseClient);
STAR_CLASS(QuestIndicatorPainter);
class QuestIndicatorPainter {
public:
QuestIndicatorPainter(UniverseClientPtr const& client);
void update(float dt, WorldClientPtr const& world, WorldCamera const& camera);
void render();
private:
struct Indicator {
Drawable render(float pixelRatio) const;
EntityId entityId;
Vec2F screenPos;
String indicatorName;
AnimationPtr animation;
};
UniverseClientPtr m_client;
WorldCamera m_camera;
Map<EntityId, Indicator> m_indicators;
};
}