mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 22:40:05 +00:00
Use fonts defined by text settings for rendering
This commit is contained in:
parent
e37e64b3f2
commit
11ea4676cf
5 changed files with 47 additions and 79 deletions
|
|
@ -1032,6 +1032,9 @@ void MapWidget::initializeGL()
|
|||
|
||||
void MapWidget::paintGL()
|
||||
{
|
||||
auto defaultFont = manager::FontManager::Instance().GetImGuiFont(
|
||||
types::FontCategory::Default);
|
||||
|
||||
p->frameDraws_++;
|
||||
|
||||
// Setup ImGui Frame
|
||||
|
|
@ -1047,6 +1050,9 @@ void MapWidget::paintGL()
|
|||
p->ImGuiCheckFonts();
|
||||
ImGui::NewFrame();
|
||||
|
||||
// Set default font
|
||||
ImGui::PushFont(defaultFont->font());
|
||||
|
||||
// Update pixel ratio
|
||||
p->context_->set_pixel_ratio(pixelRatio());
|
||||
|
||||
|
|
@ -1069,6 +1075,9 @@ void MapWidget::paintGL()
|
|||
p->lastItemPicked_ = false;
|
||||
}
|
||||
|
||||
// Pop default font
|
||||
ImGui::PopFont();
|
||||
|
||||
// Render ImGui Frame
|
||||
ImGui::Render();
|
||||
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue