In BGS there is code to allow the various contract mission screens to have the background sound effects continue playing. For all other mission screens the sound effects basically stop while the screen is active. It looks like the method BGS uses to work out the contract screens are active is to look at the screen ID, split the string based on a "-" separator character, check the first element for "oolite", then check the last element for either "summary", "map" or "none".
If I want to apply the same rules to a mission screen, the most obvious way to achieve it would be to just give my mission screens a screen ID that conforms with the above specification. But is there a more "official" way of doing it? I checked the documentation on the Wiki but couldn't seem to find anything that covered this situation. Have I missed something? Actually I think I must have missed something so any pointers would be greatly appreciated.
BGS and adding background sounds to mission screens
Moderators: winston, another_commander
Re: BGS and adding background sounds to mission screens
phkb wrote:But is there a more "official" way of doing it?
screenID
only has to be a String. There's no other rule or another way to identify a specific missionscreen.- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: BGS and adding background sounds to mission screens
I'm sorry, I wasn't clear enough. I mean official from a BGS point of view. What's the best way to get BGS to continue playing the background ambient sounds on a mission screen, without giving it a screen ID that looks like "oolite-blah-blah-map" etc. I'm trying to make my mission screens more integrated, and the sound component is one I've ignored for a while. At the moment there is a jarring halt to all sounds when one of my mission screens open, so I'd like to get BGS to continue to play ambient sounds while they're running.
Re: BGS and adding background sounds to mission screens
Ah, ok. At least Tricky's github-repo doesn't contain anything beyond the v1.77.1 handling you've described above. The ship registering screens are not handled as well.