project-kyoku/src/modes/classicmode/graphics/classicgraphicsfactory.h

31 lines
771 B
C
Raw Normal View History

2022-02-06 02:33:09 +01:00
#pragma once
#include <memory>
#include "classicmode/classicactions.h"
#include "graphics/classicnotegraphics.h"
#include "graphics/classicselectiongraphics.h"
2022-02-06 02:33:09 +01:00
#include "core/rectangle.h"
#include "core/corefactory.h"
class ClassicGraphicsFactory
{
public:
explicit ClassicGraphicsFactory(const std::shared_ptr<kku::CoreFactory>& core_factory);
std::shared_ptr<ClassicNoteGraphics> createSprite(Type type) const;
std::shared_ptr<ClassicSelectionGraphics> createSelection() const;
2022-02-06 02:33:09 +01:00
private:
const std::shared_ptr<kku::CoreFactory> _core_factory;
struct SpriteData
{
std::shared_ptr<kku::Rectangle> shape;
std::shared_ptr<kku::Rectangle> trail;
kku::Color color;
};
SpriteData generate(Type type) const;
};