1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 00:47:24 +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.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[]

View File

@ -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;
}

View File

@ -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()
{

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.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,