Beside the font used, raygui supports multiple text-styling properties for controls text drawing. At this moment some text-styling properties can be configured by-control while some other properties are global for all controls.
Per-control properties:
TEXT_PADDING: Control text padding, not considering border
TEXT_ALIGNMENT: Control text horizontal alignment inside control text bound (after border and padding)
Global properties:
TEXT_SIZE: Text size (glyphs max height)
TEXT_SPACING: Text spacing between glyphs
TEXT_LINE_SPACING: Text spacing between lines
TEXT_ALIGNMENT_VERTICAL: Text vertical alignment inside text bounds (after border and padding)
TEXT_WRAP_MODE: Text wrap-mode inside text bounds
In any case, those properties can be set by user before drawing each control for a per-control configuration but in the case of per-control properties they are saved individually with the style while with the global properties they must be set at runtime depending on the user needs.
Also, all those properties determine how GetTextBounds() is calculated and how GuiDrawText() behaves (functions used by all controls).
I'm considering unifying all those properties per-control or global but I'm seing multiple issues... because some current per-control properties should probably stay configured per control...
Beside the font used, raygui supports multiple text-styling properties for controls text drawing. At this moment some text-styling properties can be configured by-control while some other properties are global for all controls.
Per-control properties:
TEXT_PADDING: Control text padding, not considering borderTEXT_ALIGNMENT: Control text horizontal alignment inside control text bound (after border and padding)Global properties:
TEXT_SIZE: Text size (glyphs max height)TEXT_SPACING: Text spacing between glyphsTEXT_LINE_SPACING: Text spacing between linesTEXT_ALIGNMENT_VERTICAL: Text vertical alignment inside text bounds (after border and padding)TEXT_WRAP_MODE: Text wrap-mode inside text boundsIn any case, those properties can be set by user before drawing each control for a per-control configuration but in the case of per-control properties they are saved individually with the style while with the global properties they must be set at runtime depending on the user needs.
Also, all those properties determine how
GetTextBounds()is calculated and howGuiDrawText()behaves (functions used by all controls).I'm considering unifying all those properties per-control or global but I'm seing multiple issues... because some current per-control properties should probably stay configured per control...