1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Merge pull request #6514 from Joehuu/simplify-overlaycontainers

Make OverlayContainers with no blocking input VisibilityContainers
This commit is contained in:
Dan Balasescu 2019-10-15 13:23:28 +09:00 committed by GitHub
commit 6305198d84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 8 additions and 17 deletions

View File

@ -15,7 +15,7 @@ using osuTK.Graphics;
namespace osu.Desktop.Overlays
{
public class VersionManager : OverlayContainer
public class VersionManager : VisibilityContainer
{
[BackgroundDependencyLoader]
private void load(OsuColour colours, TextureStore textures, OsuGameBase game)

View File

@ -102,7 +102,7 @@ namespace osu.Game
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>();

View File

@ -16,7 +16,7 @@ using osuTK.Graphics;
namespace osu.Game.Overlays.Music
{
public class PlaylistOverlay : OverlayContainer
public class PlaylistOverlay : VisibilityContainer
{
private const float transition_duration = 600;
private const float playlist_height = 510;

View File

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

View File

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

View File

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

View File

@ -23,7 +23,7 @@ using osu.Game.Input.Bindings;
namespace osu.Game.Screens.Play
{
public class SkipOverlay : OverlayContainer, IKeyBindingHandler<GlobalAction>
public class SkipOverlay : VisibilityContainer, IKeyBindingHandler<GlobalAction>
{
private readonly double startTime;
@ -36,7 +36,6 @@ namespace osu.Game.Screens.Play
private double displayTime;
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;
protected override bool BlockPositionalInput => false;
/// <summary>
/// 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
{
public class BeatmapInfoWedge : OverlayContainer
public class BeatmapInfoWedge : VisibilityContainer
{
private const float shear_width = 36.75f;
@ -62,8 +62,6 @@ namespace osu.Game.Screens.Select
ruleset.ValueChanged += _ => updateDisplay();
}
protected override bool BlockPositionalInput => false;
protected override void PopIn()
{
this.MoveToX(0, 800, Easing.OutQuint);