mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-02 19:42:35 +00:00
Fonts: moved ImFontAtlasRectId back to public API.
This commit is contained in:
@@ -3222,7 +3222,7 @@ void ImFontAtlas::RemoveFont(ImFont* font)
|
||||
ImFontAtlasBuildNotifySetFont(this, font, new_current_font);
|
||||
}
|
||||
|
||||
int ImFontAtlas::AddCustomRect(int width, int height)
|
||||
ImFontAtlasRectId ImFontAtlas::AddCustomRect(int width, int height)
|
||||
{
|
||||
IM_ASSERT(width > 0 && width <= 0xFFFF);
|
||||
IM_ASSERT(height > 0 && height <= 0xFFFF);
|
||||
@@ -3289,9 +3289,9 @@ int ImFontAtlas::AddCustomRectFontGlyphForSize(ImFont* font, float font_size, Im
|
||||
}
|
||||
#endif // #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
|
||||
bool ImFontAtlas::GetCustomRect(int id, ImFontAtlasRect* out_r) const
|
||||
bool ImFontAtlas::GetCustomRect(ImFontAtlasRectId id, ImFontAtlasRect* out_r) const
|
||||
{
|
||||
ImTextureRect* r = ImFontAtlasPackGetRect((ImFontAtlas*)this, (ImFontAtlasRectId)id);
|
||||
ImTextureRect* r = ImFontAtlasPackGetRect((ImFontAtlas*)this, id);
|
||||
if (r == NULL)
|
||||
return false;
|
||||
IM_ASSERT(TexData->Width > 0 && TexData->Height > 0); // Font atlas needs to be built before we can calculate UV coordinates
|
||||
|
||||
Reference in New Issue
Block a user