Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
BitmapText.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
3#pragma once
4
7#include "../../math/Math.hpp"
9
10#include <string>
11
12namespace esengine::ecs {
13
14ES_ENUM()
15enum class TextAlign : u8 {
19};
20
21ES_COMPONENT(renderable=enabled)
22struct BitmapText {
24 std::string text;
25
26 ES_PROPERTY(animatable)
27 glm::vec4 color{1.0f};
28
29 ES_PROPERTY(min=1)
31
34
36 f32 spacing{0.0f};
37
42 ES_PROPERTY(advanced, tooltip="Parallax scroll factor (1 = with world, <1 = slower, 0 = locked to camera).")
43 glm::vec2 parallax{1.0f, 1.0f};
44
45 ES_PROPERTY(step=1)
47
48 ES_PROPERTY(asset = font)
49 resource::BitmapFontHandle font;
50
52 bool enabled{true};
53
55 bool operator==(const BitmapText&) const = default;
56};
57
58} // namespace esengine::ecs
Type-safe resource handle system.
Math utilities and GLM configuration for ESEngine.
Reflection and metadata system for automatic binding generation.
#define ES_COMPONENT(...)
Mark a struct/class as a component that should be exposed to scripts.
#define ES_ENUM(...)
Mark an enum that should be exposed to scripts.
#define ES_PROPERTY(...)
Mark a field as a property that should be exposed to scripts.
Core type definitions and utilities for ESEngine.
std::int32_t i32
Signed 32-bit integer.
Definition Types.hpp:54
std::uint8_t u8
Unsigned 8-bit integer.
Definition Types.hpp:41
float f32
32-bit floating point
Definition Types.hpp:59
glm::vec2 parallax
Parallax scroll factor per axis. 1 = moves with the world (default, no parallax); <1 = scrolls slower...
bool operator==(const BitmapText &) const =default
Compared member by member: what the change audit checks a write of this component against (Registry::...
resource::BitmapFontHandle font