mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Removed unncessary ID (first arg) of ImFontAtlas::AddCustomRectRegular() function.
This commit is contained in:
15
imgui.h
15
imgui.h
@ -2150,13 +2150,13 @@ struct ImFontGlyphRangesBuilder
|
||||
// See ImFontAtlas::AddCustomRectXXX functions.
|
||||
struct ImFontAtlasCustomRect
|
||||
{
|
||||
unsigned int ID; // Input // User ID. Use < 0x110000 to map into a font glyph, >= 0x110000 for other/internal/custom texture data.
|
||||
unsigned short Width, Height; // Input // Desired rectangle dimension
|
||||
unsigned short X, Y; // Output // Packed position in Atlas
|
||||
float GlyphAdvanceX; // Input // For custom font glyphs only (ID < 0x110000): glyph xadvance
|
||||
ImVec2 GlyphOffset; // Input // For custom font glyphs only (ID < 0x110000): glyph display offset
|
||||
ImFont* Font; // Input // For custom font glyphs only (ID < 0x110000): target font
|
||||
ImFontAtlasCustomRect() { ID = 0xFFFFFFFF; Width = Height = 0; X = Y = 0xFFFF; GlyphAdvanceX = 0.0f; GlyphOffset = ImVec2(0,0); Font = NULL; }
|
||||
unsigned int GlyphID; // Input // For custom font glyphs only (ID < 0x110000)
|
||||
float GlyphAdvanceX; // Input // For custom font glyphs only: glyph xadvance
|
||||
ImVec2 GlyphOffset; // Input // For custom font glyphs only: glyph display offset
|
||||
ImFont* Font; // Input // For custom font glyphs only: target font
|
||||
ImFontAtlasCustomRect() { Width = Height = 0; X = Y = 0xFFFF; GlyphID = 0; GlyphAdvanceX = 0.0f; GlyphOffset = ImVec2(0,0); Font = NULL; }
|
||||
bool IsPacked() const { return X != 0xFFFF; }
|
||||
};
|
||||
|
||||
@ -2235,8 +2235,9 @@ struct ImFontAtlas
|
||||
// You can also request your rectangles to be mapped as font glyph (given a font + Unicode point),
|
||||
// so you can render e.g. custom colorful icons and use them as regular glyphs.
|
||||
// Read docs/FONTS.txt for more details about using colorful icons.
|
||||
IMGUI_API int AddCustomRectRegular(unsigned int id, int width, int height); // Id needs to be >= 0x110000. Id >= 0x80000000 are reserved for ImGui and ImDrawList
|
||||
IMGUI_API int AddCustomRectFontGlyph(ImFont* font, ImWchar id, int width, int height, float advance_x, const ImVec2& offset = ImVec2(0,0)); // Id needs to be < 0x110000 to register a rectangle to map into a specific font.
|
||||
// Note: this API may be redesigned later in order to support multi-monitor varying DPI settings.
|
||||
IMGUI_API int AddCustomRectRegular(int width, int height);
|
||||
IMGUI_API int AddCustomRectFontGlyph(ImFont* font, ImWchar id, int width, int height, float advance_x, const ImVec2& offset = ImVec2(0,0));
|
||||
const ImFontAtlasCustomRect*GetCustomRectByIndex(int index) const { if (index < 0) return NULL; return &CustomRects[index]; }
|
||||
|
||||
// [Internal]
|
||||
|
Reference in New Issue
Block a user