Merge pull request #3030 from peppy/focused-overlay-blocks-select

Make focused overlays block "select" and keys
This commit is contained in:
Dan Balasescu 2018-07-13 21:20:43 +09:00 committed by GitHub
commit d08c44a726
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 3 deletions

View File

@ -22,8 +22,11 @@ public class OsuFocusedOverlayContainer : FocusedOverlayContainer, IPreviewTrack
protected virtual bool PlaySamplesOnStateChange => true;
protected override bool BlockPassThroughKeyboard => true;
private PreviewTrackManager previewTrackManager;
protected readonly Bindable<OverlayActivation> OverlayActivationMode = new Bindable<OverlayActivation>(OverlayActivation.All);
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
@ -69,10 +72,13 @@ protected override bool OnClick(InputState state)
public virtual bool OnPressed(GlobalAction action)
{
if (action == GlobalAction.Back)
switch (action)
{
State = Visibility.Hidden;
return true;
case GlobalAction.Back:
State = Visibility.Hidden;
return true;
case GlobalAction.Select:
return true;
}
return false;