flixel
flixel copied to clipboard
Adding option for Split Sound Tray
Set FLX_SPLIT_SOUND_TRAY in Project.xml to use.
Seperates controls for Sound, Music & Master Volumes.
Defaults:
+/-Sound Up/Down0Sound Mute//*Music Up/Down.Sound MuteSHIFT++/SHIFT+-Master Up/DownSHIFT+0Master Mute
Hm, I'm not sure it's a good idea, as this is starting to become pretty complex with some rather obscure shortcuts.
I think the built-in sound tray primarily works because it's simple, but if you need this much control, chances are this pre-built solution is not going to be a great fit anyway. Pretty much every "big" game is going to have a dedicated settings screen with volume options (and styled to fit the rest of the game), and all of Flixel's built-in UI disabled.
It should already be possible to customize the built-in sound tray by subclassing FlxSoundTray:
https://github.com/HaxeFlixel/flixel/blob/31bd217f170784e50eeabf437a862119cd161448/flixel/FlxGame.hx#L173-L177
I don't see this getting much use, people rarely know about the normal sound tray and even if we had it commented out in the template project.xml it would takes a lot just to explain the different controls. plus not everyone has a numpad.
personally if I were to make my own it would just be +/-/0 for master and shift for music
My biggest issue is renaming existing vars like volumeUp, to soundVolumeUp, and exposing new vars that don't do anything without FLX_SPLIT_SOUND_TRAY. These are breaking changes.