Class Engine::TextSystem¶
ClassList > Engine > TextSystem
Renders 2D text elements for entities possessing both Text andPosition .More...
#include <TextSystem.hpp>
Inherits the following classes: Engine::LayeredRenderSystem
Public Attributes inherited from Engine::System¶
See Engine::System
| Type | Name |
|---|---|
| std::set< Entity > | m_Entities |
Public Functions¶
| Type | Name |
|---|---|
| virtual bool | CanDraw (Registry & registry, Entity entity, bool screenSpace) override True if entity has aText and belongs to this pass (entities tagged withScreenSpace go in the screen pass). |
| virtual void | DrawEntity (Registry & registry, Entity entity) override Draws the entity's text at its Position . |
Public Functions inherited from Engine::LayeredRenderSystem¶
See Engine::LayeredRenderSystem
| Type | Name |
|---|---|
| virtual bool | CanDraw (Registry & registry, Entity entity, bool screenSpace) = 0 Whether this system draws entity in the given pass. |
| virtual void | DrawEntity (Registry & registry, Entity entity) = 0 Draws a single entity. Only called when CanDraw returned true. |
Public Functions inherited from Engine::System¶
See Engine::System
| Type | Name |
|---|---|
| virtual void | OnSceneUnloaded (Registry & registry) Called right before the current scene's entities are destroyed. |
| virtual void | Render (Registry & registry) World pass: drawn inside the active camera. |
| virtual void | RenderScreen (Registry & registry) Screen pass: drawn after the world, in window pixels. |
| virtual void | Update (Registry & registry, float dt) |
| virtual | ~System () = default |
Detailed Description¶
Iterates through all entities with a Text component. If the entity has an associated Position component, the text is drawn using Raylib's text rendering functions: DrawText for default fonts or DrawTextEx for custom fonts.
Public Functions Documentation¶
function CanDraw¶
True if entity has aText and belongs to this pass (entities tagged withScreenSpace go in the screen pass).
virtual bool Engine::TextSystem::CanDraw (
Registry & registry,
Entity entity,
bool screenSpace
) override
Implements Engine::LayeredRenderSystem::CanDraw
function DrawEntity¶
Draws the entity's text at its Position .
Implements Engine::LayeredRenderSystem::DrawEntity
The documentation for this class was generated from the following file /home/runner/work/r-type/r-type/Engine/include/Systems/TextSystem.hpp