mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
Update framework with positional/non-positional changes
This commit is contained in:
@ -30,8 +30,8 @@ namespace osu.Game.Graphics.Backgrounds
|
||||
/// </summary>
|
||||
private const float edge_smoothness = 1;
|
||||
|
||||
public override bool HandleKeyboardInput => false;
|
||||
public override bool HandleMouseInput => false;
|
||||
public override bool HandleNonPositionalInput => false;
|
||||
public override bool HandlePositionalInput => false;
|
||||
|
||||
|
||||
public Color4 ColourLight = Color4.White;
|
||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Graphics.Containers
|
||||
{
|
||||
}
|
||||
|
||||
public override bool HandleMouseInput => true;
|
||||
public override bool HandlePositionalInput => true;
|
||||
|
||||
private OsuGame game;
|
||||
|
||||
|
@ -22,7 +22,7 @@ namespace osu.Game.Graphics.Containers
|
||||
|
||||
protected virtual bool PlaySamplesOnStateChange => true;
|
||||
|
||||
protected override bool BlockPassThroughKeyboard => true;
|
||||
protected override bool BlockNonPositionalInput => true;
|
||||
|
||||
private PreviewTrackManager previewTrackManager;
|
||||
|
||||
@ -54,14 +54,14 @@ namespace osu.Game.Graphics.Containers
|
||||
/// Whether mouse input should be blocked screen-wide while this overlay is visible.
|
||||
/// Performing mouse actions outside of the valid extents will hide the overlay.
|
||||
/// </summary>
|
||||
public virtual bool BlockScreenWideMouse => BlockPassThroughMouse;
|
||||
public virtual bool BlockScreenWideMouse => BlockPositionalInput;
|
||||
|
||||
// receive input outside our bounds so we can trigger a close event on ourselves.
|
||||
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => BlockScreenWideMouse || base.ReceiveMouseInputAt(screenSpacePos);
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => BlockScreenWideMouse || base.ReceivePositionalInputAt(screenSpacePos);
|
||||
|
||||
protected override bool OnClick(InputState state)
|
||||
{
|
||||
if (!base.ReceiveMouseInputAt(state.Mouse.NativeState.Position))
|
||||
if (!base.ReceivePositionalInputAt(state.Mouse.NativeState.Position))
|
||||
{
|
||||
State = Visibility.Hidden;
|
||||
return true;
|
||||
|
@ -54,7 +54,7 @@ namespace osu.Game.Graphics
|
||||
Scheduler.AddDelayed(updateTimeWithReschedule, timeUntilNextUpdate);
|
||||
}
|
||||
|
||||
public override bool HandleMouseInput => true;
|
||||
public override bool HandlePositionalInput => true;
|
||||
|
||||
protected virtual string Format() => Date.Humanize();
|
||||
|
||||
|
@ -47,10 +47,10 @@ namespace osu.Game.Graphics.UserInterface
|
||||
public readonly SpriteIcon Chevron;
|
||||
|
||||
//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 ReceivePositionalInputAt(Vector2 screenSpacePos) => Alpha == 1f && Text.ReceivePositionalInputAt(screenSpacePos);
|
||||
|
||||
public override bool HandleKeyboardInput => State == Visibility.Visible;
|
||||
public override bool HandleMouseInput => State == Visibility.Visible;
|
||||
public override bool HandleNonPositionalInput => State == Visibility.Visible;
|
||||
public override bool HandlePositionalInput => State == Visibility.Visible;
|
||||
public override bool IsRemovable => true;
|
||||
|
||||
private Visibility state;
|
||||
|
@ -211,7 +211,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
}
|
||||
}
|
||||
|
||||
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => backgroundContainer.ReceiveMouseInputAt(screenSpacePos);
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => backgroundContainer.ReceivePositionalInputAt(screenSpacePos);
|
||||
|
||||
protected override bool OnClick(InputState state)
|
||||
{
|
||||
|
@ -34,7 +34,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
}
|
||||
|
||||
// We may not be focused yet, but we need to handle keyboard input to be able to request focus
|
||||
public override bool HandleKeyboardInput => HoldFocus || base.HandleKeyboardInput;
|
||||
public override bool HandleNonPositionalInput => HoldFocus || base.HandleNonPositionalInput;
|
||||
|
||||
protected override void OnFocus(InputState state)
|
||||
{
|
||||
|
@ -170,7 +170,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
}
|
||||
}
|
||||
|
||||
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => IconLayer.ReceiveMouseInputAt(screenSpacePos) || TextLayer.ReceiveMouseInputAt(screenSpacePos);
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => IconLayer.ReceivePositionalInputAt(screenSpacePos) || TextLayer.ReceivePositionalInputAt(screenSpacePos);
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
{
|
||||
|
Reference in New Issue
Block a user