22#include <SFML/Graphics/Texture.hpp>
144 void setPosition(
const std::pair<int, int> &position);
152 void setSize(
const std::pair<float, float> &size);
190 const std::string
getInfo(
const unsigned int indent = 0)
const;
202 bool _visible =
true;
203 bool _textureSet =
false;
204 std::shared_ptr<sf::Texture> _texture;
File in charge of containing the custom errors that are going to be used for custom description error...
This is the file that links the EntityNode children.
Macro definitions for logging messages with varying levels of detail and formatting.
This is the file in charge of containing the Log class (the one in charge of outputing info only when...
This is the header file containing the class for the mouse information.
Represents a texture component used in an entity component system.
const std::string getInfo(const unsigned int indent=0) const
This is a function meant for debugging purposes It will dump the current state of the variables upon ...
TextureComponent & operator=(const GUI::ECS::Components::TextureComponent ©)
Assignment operator for copying data from another TextureComponent.
~TextureComponent()
Destructor. Cleans up resources when the component is destroyed.
void setTexture(const std::any &texture)
Sets the texture using a std::any object.
void setCollisionInfo(const GUI::ECS::Systems::Collision &collisionInfo)
Sets the collision information for the texture.
void setPosition(const std::pair< int, int > &position)
Sets the position of the texture.
const std::any getTexture() const
Retrieves the texture as a std::any object.
const bool getVisible() const
Retrieves the visibility status of the texture.
TextureComponent()
Default constructor. Initializes the component with default values.
void update(const TextureComponent ©)
Updates the texture component by copying data from another component.
void setVisible(const bool visible)
Sets the visibility of the texture.
void setFilePath(const std::string &filePath)
Sets the file path for the texture.
void setSize(const std::pair< float, float > &size)
Sets the size of the texture.
const GUI::ECS::Systems::Collision getCollisionInfo() const
Retrieves the collision information for the texture.
Represents a rectangular component that can detect collisions and mouse interactions,...
std::ostream & operator<<(std::ostream &os, const AnimationComponent &item)
Outputs the animation's info to a stream.