mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 09:03:22 +08:00
Merge pull request #608 from Tom94/music-controller-button-animation
Music controller button animation
This commit is contained in:
commit
adc16b0727
@ -1 +1 @@
|
||||
Subproject commit a7c99e06ff4c3f56fad24bec170eb93f42b1e149
|
||||
Subproject commit 45e75163b272b7aa023afec7801ea079aba4ee69
|
@ -48,7 +48,7 @@ namespace osu.Game.Overlays
|
||||
|
||||
private const float progress_height = 10;
|
||||
|
||||
private const float bottom_black_area_height = 50;
|
||||
private const float bottom_black_area_height = 55;
|
||||
|
||||
public MusicController()
|
||||
{
|
||||
@ -144,7 +144,8 @@ namespace osu.Game.Overlays
|
||||
},
|
||||
playButton = new Button
|
||||
{
|
||||
//Scale = new Vector2(1.3f),
|
||||
Scale = new Vector2(1.4f),
|
||||
IconScale = new Vector2(1.4f),
|
||||
Action = () =>
|
||||
{
|
||||
if (current?.Track == null) return;
|
||||
@ -422,6 +423,13 @@ namespace osu.Game.Overlays
|
||||
}
|
||||
|
||||
private const float button_size = 30;
|
||||
private Color4 flashColour;
|
||||
|
||||
public Vector2 IconScale
|
||||
{
|
||||
get { return icon.Scale; }
|
||||
set { icon.Scale = value; }
|
||||
}
|
||||
|
||||
public Button()
|
||||
{
|
||||
@ -468,6 +476,7 @@ namespace osu.Game.Overlays
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
hover.Colour = colours.Yellow.Opacity(0.6f);
|
||||
flashColour = colours.Yellow;
|
||||
}
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
@ -482,9 +491,15 @@ namespace osu.Game.Overlays
|
||||
base.OnHoverLost(state);
|
||||
}
|
||||
|
||||
protected override bool OnClick(InputState state)
|
||||
{
|
||||
hover.FlashColour(flashColour, 800, EasingTypes.OutQuint);
|
||||
return base.OnClick(state);
|
||||
}
|
||||
|
||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||
{
|
||||
content.ScaleTo(1, 2000, EasingTypes.OutQuint);
|
||||
content.ScaleTo(0.75f, 2000, EasingTypes.OutQuint);
|
||||
return base.OnMouseDown(state, args);
|
||||
}
|
||||
|
||||
|
@ -43,8 +43,8 @@ namespace osu.Game.Overlays.Options.Sections.Audio
|
||||
// device names. Dropdowns, however, may not have multiple identical
|
||||
// keys. Thus, we remove duplicate audio device names from
|
||||
// the dropdown. BASS does not give us a simple mechanism to select
|
||||
// specific audio devices in such a case anyways.This functionality would
|
||||
// require OS-specific and involved code.
|
||||
// specific audio devices in such a case anyways. Such
|
||||
// functionality would require involved OS-specific code.
|
||||
dropdown.Items = deviceItems.Distinct().ToList();
|
||||
}
|
||||
|
||||
|
@ -194,8 +194,6 @@ namespace osu.Game.Screens.Menu
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override bool OnDragStart(InputState state) => true;
|
||||
|
||||
protected override bool OnClick(InputState state)
|
||||
{
|
||||
if (!Interactive) return false;
|
||||
|
Loading…
Reference in New Issue
Block a user