19#include <SFML/Graphics/Image.hpp>
20#include <SFML/Graphics/RenderWindow.hpp>
48 class ButtonComponent;
53 class SpriteComponent;
78 Window(
const std::uint32_t entityId = 0,
const std::uint32_t windowWidth = 800,
const std::uint32_t windowHeight = 600,
const std::string &windowName =
"R-Type",
unsigned int frameRateLimit = 60);
90 void setPosition(
const std::pair<int, int> &position);
105 void setTitle(
const std::string &title =
"R-Type");
159 const std::string
getInfo(
const unsigned int indent = 0)
const;
223 std::string _windowName;
224 sf::RenderWindow _sfWindow;
225 std::uint32_t _windowWidth;
226 std::uint32_t _windowHeight;
227 sf::VideoMode _desktopMode = sf::VideoMode::getDesktopMode();
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...
Represents an image component in the GUI ECS system.
Manages shapes and their associated properties in the ECS framework.
Represents a drawable and interactive sprite in the ECS system.
A class that represents a text component in the GUI system. It manages font, size,...
A class for representing and manipulating colors using RGBA components. Inherits from EntityNode to a...
static const Colour Black
Manages an SFML-based graphical window and handles rendering of ECS components.
void setPosition(const std::pair< int, int > &position)
Set the Position of the window.
void close()
Closes the window.
Window(const std::uint32_t entityId=0, const std::uint32_t windowWidth=800, const std::uint32_t windowHeight=600, const std::string &windowName="R-Type", unsigned int frameRateLimit=60)
Constructs a new Window object.
~Window()
Destroys the Window object.
void setTitle(const std::string &title="R-Type")
Set the Title of the window.
void draw(const GUI::ECS::Components::TextComponent &text)
Renders a text component to the window.
void display()
Displays the contents of the window on the screen.
const bool getFullScreen() const
Retrieves the current fullscreen mode of the window.
void setFullScreen(const bool fullScreen)
Enables or disables fullscreen mode for the window.
void setIcon(const GUI::ECS::Components::ImageComponent &icon)
Set the Icon of the window.
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 ...
void clear(const GUI::ECS::Systems::Colour &color=GUI::ECS::Systems::Colour::Black)
Clears the window with the specified color.
void setFramerateLimit(const unsigned int framerateLimit)
Sets the frame rate limit of the window.
bool isOpen() const
Checks if the window is currently open.
const std::pair< int, int > getPosition() const
Get the Position of the window.
const std::string getTitle() const
Get the Title of the window.
std::any pollEvent()
Polls for the next event in the window's event queue.
const std::pair< int, int > getDimensions() const
Get the Dimensions of the window.
This is the file that links the Components children.
std::ostream & operator<<(std::ostream &os, const Clock &item)
Outputs the clock's info to a stream.