(Breaking) Fonts: rename GetCustomRectByIndex() to GetCustomRect(). Made return struct const.

This commit is contained in:
ocornut
2025-03-13 17:10:52 +01:00
parent 85d0507580
commit f816b861fc
4 changed files with 22 additions and 23 deletions

View File

@@ -2500,7 +2500,7 @@ void ImTextureData::DestroyPixels()
//-----------------------------------------------------------------------------
// - ImFontAtlas::AddCustomRectRegular()
// - ImFontAtlas::AddCustomRectFontGlyph()
// - ImFontAtlas::GetCustomRectByIndex()
// - ImFontAtlas::GetCustomRect()
// - ImFontAtlas::CalcCustomRectUV()
// - ImFontAtlasGetMouseCursorTexData()
//-----------------------------------------------------------------------------
@@ -3293,9 +3293,9 @@ int ImFontAtlas::AddCustomRectFontGlyphForSize(ImFont* font, float font_size, Im
}
#endif // #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
ImTextureRect* ImFontAtlas::GetCustomRectByIndex(int idx)
const ImTextureRect* ImFontAtlas::GetCustomRect(int id)
{
return ImFontAtlasPackGetRect(this, idx);
return ImFontAtlasPackGetRect(this, (ImFontAtlasRectId)id);
}
void ImFontAtlas::CalcCustomRectUV(const ImTextureRect* rect, ImVec2* out_uv_min, ImVec2* out_uv_max) const