From f3d083d3f150c1e940c4086f39165fb55935344a Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 2 Aug 2020 17:56:02 +0300 Subject: Flag for tight label padding; aligning labels visually --- src/ui/text.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ui/text.h') diff --git a/src/ui/text.h b/src/ui/text.h index 95d49fda..f165c5b4 100644 --- a/src/ui/text.h +++ b/src/ui/text.h @@ -50,6 +50,7 @@ void deinit_Text (void); int lineHeight_Text (int fontId); iInt2 measure_Text (int fontId, const char *text); iInt2 measureRange_Text (int fontId, iRangecc text); +iRect visualBounds_Text (int fontId, iRangecc text); iInt2 advance_Text (int fontId, const char *text); iInt2 advanceN_Text (int fontId, const char *text, size_t n); /* `n` in characters */ iInt2 advanceRange_Text (int fontId, iRangecc text); @@ -65,7 +66,7 @@ enum iAlignment { void draw_Text (int fontId, iInt2 pos, int color, const char *text, ...); void drawAlign_Text (int fontId, iInt2 pos, int color, enum iAlignment align, const char *text, ...); -void drawCentered_Text (int fontId, iRect rect, int color, const char *text, ...); +void drawCentered_Text (int fontId, iRect rect, iBool alignVisual, int color, const char *text, ...); void drawString_Text (int fontId, iInt2 pos, int color, const iString *text); SDL_Texture * glyphCache_Text (void); -- cgit v1.2.3