mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Change signature to new event handler
This commit is contained in:
@ -9,7 +9,7 @@ using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.Input.States;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Users;
|
||||
@ -153,13 +153,13 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
this.hoverLostAction = hoverLostAction;
|
||||
}
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
protected override bool OnHover(HoverEvent e)
|
||||
{
|
||||
hoverAction();
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(InputState state) => hoverLostAction();
|
||||
protected override void OnHoverLost(HoverLostEvent e) => hoverLostAction();
|
||||
}
|
||||
|
||||
private class DrawableBadge : Container, IHasTooltip
|
||||
|
@ -10,7 +10,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Input.States;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
@ -137,25 +137,25 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
relativeText.Text = dayIndex + 1 == ranks.Length ? "Now" : $"{ranked_days - ranks[dayIndex].Key} days ago";
|
||||
}
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
protected override bool OnHover(HoverEvent e)
|
||||
{
|
||||
if (ranks?.Length > 1)
|
||||
{
|
||||
graph.UpdateBallPosition(state.Mouse.Position.X);
|
||||
graph.UpdateBallPosition(e.Mouse.Position.X);
|
||||
graph.ShowBall();
|
||||
}
|
||||
return base.OnHover(state);
|
||||
return base.OnHover(e);
|
||||
}
|
||||
|
||||
protected override bool OnMouseMove(InputState state)
|
||||
protected override bool OnMouseMove(MouseMoveEvent e)
|
||||
{
|
||||
if (ranks?.Length > 1)
|
||||
graph.UpdateBallPosition(state.Mouse.Position.X);
|
||||
graph.UpdateBallPosition(e.Mouse.Position.X);
|
||||
|
||||
return base.OnMouseMove(state);
|
||||
return base.OnMouseMove(e);
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(InputState state)
|
||||
protected override void OnHoverLost(HoverLostEvent e)
|
||||
{
|
||||
if (ranks?.Length > 1)
|
||||
{
|
||||
@ -163,7 +163,7 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
updateRankTexts();
|
||||
}
|
||||
|
||||
base.OnHoverLost(state);
|
||||
base.OnHoverLost(e);
|
||||
}
|
||||
|
||||
private class RankChartLineGraph : LineGraph
|
||||
|
@ -6,7 +6,7 @@ using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Input.States;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
@ -105,20 +105,20 @@ namespace osu.Game.Overlays.Profile.Sections
|
||||
coloredBackground.Colour = underscoreLine.Colour = colour.Gray4;
|
||||
}
|
||||
|
||||
protected override bool OnClick(InputState state) => true;
|
||||
protected override bool OnClick(ClickEvent e) => true;
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
protected override bool OnHover(HoverEvent e)
|
||||
{
|
||||
background.FadeIn(fade_duration, Easing.OutQuint);
|
||||
underscoreLine.FadeOut(fade_duration, Easing.OutQuint);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void OnHoverLost(InputState state)
|
||||
protected override void OnHoverLost(HoverLostEvent e)
|
||||
{
|
||||
background.FadeOut(fade_duration, Easing.OutQuint);
|
||||
underscoreLine.FadeIn(fade_duration, Easing.OutQuint);
|
||||
base.OnHoverLost(state);
|
||||
base.OnHoverLost(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Input.States;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
@ -70,7 +70,7 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
|
||||
};
|
||||
}
|
||||
|
||||
protected override bool OnClick(InputState state) => true;
|
||||
protected override bool OnClick(ClickEvent e) => true;
|
||||
|
||||
private class CountSection : Container
|
||||
{
|
||||
|
Reference in New Issue
Block a user