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 ... #L255-L256
And here you see it is missing for other elements:
https://github.com/GarageGames/Torque3D ... .cpp#L1653
Before 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?