Skip to content

refactor: replace game imgui ifdefs with a noop layer - #471

Merged
tomconder merged 1 commit into
mainfrom
refactor/imgui-noop-layer
Aug 30, 2026
Merged

refactor: replace game imgui ifdefs with a noop layer#471
tomconder merged 1 commit into
mainfrom
refactor/imgui-noop-layer

Conversation

@tomconder

Copy link
Copy Markdown
Owner

Mirrors the engine's GLFWManager/NoopManager pattern on the game side.

game/src/layer/imgui/noopimguilayer.hpp defines an inert game::layer::imgui::ImGuiLayer for builds without ENABLE_IMGUI, selected by a single #ifdef on the include in maze.hpp. The member, accessor, pushOverlay and the debug UI toggles in MazeLayer and ExitLayer become unconditional.

ENABLE_IMGUI sites: 10 -> 2 (maze.hpp, application.hpp).

imgui is still never linked into release — the imgui::imgui link and the layer/imgui/*.cpp glob stay behind ENABLE_IMGUI, and the noop header includes only layer/layer.hpp. Verified with strings maze.exe | grep -c imgui: release 0, debug 53.

Verified: ci-windows-release and ci-windows-debug both build; pre-commit run --all-files passes.

Mirror the engine's GLFWManager/NoopManager pattern on the game side:
noopimguilayer.hpp defines an inert game::layer::imgui::ImGuiLayer for
builds without ENABLE_IMGUI, selected by a single ifdef on the include in
maze.hpp. The member, accessor, pushOverlay and the debug UI toggles in
MazeLayer and ExitLayer become unconditional.

ENABLE_IMGUI sites drop from 10 to 2. imgui is still never linked into
release: the imgui::imgui link and the layer/imgui/*.cpp glob stay behind
ENABLE_IMGUI, and the noop header includes only layer/layer.hpp.
@github-actions github-actions Bot added sponge Sponge engine changes game Game changes cmake labels Aug 30, 2026
@tomconder
tomconder merged commit 435f85d into main Aug 30, 2026
9 checks passed
@tomconder
tomconder deleted the refactor/imgui-noop-layer branch August 30, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmake game Game changes sponge Sponge engine changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant