-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add onVolumeChange to SoundFrontEnd #3148
Add onVolumeChange to SoundFrontEnd #3148
Conversation
can you walk me through what the existing field |
FlxG.sound.volumeHandler = function(volume:Float) {
// do something when the volume is changed
}; Not sure what other use cases there might be but I personally used it to get |
Should we deprecate it? |
I don't see why not |
@@ -36,6 +36,7 @@ class SoundFrontEnd | |||
* Set this hook to get a callback whenever the volume changes. | |||
* Function should take the form myVolumeHandler(volume:Float). | |||
*/ | |||
@;deprecated("volumeHandler is deprecated, use onVolumeChange, instead") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there was a typo here, i just pushed a commit to fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D'oh!
It's still giving deprecation warnings:
I'll have to mess with this locally, when i have time later, unless you can figure it out, first |
I don't seem to be getting any deprecation warnings. I tried building the TurnBasedRPG demo on hl & html5, debug and release. Uncommenting the fix you added makes them show up, otherwise I get nothing |
I was looking at the 4.2.5 job, which doesn't have the ability to suppress warnings in methods. it does seem to work fine on 4.3.3 |
info: #3147
This acts the same as volumeHandler except it's just a FlxSignal. Not sure what to do with volumeHandler, should it be marked as deprecated?