8#ifndef W_FRAME_ENTITY_HPP
9#define W_FRAME_ENTITY_HPP
13#pragma GCC diagnostic push
14#pragma GCC diagnostic ignored "-Wfloat-equal"
15#pragma GCC diagnostic ignored "-Wswitch-default"
16#include <SFML/System/Vector2.hpp>
17#include <SFML/Graphics.hpp>
18#pragma GCC diagnostic pop
90 [[nodiscard]] sf::Vector2f
getPadding( )
const;
114 void setPadding(
const sf::Vector2f& padding );
121 void update(
const sf::FloatRect& contentBounds,
const sf::Vector2f& position );
127 void render( sf::RenderWindow& window );
130 sf::RectangleShape mFrame;
Represents an entity in the ECS (Entity-Component System) architecture.
Definition wEntity.hpp:60
void setOutlineColor(const sf::Color &color)
Sets the outline color of the frame.
Definition wFrameEntity.cpp:76
FrameEntity(bool enabled=true)
Constructs a frame entity.
Definition wFrameEntity.cpp:22
bool isEnabled() const
Checks whether the frame is currently enabled.
Definition wFrameEntity.cpp:44
virtual ~FrameEntity()=default
Virtual destructor.
void setThickness(float thickness)
Sets the outline thickness of the frame.
Definition wFrameEntity.cpp:81
void setFillColor(const sf::Color &color)
Sets the fill color of the frame.
Definition wFrameEntity.cpp:71
sf::Color getOutlineColor() const
Gets the current outline color of the frame.
Definition wFrameEntity.cpp:54
sf::Vector2f getPadding() const
Gets the current padding applied around the content.
Definition wFrameEntity.cpp:65
void setPadding(const sf::Vector2f &padding)
Sets the padding around the content.
Definition wFrameEntity.cpp:87
void setEnabled(bool enabled)
Enables or disables the frame.
Definition wFrameEntity.cpp:39
float getThickness() const
Gets the current outline thickness of the frame.
Definition wFrameEntity.cpp:59
void render(sf::RenderWindow &window)
Renders the frame to the given render window.
Definition wFrameEntity.cpp:118
sf::Color getFillColor() const
Gets the current fill color of the frame.
Definition wFrameEntity.cpp:49
void update(const sf::FloatRect &contentBounds, const sf::Vector2f &position)
Updates the size and position of the frame based on content bounds.
Definition wFrameEntity.cpp:99
Definition wAxisEntity.cpp:17