mirror of https://github.com/ppy/osu
Merge pull request #3030 from peppy/focused-overlay-blocks-select
Make focused overlays block "select" and keys
This commit is contained in:
commit
d08c44a726
|
@ -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)
|
||||
{
|
||||
case GlobalAction.Back:
|
||||
State = Visibility.Hidden;
|
||||
return true;
|
||||
case GlobalAction.Select:
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue