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.
29 lines
840 B
C++
29 lines
840 B
C++
#pragma once
|
|
|
|
#include <SFML/Graphics/RenderTarget.hpp>
|
|
#include <SFML/Graphics/RectangleShape.hpp>
|
|
#include <memory>
|
|
|
|
#include "core/rectangle.h"
|
|
|
|
class RectangleSFML : public kku::Rectangle
|
|
{
|
|
public:
|
|
explicit RectangleSFML(sf::RenderTarget * const render_target);
|
|
virtual void setRect(const kku::Area<float>& rect) override;
|
|
virtual kku::Area<float> getRect() const override;
|
|
|
|
virtual void setPosition(const kku::Point& position) override;
|
|
virtual kku::Point getPosition() const override;
|
|
virtual void move(const kku::Vector2<float>& delta) override;
|
|
|
|
virtual void setColor(const kku::Color& color) override;
|
|
virtual bool contains(const kku::Point& position) const override;
|
|
|
|
virtual void display() override;
|
|
|
|
private:
|
|
sf::RenderTarget * const _render_target;
|
|
sf::RectangleShape _rectangle;
|
|
};
|