Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
UIRenderSystem.hpp
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2025
3** Air-Trap
4** File description:
5** UIRenderSystem
6*/
7
8#ifndef UIRENDERSYSTEM_HPP_
9#define UIRENDERSYSTEM_HPP_
10
11#include <SFML/Graphics.hpp>
12#include <unordered_map>
14#include "RType/ECS/ISystem.hpp"
21
23{
24
26 public:
27 UIRenderSystem(ecs::Registry& registry, sf::RenderWindow& window);
28
29 void update(float dt) override;
30 void clearTextureCache();
31
32 private:
33 void renderButtons();
34 void renderTexts();
35 void renderSliders();
36 void renderDropdowns();
37 void renderTextInputs(float dt);
39 sf::Font& loadFont(const std::string& fontPath);
40 sf::Texture& loadTexture(const std::string& texturePath);
41
43 sf::RenderWindow& _window;
44 std::unordered_map<std::string, sf::Font> _fonts;
45 std::unordered_map<std::string, sf::Texture> _textures;
46 };
47
48} // namespace rtp::client::systems
49
50#endif /* !UIRENDERSYSTEM_HPP_ */
Interface for ECS systems.
void update(float dt) override
Update system logic for one frame.
std::unordered_map< std::string, sf::Font > _fonts
sf::Texture & loadTexture(const std::string &texturePath)
std::unordered_map< std::string, sf::Texture > _textures
sf::Font & loadFont(const std::string &fontPath)
Abstract base class for all ECS systems.
Definition ISystem.hpp:57