mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 14:57:52 +08:00
Fix CI issues + minor issues
This commit is contained in:
parent
89acd9da3e
commit
5f8bd6eca7
@ -38,16 +38,16 @@ namespace osu.Game.Input.Bindings
|
||||
new KeyBinding(InputKey.MouseWheelDown, GlobalAction.DecreaseVolume),
|
||||
new KeyBinding(InputKey.F4, GlobalAction.ToggleMute),
|
||||
|
||||
new KeyBinding(InputKey.F5, GlobalAction.MusicPrev),
|
||||
new KeyBinding(InputKey.F6, GlobalAction.MusicNext),
|
||||
new KeyBinding(InputKey.X, GlobalAction.MusicPlay),
|
||||
|
||||
new KeyBinding(InputKey.Escape, GlobalAction.Back),
|
||||
new KeyBinding(InputKey.MouseButton1, GlobalAction.Back),
|
||||
|
||||
new KeyBinding(InputKey.Space, GlobalAction.Select),
|
||||
new KeyBinding(InputKey.Enter, GlobalAction.Select),
|
||||
new KeyBinding(InputKey.KeypadEnter, GlobalAction.Select),
|
||||
|
||||
new KeyBinding(InputKey.F5, GlobalAction.MusicPrev),
|
||||
new KeyBinding(InputKey.F6, GlobalAction.MusicNext),
|
||||
new KeyBinding(InputKey.X, GlobalAction.MusicPlay),
|
||||
};
|
||||
|
||||
public IEnumerable<KeyBinding> InGameKeyBindings => new[]
|
||||
|
@ -724,20 +724,23 @@ namespace osu.Game
|
||||
|
||||
case GlobalAction.MusicPlay:
|
||||
if (!musicController.IsLoaded) return true;
|
||||
|
||||
if (musicController.PlayTrack())
|
||||
osd.Display(new Overlays.OSD.OsdIconToast(musicController.IsPlaying ? "Play track" : "Pause track", musicController.IsPlaying ? FontAwesome.Solid.PlayCircle : FontAwesome.Solid.PauseCircle));
|
||||
return true;
|
||||
|
||||
case GlobalAction.MusicNext:
|
||||
if (!musicController.IsLoaded) return true;
|
||||
|
||||
if (musicController.NextTrack())
|
||||
osd.Display(new Overlays.OSD.OsdIconToast("Next track", FontAwesome.Solid.FastForward));
|
||||
return true;
|
||||
|
||||
case GlobalAction.MusicPrev:
|
||||
if (!musicController.IsLoaded) return true;
|
||||
|
||||
if (musicController.PreviousTrack())
|
||||
osd.Display(new Overlays.OSD.OsdIconToast("Previous track", FontAwesome.Solid.FastForward));
|
||||
osd.Display(new Overlays.OSD.OsdIconToast("Previous track", FontAwesome.Solid.FastBackward));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -551,6 +551,7 @@ namespace osu.Game.Overlays
|
||||
|
||||
/// <summary>
|
||||
/// Play or pause the current beatmap track.
|
||||
/// </summary>
|
||||
/// <returns>Returns whether the current track could be played / paused or not</returns>
|
||||
public bool PlayTrack()
|
||||
{
|
||||
|
@ -1,4 +1,7 @@
|
||||
using osu.Framework.Graphics;
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics;
|
||||
@ -12,7 +15,7 @@ namespace osu.Game.Overlays.OSD
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new FillFlowContainer()
|
||||
new FillFlowContainer
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
|
Loading…
Reference in New Issue
Block a user