Forráskód Böngészése

Fonts: removing assert from legacy PushFont() to mirror new PushFont(). for consistency.

ocornut 1 hónapja
szülő
commit
6f21bed66d
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      imgui.h

+ 1 - 1
imgui.h

@@ -3953,7 +3953,7 @@ struct ImGuiPlatformImeData
 namespace ImGui
 {
     // OBSOLETED in 1.92.0 (from June 2025)
-    static inline void  PushFont(ImFont* font)                                  { IM_ASSERT(font != NULL); PushFont(font, font->LegacySize); }
+    static inline void  PushFont(ImFont* font)                                  { PushFont(font, font ? font->LegacySize : 0.0f); }
     IMGUI_API void      SetWindowFontScale(float scale);                        // Set font scale factor for current window. Prefer using PushFont(NULL, style.FontSizeBase * factor) or use style.FontScaleMain to scale all windows.
     // OBSOLETED in 1.91.9 (from February 2025)
     IMGUI_API void      Image(ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& tint_col, const ImVec4& border_col); // <-- 'border_col' was removed in favor of ImGuiCol_ImageBorder. If you use 'tint_col', use ImageWithBg() instead.