mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 04:22:55 +08:00
Merge remote-tracking branch 'origin/master' into taiko_drumroll_drawable
This commit is contained in:
commit
4c7a724beb
@ -1 +1 @@
|
|||||||
Subproject commit 2d8a6c1699ff1acd3915fc28e8906dabf1b145a3
|
Subproject commit e67453159540f5008b5efadfbc12dfb3f4bee1f7
|
@ -139,7 +139,7 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
{
|
{
|
||||||
target.FadeTo(Math.Min(target.Alpha + 0.4f, 1), 40, EasingTypes.OutQuint);
|
target.FadeTo(Math.Min(target.Alpha + 0.4f, 1), 40, EasingTypes.OutQuint);
|
||||||
target.Delay(40);
|
target.Delay(40);
|
||||||
target.FadeOut(600, EasingTypes.OutQuint);
|
target.FadeOut(1000, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -20,9 +20,11 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
{
|
{
|
||||||
protected override Drawable CreateCursor() => new Cursor();
|
protected override Drawable CreateCursor() => new Cursor();
|
||||||
|
|
||||||
|
private bool dragging;
|
||||||
|
|
||||||
protected override bool OnMouseMove(InputState state)
|
protected override bool OnMouseMove(InputState state)
|
||||||
{
|
{
|
||||||
if (state.Mouse.HasMainButtonPressed)
|
if (dragging)
|
||||||
{
|
{
|
||||||
Vector2 offset = state.Mouse.Position - state.Mouse.PositionMouseDown ?? state.Mouse.Delta;
|
Vector2 offset = state.Mouse.Position - state.Mouse.PositionMouseDown ?? state.Mouse.Delta;
|
||||||
float degrees = (float)MathHelper.RadiansToDegrees(Math.Atan2(-offset.X, offset.Y)) + 24.3f;
|
float degrees = (float)MathHelper.RadiansToDegrees(Math.Atan2(-offset.X, offset.Y)) + 24.3f;
|
||||||
@ -39,6 +41,12 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
return base.OnMouseMove(state);
|
return base.OnMouseMove(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override bool OnDragStart(InputState state)
|
||||||
|
{
|
||||||
|
dragging = true;
|
||||||
|
return base.OnDragStart(state);
|
||||||
|
}
|
||||||
|
|
||||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||||
{
|
{
|
||||||
ActiveCursor.Scale = new Vector2(1);
|
ActiveCursor.Scale = new Vector2(1);
|
||||||
@ -53,6 +61,8 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
{
|
{
|
||||||
if (!state.Mouse.HasMainButtonPressed)
|
if (!state.Mouse.HasMainButtonPressed)
|
||||||
{
|
{
|
||||||
|
dragging = false;
|
||||||
|
|
||||||
((Cursor)ActiveCursor).AdditiveLayer.FadeOut(500, EasingTypes.OutQuint);
|
((Cursor)ActiveCursor).AdditiveLayer.FadeOut(500, EasingTypes.OutQuint);
|
||||||
ActiveCursor.RotateTo(0, 600 * (1 + Math.Abs(ActiveCursor.Rotation / 720)), EasingTypes.OutElasticHalf);
|
ActiveCursor.RotateTo(0, 600 * (1 + Math.Abs(ActiveCursor.Rotation / 720)), EasingTypes.OutElasticHalf);
|
||||||
ActiveCursor.ScaleTo(1, 500, EasingTypes.OutElastic);
|
ActiveCursor.ScaleTo(1, 500, EasingTypes.OutElastic);
|
||||||
|
@ -13,14 +13,14 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
{
|
{
|
||||||
public class DrawableRank : Container
|
public class DrawableRank : Container
|
||||||
{
|
{
|
||||||
private readonly Sprite sprite;
|
private readonly Sprite rankSprite;
|
||||||
|
|
||||||
public ScoreRank Rank { get; private set; }
|
public ScoreRank Rank { get; private set; }
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(TextureStore textures)
|
private void load(TextureStore textures)
|
||||||
{
|
{
|
||||||
sprite.Texture = textures.Get($@"Badges/ScoreRanks/{Rank.GetDescription()}");
|
rankSprite.Texture = textures.Get($@"Grades/{Rank.GetDescription()}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public DrawableRank(ScoreRank rank)
|
public DrawableRank(ScoreRank rank)
|
||||||
@ -29,10 +29,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
sprite = new Sprite
|
rankSprite = new Sprite { FillMode = FillMode.Fill },
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user