diff options
author | Pierre-Yves Rollo <dev@pyrollo.com> | 2020-09-16 17:10:17 +0200 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2020-11-23 21:28:25 +0100 |
commit | 78273027bf4bbee7488c76c6d65f85381ec7c0ba (patch) | |
tree | 2722d203dfb754549a34e58a4e859bc839ca68f8 /src/gui/guiFormSpecMenu.h | |
parent | 43bc3a124541d014d7a2678d72bf3b54ff2d6e97 (diff) | |
download | minetest-78273027bf4bbee7488c76c6d65f85381ec7c0ba.tar.gz minetest-78273027bf4bbee7488c76c6d65f85381ec7c0ba.tar.bz2 minetest-78273027bf4bbee7488c76c6d65f85381ec7c0ba.zip |
Add sound to press event of some formspecs elements (#10402)
Diffstat (limited to 'src/gui/guiFormSpecMenu.h')
-rw-r--r-- | src/gui/guiFormSpecMenu.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/guiFormSpecMenu.h b/src/gui/guiFormSpecMenu.h index c5d662a69..53076e3bd 100644 --- a/src/gui/guiFormSpecMenu.h +++ b/src/gui/guiFormSpecMenu.h @@ -39,6 +39,7 @@ class InventoryManager; class ISimpleTextureSource; class Client; class GUIScrollContainer; +class ISoundManager; typedef enum { f_Button, @@ -127,6 +128,7 @@ class GUIFormSpecMenu : public GUIModalMenu int priority; core::rect<s32> rect; gui::ECURSOR_ICON fcursor_icon; + std::string sound; }; struct TooltipSpec @@ -151,6 +153,7 @@ public: IMenuManager *menumgr, Client *client, ISimpleTextureSource *tsrc, + ISoundManager *sound_manager, IFormSource* fs_src, TextDest* txt_dst, const std::string &formspecPrepend, @@ -160,7 +163,7 @@ public: static void create(GUIFormSpecMenu *&cur_formspec, Client *client, JoystickController *joystick, IFormSource *fs_src, TextDest *txt_dest, - const std::string &formspecPrepend); + const std::string &formspecPrepend, ISoundManager *sound_manager); void setFormSpec(const std::string &formspec_string, const InventoryLocation ¤t_inventory_location) @@ -293,6 +296,7 @@ protected: InventoryManager *m_invmgr; ISimpleTextureSource *m_tsrc; + ISoundManager *m_sound_manager; Client *m_client; std::string m_formspec_string; |