aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorPierre-Yves Rollo <dev@pyrollo.com>2020-09-16 17:10:17 +0200
committerSmallJoker <mk939@ymail.com>2020-11-23 21:28:25 +0100
commit78273027bf4bbee7488c76c6d65f85381ec7c0ba (patch)
tree2722d203dfb754549a34e58a4e859bc839ca68f8 /src/client
parent43bc3a124541d014d7a2678d72bf3b54ff2d6e97 (diff)
downloadminetest-78273027bf4bbee7488c76c6d65f85381ec7c0ba.tar.gz
minetest-78273027bf4bbee7488c76c6d65f85381ec7c0ba.tar.bz2
minetest-78273027bf4bbee7488c76c6d65f85381ec7c0ba.zip
Add sound to press event of some formspecs elements (#10402)
Diffstat (limited to 'src/client')
-rw-r--r--src/client/game.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index 5c38e027d..b7bb0a330 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -2071,7 +2071,7 @@ void Game::openInventory()
TextDest *txt_dst = new TextDestPlayerInventory(client);
auto *&formspec = m_game_ui->updateFormspec("");
GUIFormSpecMenu::create(formspec, client, &input->joystick, fs_src,
- txt_dst, client->getFormspecPrepend());
+ txt_dst, client->getFormspecPrepend(), sound);
formspec->setFormSpec(fs_src->getForm(), inventoryloc);
}
@@ -2603,7 +2603,7 @@ void Game::handleClientEvent_ShowFormSpec(ClientEvent *event, CameraOrientation
auto *&formspec = m_game_ui->updateFormspec(*(event->show_formspec.formname));
GUIFormSpecMenu::create(formspec, client, &input->joystick,
- fs_src, txt_dst, client->getFormspecPrepend());
+ fs_src, txt_dst, client->getFormspecPrepend(), sound);
}
delete event->show_formspec.formspec;
@@ -2616,7 +2616,7 @@ void Game::handleClientEvent_ShowLocalFormSpec(ClientEvent *event, CameraOrienta
LocalFormspecHandler *txt_dst =
new LocalFormspecHandler(*event->show_formspec.formname, client);
GUIFormSpecMenu::create(m_game_ui->getFormspecGUI(), client, &input->joystick,
- fs_src, txt_dst, client->getFormspecPrepend());
+ fs_src, txt_dst, client->getFormspecPrepend(), sound);
delete event->show_formspec.formspec;
delete event->show_formspec.formname;
@@ -3336,7 +3336,7 @@ bool Game::nodePlacement(const ItemDefinition &selected_def,
auto *&formspec = m_game_ui->updateFormspec("");
GUIFormSpecMenu::create(formspec, client, &input->joystick, fs_src,
- txt_dst, client->getFormspecPrepend());
+ txt_dst, client->getFormspecPrepend(), sound);
formspec->setFormSpec(meta->getString("formspec"), inventoryloc);
return false;
@@ -4108,7 +4108,7 @@ void Game::showDeathFormspec()
auto *&formspec = m_game_ui->getFormspecGUI();
GUIFormSpecMenu::create(formspec, client, &input->joystick,
- fs_src, txt_dst, client->getFormspecPrepend());
+ fs_src, txt_dst, client->getFormspecPrepend(), sound);
formspec->setFocus("btn_respawn");
}
@@ -4242,7 +4242,7 @@ void Game::showPauseMenu()
auto *&formspec = m_game_ui->getFormspecGUI();
GUIFormSpecMenu::create(formspec, client, &input->joystick,
- fs_src, txt_dst, client->getFormspecPrepend());
+ fs_src, txt_dst, client->getFormspecPrepend(), sound);
formspec->setFocus("btn_continue");
formspec->doPause = true;
}