osb/source/frontend/StarQuestIndicatorPainter.hpp

34 lines
636 B
C++
Raw Permalink Normal View History

#pragma once
2023-06-20 04:33:09 +00:00
#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);
2023-06-20 04:33:09 +00:00
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;
};
}