Skip to content
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

Allow any key to trigger the osu! cookie in the initial state #17950

Merged
merged 3 commits into from
Apr 24, 2022

Conversation

Susko3
Copy link
Member

@Susko3 Susko3 commented Apr 23, 2022

Resolves #17854.

Works really wells since GlobalActions are handled with priority. If they weren't, handling all keys would prevent from exiting as it would consume the Escape/back key.

Full OsuGame tests are added to ensure this behaviour isn't broken in the future by the 'eventual solution':

// To ensure the global actions are handled with priority, this GlobalActionContainer is actually placed after game content.
// It does not contain children as expected, so we need to forward the NonPositionalInputQueue from the parent input manager to correctly
// allow the whole game to handle these actions.
// An eventual solution to this hack is to create localised action containers for individual components like SongSelect, but this will take some rearranging.

Copy link
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this works


namespace osu.Game.Tests.Visual.Navigation
{
public class TestSceneButtonSystemNavigation : OsuGameTestScene
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll note that TestSceneScreenNavigation already exists, is a OsuGameTestScene, and these test cases would fit there, so I'm not sure this needs to be a test scene on its own. Although that is a bit of a mixed bag of tests right now.

@bdach bdach requested a review from peppy April 23, 2022 17:55
@peppy peppy merged commit d0fee3c into ppy:master Apr 24, 2022
@Susko3 Susko3 deleted the ButtonSystem-keys branch April 24, 2022 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants