Skip to content

Commit a79a116

Browse files
KodexKyZeno-
authored andcommittedDec 29, 2014
Center status text for better visibility.
1 parent 62feade commit a79a116

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
 

‎src/game.cpp

+6-3
Original file line numberDiff line numberDiff line change
@@ -4050,10 +4050,13 @@ void Game::updateGui(float *statustext_time, const RunStats &stats,
40504050
guitext_status->setVisible(!statustext.empty());
40514051

40524052
if (!statustext.empty()) {
4053-
s32 status_y = screensize.Y - 130;
4053+
s32 status_width = guitext_status->getTextWidth();
4054+
s32 status_height = guitext_status->getTextHeight();
4055+
s32 status_y = screensize.Y - 150;
4056+
s32 status_x = (screensize.X - status_width) / 2;
40544057
core::rect<s32> rect(
4055-
10, status_y - guitext_status->getTextHeight(),
4056-
10 + guitext_status->getTextWidth(), status_y
4058+
status_x , status_y - status_height,
4059+
status_x + status_width, status_y
40574060
);
40584061
guitext_status->setRelativePosition(rect);
40594062

0 commit comments

Comments
 (0)
Please sign in to comment.