Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::ecs::BitmapText Struct Reference

#include <BitmapText.hpp>

Public Member Functions

bool operator== (const BitmapText &) const =default
 Compared member by member: what the change audit checks a write of this component against (Registry::auditChanges).

Public Attributes

std::string text
glm::vec4 color {1.0f}
f32 fontSize {1.0f}
TextAlign align {TextAlign::Left}
f32 spacing {0.0f}
glm::vec2 parallax {1.0f, 1.0f}
 Parallax scroll factor per axis. 1 = moves with the world (default, no parallax); <1 = scrolls slower than the camera (appears farther, e.g. a background); 0 = locked to the camera (e.g. a sky). The renderer offsets the text by camera_center * (1 - factor).
i32 layer {0}
resource::BitmapFontHandle font
bool enabled {true}

Detailed Description

Definition at line 22 of file BitmapText.hpp.

Member Function Documentation

◆ operator==()

bool esengine::ecs::BitmapText::operator== ( const BitmapText & ) const
default

Compared member by member: what the change audit checks a write of this component against (Registry::auditChanges).

Member Data Documentation

◆ align

TextAlign esengine::ecs::BitmapText::align {TextAlign::Left}

Definition at line 33 of file BitmapText.hpp.

Referenced by bitmaptextApplyJS(), and bitmaptextToJS().

◆ color

glm::vec4 esengine::ecs::BitmapText::color {1.0f}

Definition at line 27 of file BitmapText.hpp.

Referenced by bitmaptextApplyJS(), and bitmaptextToJS().

◆ enabled

bool esengine::ecs::BitmapText::enabled {true}

Definition at line 52 of file BitmapText.hpp.

Referenced by bitmaptextApplyJS(), and bitmaptextToJS().

◆ font

resource::BitmapFontHandle esengine::ecs::BitmapText::font

Definition at line 49 of file BitmapText.hpp.

Referenced by bitmaptextApplyJS(), and bitmaptextToJS().

◆ fontSize

f32 esengine::ecs::BitmapText::fontSize {1.0f}

Definition at line 30 of file BitmapText.hpp.

Referenced by bitmaptextApplyJS(), and bitmaptextToJS().

◆ layer

i32 esengine::ecs::BitmapText::layer {0}

Definition at line 46 of file BitmapText.hpp.

Referenced by bitmaptextApplyJS(), and bitmaptextToJS().

◆ parallax

glm::vec2 esengine::ecs::BitmapText::parallax {1.0f, 1.0f}

Parallax scroll factor per axis. 1 = moves with the world (default, no parallax); <1 = scrolls slower than the camera (appears farther, e.g. a background); 0 = locked to the camera (e.g. a sky). The renderer offsets the text by camera_center * (1 - factor).

Definition at line 43 of file BitmapText.hpp.

Referenced by bitmaptextApplyJS(), and bitmaptextToJS().

◆ spacing

f32 esengine::ecs::BitmapText::spacing {0.0f}

Definition at line 36 of file BitmapText.hpp.

Referenced by bitmaptextApplyJS(), and bitmaptextToJS().

◆ text

std::string esengine::ecs::BitmapText::text

Definition at line 24 of file BitmapText.hpp.

Referenced by bitmaptextApplyJS(), and bitmaptextToJS().


The documentation for this struct was generated from the following file:
  • /home/runner/work/estella/estella/src/esengine/ecs/components/BitmapText.hpp