Skip to content

Commit cf70360

Browse files
committed
[Bundle] ImFontGlyph: publish CodePoint, Colored, Visible via getters
1 parent 6d7fa35 commit cf70360

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

imgui.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3535,6 +3535,14 @@ struct ImFontGlyph
35353535
float AdvanceX; // Distance to next character (= data from font + ImFontConfig::GlyphExtraSpacing.x baked in)
35363536
float X0, Y0, X1, Y1; // Glyph corners
35373537
float U0, V0, U1, V1; // Texture coordinates
3538+
3539+
#ifdef IMGUI_BUNDLE_PYTHON_API
3540+
// [ADAPT_IMGUI_BUNDLE]
3541+
bool isColored() const { return Colored != 0; }
3542+
bool isVisible() const { return Visible != 0; }
3543+
unsigned int getCodepoint() const { return Codepoint; }
3544+
// [/ADAPT_IMGUI_BUNDLE]
3545+
#endif // IMGUI_BUNDLE_PYTHON_API
35383546
};
35393547

35403548
// Helper to build glyph ranges from text/string data. Feed your application strings/characters to it then call BuildRanges().

0 commit comments

Comments
 (0)