Make naming more consistent for some ImGui DrawLayer Functions

This commit is contained in:
AdenKoperczak 2025-01-24 12:37:44 -05:00
parent a9daf47741
commit c139b156ee
4 changed files with 10 additions and 10 deletions

View file

@ -80,7 +80,7 @@ void DrawLayer::Initialize()
ImGuiInitialize(); ImGuiInitialize();
} }
void DrawLayer::StartImGuiFrame() void DrawLayer::ImGuiFrameStart()
{ {
auto defaultFont = manager::FontManager::Instance().GetImGuiFont( auto defaultFont = manager::FontManager::Instance().GetImGuiFont(
types::FontCategory::Default); types::FontCategory::Default);
@ -95,7 +95,7 @@ void DrawLayer::StartImGuiFrame()
ImGui::PushFont(defaultFont->font()); ImGui::PushFont(defaultFont->font());
} }
void DrawLayer::EndImGuiFrame() void DrawLayer::ImGuiFrameEnd()
{ {
// Pop default font // Pop default font
ImGui::PopFont(); ImGui::PopFont();
@ -145,9 +145,9 @@ void DrawLayer::ImGuiSelectContext()
void DrawLayer::Render(const QMapLibre::CustomLayerRenderParameters& params) void DrawLayer::Render(const QMapLibre::CustomLayerRenderParameters& params)
{ {
StartImGuiFrame(); ImGuiFrameStart();
RenderWithoutImGui(params); RenderWithoutImGui(params);
EndImGuiFrame(); ImGuiFrameEnd();
} }
void DrawLayer::Deinitialize() void DrawLayer::Deinitialize()

View file

@ -32,8 +32,8 @@ public:
protected: protected:
void AddDrawItem(const std::shared_ptr<gl::draw::DrawItem>& drawItem); void AddDrawItem(const std::shared_ptr<gl::draw::DrawItem>& drawItem);
void StartImGuiFrame(); void ImGuiFrameStart();
void EndImGuiFrame(); void ImGuiFrameEnd();
void ImGuiInitialize(); void ImGuiInitialize();
void void
RenderWithoutImGui(const QMapLibre::CustomLayerRenderParameters& params); RenderWithoutImGui(const QMapLibre::CustomLayerRenderParameters& params);

View file

@ -292,7 +292,7 @@ void OverlayLayer::Render(const QMapLibre::CustomLayerRenderParameters& params)
auto& settings = context()->settings(); auto& settings = context()->settings();
const float pixelRatio = context()->pixel_ratio(); const float pixelRatio = context()->pixel_ratio();
StartImGuiFrame(); ImGuiFrameStart();
p->sweepTimePicked_ = false; p->sweepTimePicked_ = false;
@ -493,7 +493,7 @@ void OverlayLayer::Render(const QMapLibre::CustomLayerRenderParameters& params)
p->lastFontSize_ = ImGui::GetFontSize(); p->lastFontSize_ = ImGui::GetFontSize();
p->lastColorTableMargins_ = colorTableMargins; p->lastColorTableMargins_ = colorTableMargins;
EndImGuiFrame(); ImGuiFrameEnd();
SCWX_GL_CHECK_ERROR(); SCWX_GL_CHECK_ERROR();
} }

View file

@ -86,7 +86,7 @@ void RadarSiteLayer::Render(
p->halfWidth_ = params.width * 0.5f; p->halfWidth_ = params.width * 0.5f;
p->halfHeight_ = params.height * 0.5f; p->halfHeight_ = params.height * 0.5f;
StartImGuiFrame(); ImGuiFrameStart();
// Radar site ImGui windows shouldn't have padding // Radar site ImGui windows shouldn't have padding
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2 {0.0f, 0.0f}); ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2 {0.0f, 0.0f});
@ -96,7 +96,7 @@ void RadarSiteLayer::Render(
} }
ImGui::PopStyleVar(); ImGui::PopStyleVar();
EndImGuiFrame(); ImGuiFrameEnd();
SCWX_GL_CHECK_ERROR(); SCWX_GL_CHECK_ERROR();
} }