mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Move logic out of OsuGame
This commit is contained in:
@ -68,8 +68,6 @@ namespace osu.Game
|
||||
|
||||
private BeatmapSetOverlay beatmapSetOverlay;
|
||||
|
||||
private OnScreenDisplay osd;
|
||||
|
||||
[Cached]
|
||||
private readonly ScreenshotManager screenshotManager = new ScreenshotManager();
|
||||
|
||||
@ -469,7 +467,7 @@ namespace osu.Game
|
||||
});
|
||||
|
||||
loadComponentSingleFile(volume = new VolumeOverlay(), leftFloatingOverlayContent.Add);
|
||||
loadComponentSingleFile(osd = new OnScreenDisplay(), Add, true);
|
||||
loadComponentSingleFile(new OnScreenDisplay(), Add, true);
|
||||
|
||||
loadComponentSingleFile(musicController = new MusicController(), Add, true);
|
||||
|
||||
@ -734,27 +732,6 @@ namespace osu.Game
|
||||
case GlobalAction.ToggleGameplayMouseButtons:
|
||||
LocalConfig.Set(OsuSetting.MouseDisableButtons, !LocalConfig.Get<bool>(OsuSetting.MouseDisableButtons));
|
||||
return true;
|
||||
|
||||
case GlobalAction.MusicPlay:
|
||||
if (!musicController.IsLoaded) return true;
|
||||
|
||||
if (musicController.PlayTrack())
|
||||
osd.Display(new Overlays.OSD.MusicControllerToast(musicController.IsPlaying ? "Play track" : "Pause track"));
|
||||
return true;
|
||||
|
||||
case GlobalAction.MusicNext:
|
||||
if (!musicController.IsLoaded) return true;
|
||||
|
||||
if (musicController.NextTrack())
|
||||
osd.Display(new Overlays.OSD.MusicControllerToast("Next track"));
|
||||
return true;
|
||||
|
||||
case GlobalAction.MusicPrev:
|
||||
if (!musicController.IsLoaded) return true;
|
||||
|
||||
if (musicController.PreviousTrack())
|
||||
osd.Display(new Overlays.OSD.MusicControllerToast("Previous track"));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user