diff options
author | Kodexky <kodexky@gmail.com> | 2014-12-11 23:53:19 -0430 |
---|---|---|
committer | Craig Robbins <kde.psych@gmail.com> | 2014-12-30 00:30:28 +1000 |
commit | a79a116ac8ca0ebdf79bdbbc9e67643334fc6ae6 (patch) | |
tree | 7dcbde99e771d0e8cf274fa75fa9d6c605ad8549 /src | |
parent | 62feade05da387cd6b230e7a0edf558c6fd7c099 (diff) | |
download | minetest-a79a116ac8ca0ebdf79bdbbc9e67643334fc6ae6.tar.gz minetest-a79a116ac8ca0ebdf79bdbbc9e67643334fc6ae6.tar.bz2 minetest-a79a116ac8ca0ebdf79bdbbc9e67643334fc6ae6.zip |
Center status text for better visibility.
Diffstat (limited to 'src')
-rw-r--r-- | src/game.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/game.cpp b/src/game.cpp index 5d53c67d2..5f075e624 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -4050,10 +4050,13 @@ void Game::updateGui(float *statustext_time, const RunStats &stats, guitext_status->setVisible(!statustext.empty()); if (!statustext.empty()) { - s32 status_y = screensize.Y - 130; + s32 status_width = guitext_status->getTextWidth(); + s32 status_height = guitext_status->getTextHeight(); + s32 status_y = screensize.Y - 150; + s32 status_x = (screensize.X - status_width) / 2; core::rect<s32> rect( - 10, status_y - guitext_status->getTextHeight(), - 10 + guitext_status->getTextWidth(), status_y + status_x , status_y - status_height, + status_x + status_width, status_y ); guitext_status->setRelativePosition(rect); |