Want to contribute? Fork me on Codeberg.org!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
septadrop/include/NumberRenderer.hpp

18 lines
388 B

#pragma once
#include <SFML/Graphics.hpp>
class NumberRenderer {
public:
sf::Texture texture;
sf::IntRect comma_rect;
sf::IntRect numeral_rects[10];
NumberRenderer(
sf::Texture _texture,
sf::IntRect _comma_rect,
std::initializer_list<sf::IntRect> _numeral_rects
);
void render(sf::RenderWindow* window, uint number, int x, int y);
private:
sf::Sprite sprite;
};