1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 15:03:13 +08:00

Fix CI issues + minor issues

This commit is contained in:
Lucas A 2019-07-05 16:37:37 +02:00
parent 89acd9da3e
commit 5f8bd6eca7
4 changed files with 14 additions and 7 deletions

View File

@ -38,16 +38,16 @@ namespace osu.Game.Input.Bindings
new KeyBinding(InputKey.MouseWheelDown, GlobalAction.DecreaseVolume), new KeyBinding(InputKey.MouseWheelDown, GlobalAction.DecreaseVolume),
new KeyBinding(InputKey.F4, GlobalAction.ToggleMute), 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.Escape, GlobalAction.Back),
new KeyBinding(InputKey.MouseButton1, GlobalAction.Back), new KeyBinding(InputKey.MouseButton1, GlobalAction.Back),
new KeyBinding(InputKey.Space, GlobalAction.Select), new KeyBinding(InputKey.Space, GlobalAction.Select),
new KeyBinding(InputKey.Enter, GlobalAction.Select), new KeyBinding(InputKey.Enter, GlobalAction.Select),
new KeyBinding(InputKey.KeypadEnter, 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[] public IEnumerable<KeyBinding> InGameKeyBindings => new[]

View File

@ -724,20 +724,23 @@ namespace osu.Game
case GlobalAction.MusicPlay: case GlobalAction.MusicPlay:
if (!musicController.IsLoaded) return true; if (!musicController.IsLoaded) return true;
if (musicController.PlayTrack()) if (musicController.PlayTrack())
osd.Display(new Overlays.OSD.OsdIconToast(musicController.IsPlaying ? "Play track" : "Pause track", musicController.IsPlaying ? FontAwesome.Solid.PlayCircle : FontAwesome.Solid.PauseCircle)); osd.Display(new Overlays.OSD.OsdIconToast(musicController.IsPlaying ? "Play track" : "Pause track", musicController.IsPlaying ? FontAwesome.Solid.PlayCircle : FontAwesome.Solid.PauseCircle));
return true; return true;
case GlobalAction.MusicNext: case GlobalAction.MusicNext:
if (!musicController.IsLoaded) return true; if (!musicController.IsLoaded) return true;
if (musicController.NextTrack()) if (musicController.NextTrack())
osd.Display(new Overlays.OSD.OsdIconToast("Next track", FontAwesome.Solid.FastForward)); osd.Display(new Overlays.OSD.OsdIconToast("Next track", FontAwesome.Solid.FastForward));
return true; return true;
case GlobalAction.MusicPrev: case GlobalAction.MusicPrev:
if (!musicController.IsLoaded) return true; if (!musicController.IsLoaded) return true;
if (musicController.PreviousTrack()) 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; return true;
} }

View File

@ -551,6 +551,7 @@ namespace osu.Game.Overlays
/// <summary> /// <summary>
/// Play or pause the current beatmap track. /// Play or pause the current beatmap track.
/// </summary>
/// <returns>Returns whether the current track could be played / paused or not</returns> /// <returns>Returns whether the current track could be played / paused or not</returns>
public bool PlayTrack() public bool PlayTrack()
{ {

View File

@ -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.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics; using osu.Game.Graphics;
@ -12,7 +15,7 @@ namespace osu.Game.Overlays.OSD
{ {
Children = new Drawable[] Children = new Drawable[]
{ {
new FillFlowContainer() new FillFlowContainer
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,