mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add sound to press event of some formspecs elements (#10402)
This commit is contained in:
parent
43bc3a1245
commit
78273027bf
6 changed files with 57 additions and 10 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue