8#ifndef W_LABEL_ENTITY_HPP
9#define W_LABEL_ENTITY_HPP
13#pragma GCC diagnostic push
14#pragma GCC diagnostic ignored "-Wfloat-equal"
15#pragma GCC diagnostic ignored "-Wswitch-default"
16#include <SFML/Graphics.hpp>
17#pragma GCC diagnostic pop
63 [[nodiscard]]
float getValue( )
const;
81 void setFont(
const sf::Font& font );
136 void render( sf::RenderWindow& window );
139 unsigned int mCharacterSize;
142 sf::Vector2f mOffset;
144 std::string mCustomLabels;
145 bool mUseCustomLabels;
Represents an entity in the ECS (Entity-Component System) architecture.
Definition wEntity.hpp:60
int getDecimalPlaces() const
Returns the number of decimal places currently used for numeric formatting.
Definition wLabelEntity.cpp:57
float getValue() const
Returns the numeric value associated with the label.
Definition wLabelEntity.cpp:47
bool usesCustomLabels() const
Indicates whether the entity is currently using custom labels.
Definition wLabelEntity.cpp:95
LabelEntity(const sf::Font &font, AxisType type, sf::Vector2f initialPosition)
Constructs a LabelEntity with a given font, axis orientation and initial position.
Definition wLabelEntity.cpp:23
unsigned int getCharacterSize() const
Returns the current character size of the label text.
Definition wLabelEntity.cpp:52
void setFont(const sf::Font &font)
Sets a new font for the label.
Definition wLabelEntity.cpp:72
void render(sf::RenderWindow &window)
Renders the label on the given SFML window.
Definition wLabelEntity.cpp:116
void setCharacterSize(unsigned int newSize)
Sets a new character size for the labels.
Definition wLabelEntity.cpp:62
std::string formatLabel(float value)
Formats a numeric value into a label string.
Definition wLabelEntity.cpp:100
void setLabelText(std::string text)
Defines the text content of the label.
Definition wLabelEntity.cpp:67
virtual ~LabelEntity()=default
Virtual destructor.
void setDecimalPlaces(int places)
Sets the number of decimal places for numeric labels.
Definition wLabelEntity.cpp:78
void setCustomLabels(const std::string &labels)
Sets a custom label string.
Definition wLabelEntity.cpp:83
Definition wAxisEntity.cpp:17
AxisType
Enum representing the type of axis to render.
Definition wAxisEntity.hpp:35