diff options
author | Wuzzy <wuzzy2@mail.ru> | 2021-08-21 11:53:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-21 13:53:49 +0200 |
commit | 6fd8aede48e357524ea0723fd0e8836697ece11e (patch) | |
tree | 84fa6246b872ee4a150d3b7a0cd62297a7d89d04 /src/client/game.cpp | |
parent | e7b05beb7d90b4ea53ef13da86ff8b8ccde1193b (diff) | |
download | minetest-6fd8aede48e357524ea0723fd0e8836697ece11e.tar.gz minetest-6fd8aede48e357524ea0723fd0e8836697ece11e.tar.bz2 minetest-6fd8aede48e357524ea0723fd0e8836697ece11e.zip |
Show status message when changing block bounds (#11556)
Diffstat (limited to 'src/client/game.cpp')
-rw-r--r-- | src/client/game.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp index 90bfab2a3..011875e4a 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -2193,7 +2193,24 @@ void Game::toggleCinematic() void Game::toggleBlockBounds() { if (client->checkPrivilege("basic_debug")) { - hud->toggleBlockBounds(); + enum Hud::BlockBoundsMode newmode = hud->toggleBlockBounds(); + switch (newmode) { + case Hud::BLOCK_BOUNDS_OFF: + m_game_ui->showTranslatedStatusText("Block bounds hidden"); + break; + case Hud::BLOCK_BOUNDS_CURRENT: + m_game_ui->showTranslatedStatusText("Block bounds shown for current block"); + break; + case Hud::BLOCK_BOUNDS_NEAR: + m_game_ui->showTranslatedStatusText("Block bounds shown for nearby blocks"); + break; + case Hud::BLOCK_BOUNDS_MAX: + m_game_ui->showTranslatedStatusText("Block bounds shown for all blocks"); + break; + default: + break; + } + } else { m_game_ui->showTranslatedStatusText("Can't show block bounds (need 'basic_debug' privilege)"); } |