diff options
Diffstat (limited to 'src/ui/text.c')
-rw-r--r-- | src/ui/text.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ui/text.c b/src/ui/text.c index 218e7565..71a26250 100644 --- a/src/ui/text.c +++ b/src/ui/text.c | |||
@@ -1110,6 +1110,7 @@ void drawCentered_Text(int fontId, iRect rect, iBool alignVisual, int color, con | |||
1110 | iRect textBounds = alignVisual ? visualBounds_Text(fontId, text) | 1110 | iRect textBounds = alignVisual ? visualBounds_Text(fontId, text) |
1111 | : (iRect){ zero_I2(), advanceRange_Text(fontId, text) }; | 1111 | : (iRect){ zero_I2(), advanceRange_Text(fontId, text) }; |
1112 | textBounds.pos = sub_I2(mid_Rect(rect), mid_Rect(textBounds)); | 1112 | textBounds.pos = sub_I2(mid_Rect(rect), mid_Rect(textBounds)); |
1113 | textBounds.pos.x = iMax(textBounds.pos.x, left_Rect(rect)); /* keep left edge visible */ | ||
1113 | draw_Text_(fontId, textBounds.pos, color, text); | 1114 | draw_Text_(fontId, textBounds.pos, color, text); |
1114 | deinit_Block(&chars); | 1115 | deinit_Block(&chars); |
1115 | } | 1116 | } |