Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
Engine::UISystem Class Reference

#include <UISystem.hpp>

Inheritance diagram for Engine::UISystem:
System

Public Member Functions

 UISystem (Registry &reg, VulkanRenderer &rend)
void setEditorActive (bool active)
void setPlaying (bool playing)
void update (float dt) override
 Pure virtual update function to implement system behaviors.
void draw ()
 Renders the UI overlay.
Public Member Functions inherited from System
virtual ~System ()=default
 Virtual destructor.
void addEntity (Entity e)
 Adds an entity to the system tracking list.
void removeEntity (Entity e)
 Removes an entity from system tracking.

Private Member Functions

glm::vec4 getRect (Entity entity, const glm::vec2 &viewportSize)
void drawWidget (Entity entity, const glm::vec2 &viewportPos, const glm::vec2 &viewportSize, ImDrawList *drawList)

Private Attributes

Registry & registry
VulkanRenderer & renderer
bool editorActive = false
bool isPlaying = false

Additional Inherited Members

Protected Attributes inherited from System
std::vector< Entity > entities
 List of entities tracked by this system.

Constructor & Destructor Documentation

◆ UISystem()

Engine::UISystem::UISystem ( Registry & reg,
VulkanRenderer & rend )
inline

Member Function Documentation

◆ draw()

void Engine::UISystem::draw ( )

Renders the UI overlay.

◆ drawWidget()

void Engine::UISystem::drawWidget ( Entity entity,
const glm::vec2 & viewportPos,
const glm::vec2 & viewportSize,
ImDrawList * drawList )
private

◆ getRect()

glm::vec4 Engine::UISystem::getRect ( Entity entity,
const glm::vec2 & viewportSize )
private

◆ setEditorActive()

void Engine::UISystem::setEditorActive ( bool active)
inline

◆ setPlaying()

void Engine::UISystem::setPlaying ( bool playing)
inline

◆ update()

void Engine::UISystem::update ( float dt)
inlineoverridevirtual

Pure virtual update function to implement system behaviors.

Parameters
dtDelta time in seconds.

Implements System.

Member Data Documentation

◆ editorActive

bool Engine::UISystem::editorActive = false
private

◆ isPlaying

bool Engine::UISystem::isPlaying = false
private

◆ registry

Registry& Engine::UISystem::registry
private

◆ renderer

VulkanRenderer& Engine::UISystem::renderer
private

The documentation for this class was generated from the following files: