Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pskelton committed Oct 31, 2024
1 parent 323a0f7 commit 29e0510
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/GUI/Overlay/OverlaySystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,12 @@ void OverlaySystem::removeOverlay(std::string_view name) {
}

void OverlaySystem::drawOverlays() {
if (!_isEnabled) {
return;
}

// Cycle Imgui even if overlays are disabled and we dont draw anything. This allows it to consume input events at the correct time - #1824.
_renderer.beginOverlays();
for (auto &&[name, overlay] : _overlays) {
overlay->update();
if (_isEnabled) {
for (auto &&[name, overlay] : _overlays) {
overlay->update();
}
}
_renderer.endOverlays();
}
Expand Down

0 comments on commit 29e0510

Please sign in to comment.