1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 04:13:11 +08:00

Merge remote-tracking branch 'origin/master' into fix-cursor-hiding

This commit is contained in:
smoogipoo 2018-01-16 20:20:47 +09:00
commit 02564db43f
19 changed files with 48 additions and 20 deletions

View File

@ -31,7 +31,8 @@ namespace osu.Desktop.Overlays
private OsuConfigManager config; private OsuConfigManager config;
private OsuGameBase game; private OsuGameBase game;
public override bool HandleInput => false; public override bool HandleKeyboardInput => false;
public override bool HandleMouseInput => false;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(NotificationOverlay notification, OsuColour colours, TextureStore textures, OsuGameBase game, OsuConfigManager config) private void load(NotificationOverlay notification, OsuColour colours, TextureStore textures, OsuGameBase game, OsuConfigManager config)

View File

@ -11,7 +11,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{ {
public class SpinnerBackground : CircularContainer, IHasAccentColour public class SpinnerBackground : CircularContainer, IHasAccentColour
{ {
public override bool HandleInput => false; public override bool HandleKeyboardInput => false;
public override bool HandleMouseInput => false;
protected Box Disc; protected Box Disc;

View File

@ -30,7 +30,9 @@ namespace osu.Game.Graphics.Backgrounds
/// </summary> /// </summary>
private const float edge_smoothness = 1; private const float edge_smoothness = 1;
public override bool HandleInput => false; public override bool HandleKeyboardInput => false;
public override bool HandleMouseInput => false;
public Color4 ColourLight = Color4.White; public Color4 ColourLight = Color4.White;
public Color4 ColourDark = Color4.Black; public Color4 ColourDark = Color4.Black;

View File

@ -42,7 +42,9 @@ namespace osu.Game.Graphics.UserInterface
//don't allow clicking between transitions and don't make the chevron clickable //don't allow clicking between transitions and don't make the chevron clickable
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => Alpha == 1f && Text.ReceiveMouseInputAt(screenSpacePos); public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => Alpha == 1f && Text.ReceiveMouseInputAt(screenSpacePos);
public override bool HandleInput => State == Visibility.Visible; public override bool HandleKeyboardInput => handleInput;
public override bool HandleMouseInput => handleInput;
private bool handleInput => State == Visibility.Visible;
private Visibility state; private Visibility state;

View File

@ -22,7 +22,8 @@ namespace osu.Game.Overlays
{ {
private readonly Container box; private readonly Container box;
public override bool HandleInput => false; public override bool HandleKeyboardInput => false;
public override bool HandleMouseInput => false;
private readonly SpriteText textLine1; private readonly SpriteText textLine1;
private readonly SpriteText textLine2; private readonly SpriteText textLine2;

View File

@ -474,7 +474,8 @@ namespace osu.Game.Overlays.Profile
private class LinkFlowContainer : OsuTextFlowContainer private class LinkFlowContainer : OsuTextFlowContainer
{ {
public override bool HandleInput => true; public override bool HandleKeyboardInput => true;
public override bool HandleMouseInput => true;
public LinkFlowContainer(Action<SpriteText> defaultCreationParameters = null) : base(defaultCreationParameters) public LinkFlowContainer(Action<SpriteText> defaultCreationParameters = null) : base(defaultCreationParameters)
{ {
@ -488,7 +489,9 @@ namespace osu.Game.Overlays.Profile
{ {
private readonly OsuHoverContainer content; private readonly OsuHoverContainer content;
public override bool HandleInput => content.Action != null; public override bool HandleKeyboardInput => handleInput;
public override bool HandleMouseInput => handleInput;
private bool handleInput => content.Action != null;
protected override Container<Drawable> Content => content ?? (Container<Drawable>)this; protected override Container<Drawable> Content => content ?? (Container<Drawable>)this;

View File

@ -87,7 +87,9 @@ namespace osu.Game.Overlays.Toolbar
ruleset.Value = rulesets.AvailableRulesets.FirstOrDefault(); ruleset.Value = rulesets.AvailableRulesets.FirstOrDefault();
} }
public override bool HandleInput => !ruleset.Disabled; public override bool HandleKeyboardInput => handleInput;
public override bool HandleMouseInput => handleInput;
private bool handleInput => !ruleset.Disabled;
private void disabledChanged(bool isDisabled) => this.FadeColour(isDisabled ? Color4.Gray : Color4.White, 300); private void disabledChanged(bool isDisabled) => this.FadeColour(isDisabled ? Color4.Gray : Color4.White, 300);

View File

@ -165,7 +165,8 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection
} }
private bool isActive = true; private bool isActive = true;
public override bool HandleInput => isActive; public override bool HandleKeyboardInput => isActive;
public override bool HandleMouseInput => isActive;
public override void Hide() public override void Hide()
{ {

View File

@ -68,7 +68,8 @@ namespace osu.Game.Rulesets.Objects.Drawables
private bool judgementFinalized => judgements.LastOrDefault()?.Final == true; private bool judgementFinalized => judgements.LastOrDefault()?.Final == true;
public bool Interactive = true; public bool Interactive = true;
public override bool HandleInput => Interactive; public override bool HandleKeyboardInput => Interactive;
public override bool HandleMouseInput => Interactive;
public override bool RemoveWhenNotAlive => false; public override bool RemoveWhenNotAlive => false;
public override bool RemoveCompletedTransforms => false; public override bool RemoveCompletedTransforms => false;

View File

@ -222,7 +222,9 @@ namespace osu.Game.Screens.Menu
boxHoverLayer.FadeOut(800, Easing.OutExpo); boxHoverLayer.FadeOut(800, Easing.OutExpo);
} }
public override bool HandleInput => state != ButtonState.Exploded && box.Scale.X >= 0.8f; public override bool HandleKeyboardInput => handleInput;
public override bool HandleMouseInput => handleInput;
private bool handleInput => state != ButtonState.Exploded && box.Scale.X >= 0.8f;
protected override void Update() protected override void Update()
{ {

View File

@ -199,7 +199,9 @@ namespace osu.Game.Screens.Menu
private MenuState state; private MenuState state;
public override bool HandleInput => state != MenuState.Exit; public override bool HandleKeyboardInput => handleInput;
public override bool HandleMouseInput => handleInput;
private bool handleInput=> state != MenuState.Exit;
public MenuState State public MenuState State
{ {

View File

@ -64,7 +64,8 @@ namespace osu.Game.Screens.Menu
private readonly float[] frequencyAmplitudes = new float[256]; private readonly float[] frequencyAmplitudes = new float[256];
public override bool HandleInput => false; public override bool HandleKeyboardInput => false;
public override bool HandleMouseInput => false;
private Shader shader; private Shader shader;
private readonly Texture texture; private readonly Texture texture;

View File

@ -19,7 +19,8 @@ namespace osu.Game.Screens.Menu
{ {
public class MenuSideFlashes : BeatSyncedContainer public class MenuSideFlashes : BeatSyncedContainer
{ {
public override bool HandleInput => false; public override bool HandleKeyboardInput => false;
public override bool HandleMouseInput => false;
private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>(); private readonly Bindable<WorkingBeatmap> beatmap = new Bindable<WorkingBeatmap>();

View File

@ -142,7 +142,9 @@ namespace osu.Game.Screens.Play
} }
} }
public override bool HandleInput => State == Visibility.Visible; public override bool HandleKeyboardInput => handleInput;
public override bool HandleMouseInput => handleInput;
private bool handleInput => State == Visibility.Visible;
protected override void PopIn() => this.FadeIn(transition_duration, Easing.In); protected override void PopIn() => this.FadeIn(transition_duration, Easing.In);
protected override void PopOut() => this.FadeOut(transition_duration, Easing.In); protected override void PopOut() => this.FadeOut(transition_duration, Easing.In);

View File

@ -111,7 +111,9 @@ namespace osu.Game.Screens.Play
} }
} }
public override bool HandleInput => receptor == null; public override bool HandleKeyboardInput => handleInput;
public override bool HandleMouseInput => handleInput;
private bool handleInput => receptor == null;
private Receptor receptor; private Receptor receptor;

View File

@ -28,7 +28,8 @@ namespace osu.Game.Screens.Play
public Action<double> OnSeek; public Action<double> OnSeek;
public override bool HandleInput => AllowSeeking; public override bool HandleKeyboardInput => AllowSeeking;
public override bool HandleMouseInput => AllowSeeking;
private IClock audioClock; private IClock audioClock;
public IClock AudioClock { set { audioClock = info.AudioClock = value; } } public IClock AudioClock { set { audioClock = info.AudioClock = value; } }

View File

@ -21,7 +21,8 @@ namespace osu.Game.Screens.Play
public int ColumnCount => columns.Length; public int ColumnCount => columns.Length;
public override bool HandleInput => false; public override bool HandleKeyboardInput => false;
public override bool HandleMouseInput => false;
private int progress; private int progress;
public int Progress public int Progress

View File

@ -51,7 +51,8 @@ namespace osu.Game.Screens.Select
/// </summary> /// </summary>
public Action<BeatmapInfo> SelectionChanged; public Action<BeatmapInfo> SelectionChanged;
public override bool HandleInput => AllowSelection; public override bool HandleKeyboardInput => AllowSelection;
public override bool HandleMouseInput => AllowSelection;
/// <summary> /// <summary>
/// Used to avoid firing null selections before the initial beatmaps have been loaded via <see cref="BeatmapSets"/>. /// Used to avoid firing null selections before the initial beatmaps have been loaded via <see cref="BeatmapSets"/>.

View File

@ -26,7 +26,8 @@ namespace osu.Game.Storyboards.Drawables
protected override Container<DrawableStoryboardLayer> Content => content; protected override Container<DrawableStoryboardLayer> Content => content;
protected override Vector2 DrawScale => new Vector2(Parent.DrawHeight / 480); protected override Vector2 DrawScale => new Vector2(Parent.DrawHeight / 480);
public override bool HandleInput => false; public override bool HandleKeyboardInput => false;
public override bool HandleMouseInput => false;
private bool passing = true; private bool passing = true;
public bool Passing public bool Passing