GUI sound effects for non buttons

There are no stupid questions, just stupid answers.
1 post Page 1 of 1
Posts: 1004
Joined: Sun Feb 08, 2015 1:51 am
  by Duion » Thu Oct 27, 2016 12:18 am
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: ... #L255-L256
And here you see it is missing for other elements: ... .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?
1 post Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests