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:
commit
6305198d84
@ -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)
|
||||
|
@ -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>();
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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>();
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user