Inital code for per map layer ImGui contexts

This commit is contained in:
AdenKoperczak 2025-01-04 13:49:31 -05:00
parent e641c0b0e5
commit 6d107f6c2d
7 changed files with 153 additions and 15 deletions

View file

@ -55,6 +55,8 @@ void RadarSiteLayer::Initialize()
logger_->debug("Initialize()");
p->radarSites_ = config::RadarSite::GetAll();
ImGuiInitialize();
}
void RadarSiteLayer::Render(
@ -84,6 +86,7 @@ void RadarSiteLayer::Render(
p->halfWidth_ = params.width * 0.5f;
p->halfHeight_ = params.height * 0.5f;
StartImGuiFrame();
// Radar site ImGui windows shouldn't have padding
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2 {0.0f, 0.0f});
@ -93,6 +96,7 @@ void RadarSiteLayer::Render(
}
ImGui::PopStyleVar();
EndImGuiFrame();
SCWX_GL_CHECK_ERROR();
}