You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
project-kyoku/src/modes/classicmode/graphics/classicgraphicsfactory.h

31 lines
771 B
C++

#pragma once
#include <memory>
#include "classicmode/classicactions.h"
#include "graphics/classicnotegraphics.h"
#include "graphics/classicselectiongraphics.h"
#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;
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;
};