1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 15:12:57 +08:00

Make OverlayContainers with no blocking input VisibilityContainers

This commit is contained in:
Joehu 2019-10-14 16:27:59 -07:00
parent 66d3a71ebb
commit ccc753a315
6 changed files with 6 additions and 15 deletions

View File

@ -102,7 +102,7 @@ namespace osu.Game
private readonly List<OverlayContainer> overlays = new List<OverlayContainer>(); private readonly List<OverlayContainer> overlays = new List<OverlayContainer>();
private readonly List<OverlayContainer> toolbarElements = new List<OverlayContainer>(); private readonly List<VisibilityContainer> toolbarElements = new List<VisibilityContainer>();
private readonly List<OverlayContainer> visibleBlockingOverlays = new List<OverlayContainer>(); private readonly List<OverlayContainer> visibleBlockingOverlays = new List<OverlayContainer>();

View File

@ -16,7 +16,7 @@ using osu.Game.Rulesets;
namespace osu.Game.Overlays.Toolbar namespace osu.Game.Overlays.Toolbar
{ {
public class Toolbar : OverlayContainer public class Toolbar : VisibilityContainer
{ {
public const float HEIGHT = 40; public const float HEIGHT = 40;
public const float TOOLTIP_HEIGHT = 30; public const float TOOLTIP_HEIGHT = 30;
@ -26,8 +26,6 @@ namespace osu.Game.Overlays.Toolbar
private ToolbarUserButton userButton; private ToolbarUserButton userButton;
private ToolbarRulesetSelector rulesetSelector; private ToolbarRulesetSelector rulesetSelector;
protected override bool BlockPositionalInput => false;
private const double transition_time = 500; private const double transition_time = 500;
private const float alpha_hovering = 0.8f; private const float alpha_hovering = 0.8f;

View File

@ -19,7 +19,7 @@ using osuTK.Graphics;
namespace osu.Game.Overlays namespace osu.Game.Overlays
{ {
public class VolumeOverlay : OverlayContainer public class VolumeOverlay : VisibilityContainer
{ {
private const float offset = 10; private const float offset = 10;
@ -28,8 +28,6 @@ namespace osu.Game.Overlays
private VolumeMeter volumeMeterMusic; private VolumeMeter volumeMeterMusic;
private MuteButton muteButton; private MuteButton muteButton;
protected override bool BlockPositionalInput => false;
private readonly BindableDouble muteAdjustment = new BindableDouble(); private readonly BindableDouble muteAdjustment = new BindableDouble();
private readonly Bindable<bool> isMuted = new Bindable<bool>(); private readonly Bindable<bool> isMuted = new Bindable<bool>();

View File

@ -16,7 +16,7 @@ namespace osu.Game.Screens.Play
/// <summary> /// <summary>
/// An overlay which can be used to require further user actions before gameplay is resumed. /// An overlay which can be used to require further user actions before gameplay is resumed.
/// </summary> /// </summary>
public abstract class ResumeOverlay : OverlayContainer public abstract class ResumeOverlay : VisibilityContainer
{ {
public CursorContainer GameplayCursor { get; set; } public CursorContainer GameplayCursor { get; set; }
@ -29,8 +29,6 @@ namespace osu.Game.Screens.Play
protected const float TRANSITION_TIME = 500; protected const float TRANSITION_TIME = 500;
protected override bool BlockPositionalInput => false;
protected abstract string Message { get; } protected abstract string Message { get; }
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true; public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;

View File

@ -23,7 +23,7 @@ using osu.Game.Input.Bindings;
namespace osu.Game.Screens.Play namespace osu.Game.Screens.Play
{ {
public class SkipOverlay : OverlayContainer, IKeyBindingHandler<GlobalAction> public class SkipOverlay : VisibilityContainer, IKeyBindingHandler<GlobalAction>
{ {
private readonly double startTime; private readonly double startTime;
@ -36,7 +36,6 @@ namespace osu.Game.Screens.Play
private double displayTime; private double displayTime;
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true; public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;
protected override bool BlockPositionalInput => false;
/// <summary> /// <summary>
/// Displays a skip overlay, giving the user the ability to skip forward. /// Displays a skip overlay, giving the user the ability to skip forward.

View File

@ -29,7 +29,7 @@ using osu.Game.Rulesets.UI;
namespace osu.Game.Screens.Select namespace osu.Game.Screens.Select
{ {
public class BeatmapInfoWedge : OverlayContainer public class BeatmapInfoWedge : VisibilityContainer
{ {
private const float shear_width = 36.75f; private const float shear_width = 36.75f;
@ -62,8 +62,6 @@ namespace osu.Game.Screens.Select
ruleset.ValueChanged += _ => updateDisplay(); ruleset.ValueChanged += _ => updateDisplay();
} }
protected override bool BlockPositionalInput => false;
protected override void PopIn() protected override void PopIn()
{ {
this.MoveToX(0, 800, Easing.OutQuint); this.MoveToX(0, 800, Easing.OutQuint);