Air-Trap
1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
Text.hpp
Go to the documentation of this file.
1
/*
2
** EPITECH PROJECT, 2025
3
** Air-Trap
4
** File description:
5
** Text
6
*/
7
8
#pragma once
9
10
#include <string>
11
#include "
RType/Math/Vec2.hpp
"
12
13
namespace
rtp::ecs::components::ui
{
14
19
struct
Text
{
20
std::string
content
;
21
Vec2f
position
;
22
std::string
fontPath
;
23
unsigned
int
fontSize
{24};
24
uint8_t
red
{255};
25
uint8_t
green
{255};
26
uint8_t
blue
{255};
27
uint8_t
alpha
{255};
28
int
zIndex
{0};
29
};
30
31
}
// namespace rtp::ecs::components::ui
Vec2.hpp
Declaration of the 2-dimensional vector class.
rtp::ecs::components::ui
File : SpritePreview.hpp License: MIT Author : GitHub Copilot Date : 14/01/2026.
Definition
Button.hpp:14
rtp::Vec2< float >
rtp::ecs::components::ui::Text
Component representing text to render.
Definition
Text.hpp:19
rtp::ecs::components::ui::Text::green
uint8_t green
Green component.
Definition
Text.hpp:25
rtp::ecs::components::ui::Text::zIndex
int zIndex
Rendering order.
Definition
Text.hpp:28
rtp::ecs::components::ui::Text::blue
uint8_t blue
Blue component.
Definition
Text.hpp:26
rtp::ecs::components::ui::Text::position
Vec2f position
Position of the text.
Definition
Text.hpp:21
rtp::ecs::components::ui::Text::red
uint8_t red
Red component.
Definition
Text.hpp:24
rtp::ecs::components::ui::Text::alpha
uint8_t alpha
Alpha (opacity)
Definition
Text.hpp:27
rtp::ecs::components::ui::Text::fontSize
unsigned int fontSize
Font size.
Definition
Text.hpp:23
rtp::ecs::components::ui::Text::fontPath
std::string fontPath
Path to the font file.
Definition
Text.hpp:22
rtp::ecs::components::ui::Text::content
std::string content
Text content.
Definition
Text.hpp:20
common
include
RType
ECS
Components
UI
Text.hpp
Generated by
1.9.8