mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 20:07:29 +08:00
Simplify interaction condition
This commit is contained in:
parent
94a974a397
commit
938c5feea4
@ -146,7 +146,7 @@ namespace osu.Game.Overlays.Profile
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
{
|
||||
if (ranks != null && ranks.Length > 1)
|
||||
if (ranks?.Length > 1)
|
||||
{
|
||||
graph.UpdateBallPosition(state.Mouse.Position.X);
|
||||
graph.ShowBall();
|
||||
@ -156,7 +156,7 @@ namespace osu.Game.Overlays.Profile
|
||||
|
||||
protected override bool OnMouseMove(InputState state)
|
||||
{
|
||||
if (ranks != null && ranks.Length > 1)
|
||||
if (ranks?.Length > 1)
|
||||
graph.UpdateBallPosition(state.Mouse.Position.X);
|
||||
|
||||
return base.OnMouseMove(state);
|
||||
@ -164,7 +164,7 @@ namespace osu.Game.Overlays.Profile
|
||||
|
||||
protected override void OnHoverLost(InputState state)
|
||||
{
|
||||
if (ranks != null && ranks.Length > 1)
|
||||
if (ranks?.Length > 1)
|
||||
{
|
||||
graph.HideBall();
|
||||
updateRankTexts();
|
||||
|
Loading…
Reference in New Issue
Block a user