mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 09:05:59 +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.Delay(40);
|
||||
target.FadeOut(600, EasingTypes.OutQuint);
|
||||
target.FadeOut(1000, EasingTypes.OutQuint);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -20,9 +20,11 @@ namespace osu.Game.Graphics.Cursor
|
||||
{
|
||||
protected override Drawable CreateCursor() => new Cursor();
|
||||
|
||||
private bool dragging;
|
||||
|
||||
protected override bool OnMouseMove(InputState state)
|
||||
{
|
||||
if (state.Mouse.HasMainButtonPressed)
|
||||
if (dragging)
|
||||
{
|
||||
Vector2 offset = state.Mouse.Position - state.Mouse.PositionMouseDown ?? state.Mouse.Delta;
|
||||
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);
|
||||
}
|
||||
|
||||
protected override bool OnDragStart(InputState state)
|
||||
{
|
||||
dragging = true;
|
||||
return base.OnDragStart(state);
|
||||
}
|
||||
|
||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||
{
|
||||
ActiveCursor.Scale = new Vector2(1);
|
||||
@ -53,6 +61,8 @@ namespace osu.Game.Graphics.Cursor
|
||||
{
|
||||
if (!state.Mouse.HasMainButtonPressed)
|
||||
{
|
||||
dragging = false;
|
||||
|
||||
((Cursor)ActiveCursor).AdditiveLayer.FadeOut(500, EasingTypes.OutQuint);
|
||||
ActiveCursor.RotateTo(0, 600 * (1 + Math.Abs(ActiveCursor.Rotation / 720)), EasingTypes.OutElasticHalf);
|
||||
ActiveCursor.ScaleTo(1, 500, EasingTypes.OutElastic);
|
||||
|
@ -13,14 +13,14 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
{
|
||||
public class DrawableRank : Container
|
||||
{
|
||||
private readonly Sprite sprite;
|
||||
private readonly Sprite rankSprite;
|
||||
|
||||
public ScoreRank Rank { get; private set; }
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(TextureStore textures)
|
||||
{
|
||||
sprite.Texture = textures.Get($@"Badges/ScoreRanks/{Rank.GetDescription()}");
|
||||
rankSprite.Texture = textures.Get($@"Grades/{Rank.GetDescription()}");
|
||||
}
|
||||
|
||||
public DrawableRank(ScoreRank rank)
|
||||
@ -29,10 +29,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
sprite = new Sprite
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
},
|
||||
rankSprite = new Sprite { FillMode = FillMode.Fill },
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user