mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 23:00:04 +00:00
Use dynamically sized ImGui fonts
This commit is contained in:
parent
dc96e3e3ad
commit
c82b9753c6
12 changed files with 89 additions and 88 deletions
|
|
@ -102,7 +102,7 @@ void DrawLayer::ImGuiFrameStart(const std::shared_ptr<MapContext>& mapContext)
|
|||
ImGui_ImplQt_NewFrame(mapContext->widget());
|
||||
ImGui_ImplOpenGL3_NewFrame();
|
||||
ImGui::NewFrame();
|
||||
ImGui::PushFont(defaultFont->font(), 0.0f);
|
||||
ImGui::PushFont(defaultFont.first->font(), defaultFont.second.value());
|
||||
}
|
||||
|
||||
void DrawLayer::ImGuiFrameEnd()
|
||||
|
|
|
|||
|
|
@ -1644,7 +1644,7 @@ void MapWidget::paintGL()
|
|||
ImGui::NewFrame();
|
||||
|
||||
// Set default font
|
||||
ImGui::PushFont(defaultFont->font(), 0.0f);
|
||||
ImGui::PushFont(defaultFont.first->font(), defaultFont.second.value());
|
||||
|
||||
// Perform mouse picking
|
||||
if (p->hasMouse_)
|
||||
|
|
|
|||
|
|
@ -539,7 +539,8 @@ void OverlayLayer::Render(const std::shared_ptr<MapContext>& mapContext,
|
|||
ImVec2 {1.0f, 1.0f});
|
||||
ImGui::SetNextWindowBgAlpha(0.5f);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2 {3.0f, 2.0f});
|
||||
ImGui::PushFont(attributionFont->font(), 0.0f);
|
||||
ImGui::PushFont(attributionFont.first->font(),
|
||||
attributionFont.second.value());
|
||||
ImGui::Begin("Attribution",
|
||||
nullptr,
|
||||
ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue