diff --git a/engine/CMakeLists.txt b/engine/CMakeLists.txt index ae90b8b174..605fdae4e6 100644 --- a/engine/CMakeLists.txt +++ b/engine/CMakeLists.txt @@ -28,6 +28,7 @@ set(CUBOS_ENGINE_SOURCE "src/cubos/engine/tools/world_inspector/plugin.cpp" "src/cubos/engine/tools/entity_inspector/plugin.cpp" "src/cubos/engine/tools/scene_editor/plugin.cpp" + "src/cubos/engine/tools/debug_camera/plugin.cpp" "src/cubos/engine/transform/plugin.cpp" "src/cubos/engine/transform/local_to_world.cpp" diff --git a/engine/include/cubos/engine/tools/debug_camera/plugin.hpp b/engine/include/cubos/engine/tools/debug_camera/plugin.hpp new file mode 100644 index 0000000000..96e551fd59 --- /dev/null +++ b/engine/include/cubos/engine/tools/debug_camera/plugin.hpp @@ -0,0 +1,18 @@ +/// @dir +/// @brief @ref debug-camera-plugin plugin directory. + +/// @file +/// @brief Plugin entry point. +/// @ingroup debug-camera-plugin + +#pragma once + +#include + +namespace cubos::engine::tools +{ + /// @brief Plugin entry function. + /// @param cubos @b CUBOS. main class + /// @ingroup debug-camera-plugin + void debugCameraPlugin(Cubos& cubos); +} // namespace cubos::engine::tools diff --git a/engine/src/cubos/engine/tools/debug_camera/plugin.cpp b/engine/src/cubos/engine/tools/debug_camera/plugin.cpp new file mode 100644 index 0000000000..2f53f0516d --- /dev/null +++ b/engine/src/cubos/engine/tools/debug_camera/plugin.cpp @@ -0,0 +1,22 @@ +#include + +#include + +using cubos::core::ecs::Write; + +using namespace cubos::engine; + +static void inspector(Write settings) +{ + ImGui::Begin("Debug Camera"); + + printf("debug camera"); + + ImGui::End(); +} + +void cubos::engine::tools::debugCameraPlugin(Cubos& cubos) +{ + // cubos.addPlugin(imguiPlugin); + cubos.system(inspector).tagged("cubos.imgui"); +}