Duion Posted October 26, 2016 Share Posted October 26, 2016 As I tried to add sound effects for my GUI items I found out that everything that is not from the button category cannot have sound effects.This is because in the engine there is no function for it, even though you can set it in the ingame editor to have a sound.Here is the source function that plays the sound for buttons:https://github.com/GarageGames/Torque3D/blob/c83efa59e0a11fc15c68afaf106807643191ac6f/Engine/source/gui/buttons/guiButtonBaseCtrl.cpp#L255-L256And here you see it is missing for other elements:https://github.com/GarageGames/Torque3D/blob/c83efa59e0a11fc15c68afaf106807643191ac6f/Engine/source/gui/controls/guiPopUpCtrlEx.cpp#L1653Before I start to fumble around I wanted to ask, if anyone already has implemented a similar feature or knows a good way to do it.What would better, to add in in source code or through script? I would do it through script, since I'm not good at C++.My thoughts were it would be nice to have additional functionality for more events, since in source I see a lot of callbacks, for mouse over, mouse down, mouse up, mouse leave etc, but by default only mouse over and mouse down for buttons have a sound effect added.Would it be too much work? I would like that feature, but I do not plan on putting too much work into it, since it is a not so important feature for now.So any ideas? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.