1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-29 03:00:05 +00:00

Revert "Fonts: Allowing PushFont()/PopFont() to be called outside the imgui frame scope. (#3621)"

This reverts commit 61d4bf95dc.
This commit is contained in:
ocornut 2024-12-20 17:20:57 +01:00
parent 61d4bf95dc
commit 7219fa65c0
2 changed files with 2 additions and 5 deletions

View file

@ -8018,8 +8018,7 @@ void ImGui::PushFont(ImFont* font)
font = GetDefaultFont();
g.FontStack.push_back(font);
SetCurrentFont(font);
if (ImGuiWindow* window = g.CurrentWindow)
window->DrawList->_SetTextureID(font->ContainerAtlas->TexID);
g.CurrentWindow->DrawList->_SetTextureID(font->ContainerAtlas->TexID);
}
void ImGui::PopFont()
@ -8033,8 +8032,7 @@ void ImGui::PopFont()
g.FontStack.pop_back();
ImFont* font = g.FontStack.Size == 0 ? GetDefaultFont() : g.FontStack.back();
SetCurrentFont(font);
if (ImGuiWindow* window = g.CurrentWindow)
window->DrawList->_SetTextureID(font->ContainerAtlas->TexID);
g.CurrentWindow->DrawList->_SetTextureID(font->ContainerAtlas->TexID);
}
void ImGui::PushItemFlag(ImGuiItemFlags option, bool enabled)