mirror of
https://github.com/osukey/osukey.git
synced 2025-06-24 04:38:02 +09:00
Adjust InputDrum's appearance a touch.
This commit is contained in:
parent
1af17fc108
commit
ef8830aa7f
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using System;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Input;
|
using OpenTK.Input;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -23,6 +24,8 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
{
|
{
|
||||||
Size = new Vector2(TaikoPlayfield.PlayfieldHeight);
|
Size = new Vector2(TaikoPlayfield.PlayfieldHeight);
|
||||||
|
|
||||||
|
const float middle_split = 10;
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new TaikoHalfDrum(false)
|
new TaikoHalfDrum(false)
|
||||||
@ -31,6 +34,7 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.CentreRight,
|
Origin = Anchor.CentreRight,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
X = -middle_split / 2,
|
||||||
RimKey = Key.D,
|
RimKey = Key.D,
|
||||||
CentreKey = Key.F
|
CentreKey = Key.F
|
||||||
},
|
},
|
||||||
@ -40,6 +44,7 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
X = middle_split / 2,
|
||||||
Position = new Vector2(-1f, 0),
|
Position = new Vector2(-1f, 0),
|
||||||
RimKey = Key.K,
|
RimKey = Key.K,
|
||||||
CentreKey = Key.J
|
CentreKey = Key.J
|
||||||
@ -85,7 +90,7 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
BlendingMode = BlendingMode.Additive
|
BlendingMode = BlendingMode.Additive,
|
||||||
},
|
},
|
||||||
centre = new Sprite
|
centre = new Sprite
|
||||||
{
|
{
|
||||||
@ -123,16 +128,18 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
if (args.Repeat)
|
if (args.Repeat)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (args.Key == CentreKey)
|
Drawable target = null;
|
||||||
{
|
|
||||||
centreHit.FadeIn();
|
|
||||||
centreHit.FadeOut(500, EasingTypes.OutQuint);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (args.Key == RimKey)
|
if (args.Key == CentreKey)
|
||||||
|
target = centreHit;
|
||||||
|
else if (args.Key == RimKey)
|
||||||
|
target = rimHit;
|
||||||
|
|
||||||
|
if (target != null)
|
||||||
{
|
{
|
||||||
rimHit.FadeIn();
|
target.FadeTo(Math.Min(target.Alpha + 0.4f, 1), 40, EasingTypes.OutQuint);
|
||||||
rimHit.FadeOut(500, EasingTypes.OutQuint);
|
target.Delay(40);
|
||||||
|
target.FadeOut(600, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user