mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Show status message when changing block bounds (#11556)
This commit is contained in:
parent
e7b05beb7d
commit
6fd8aede48
3 changed files with 30 additions and 12 deletions
|
@ -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)");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue