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.
27 lines
1.0 KiB
C++
27 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include <SFML/Graphics.hpp>
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
#include "CircularSector.h"
|
|
|
|
namespace CClock {
|
|
|
|
enum class ColorSchema { UNI, ALTERNATING, HALF };
|
|
|
|
class SegmentRing : public sf::Drawable, public sf::Transformable {
|
|
private:
|
|
std::vector<CircularSector> segments_;
|
|
std::vector<sf::Text> labels_;
|
|
|
|
public:
|
|
explicit SegmentRing();
|
|
explicit SegmentRing(double radius, double thickness, double spacing, unsigned int segmentCount,
|
|
unsigned int detailLevel = 30, ColorSchema colorSchema = ColorSchema::UNI,
|
|
sf::Color color1 = sf::Color::White, sf::Color color2 = sf::Color::White,
|
|
std::string labels[] = nullptr, sf::Font* font = nullptr, unsigned int textSize = 30, sf::Color textColor = sf::Color::Black);
|
|
|
|
virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const;
|
|
};
|
|
} |