testbed: setup hud system for later use

This commit is contained in:
skypjack
2025-04-29 14:48:23 +02:00
parent f505050391
commit 1796b18284
4 changed files with 27 additions and 0 deletions

View File

@@ -51,6 +51,7 @@ target_sources(
PRIVATE
application/application.cpp
application/context.cpp
system/hud_system.cpp
system/imgui_system.cpp
system/input_system.cpp
system/rendering_system.cpp

View File

@@ -6,6 +6,7 @@
#include <backends/imgui_impl_sdlrenderer3.h>
#include <entt/entity/registry.hpp>
#include <imgui.h>
#include <system/hud_system.h>
#include <system/imgui_system.h>
#include <system/input_system.h>
#include <system/rendering_system.h>
@@ -26,6 +27,7 @@ void application::draw(entt::registry &registry, const context &context) const {
SDL_RenderClear(context);
rendering_system(registry, context);
hud_system(registry, context);
imgui_system(registry);
ImGui::Render();

View File

@@ -0,0 +1,13 @@
#include <application/context.h>
#include <entt/entity/registry.hpp>
#include <system/hud_system.h>
namespace testbed {
void hud_system(entt::registry &registry, const context &ctx) {
// render...
static_cast<void>(registry);
static_cast<void>(ctx);
}
} // namespace testbed

View File

@@ -0,0 +1,11 @@
#pragma once
#include <entt/entity/fwd.hpp>
namespace testbed {
struct context;
void hud_system(entt::registry &, const context &);
} // namespace testbed