mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
Merge remote-tracking branch 'upstream/master' into scrolling-hitobjects-rewrite
This commit is contained in:
@ -691,19 +691,19 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
protected override Storyboard GetStoryboard()
|
protected override Storyboard GetStoryboard()
|
||||||
{
|
{
|
||||||
if (BeatmapInfo?.Path == null && BeatmapSetInfo?.StoryboardFile == null)
|
|
||||||
return new Storyboard();
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Decoder decoder;
|
|
||||||
using (var stream = new StreamReader(store.GetStream(getPathForFile(BeatmapInfo?.Path))))
|
|
||||||
decoder = Decoder.GetDecoder(stream);
|
|
||||||
|
|
||||||
// try for .osb first and fall back to .osu
|
using (var beatmap = new StreamReader(store.GetStream(getPathForFile(BeatmapInfo.Path))))
|
||||||
string storyboardFile = BeatmapSetInfo.StoryboardFile ?? BeatmapInfo.Path;
|
{
|
||||||
using (var stream = new StreamReader(store.GetStream(getPathForFile(storyboardFile))))
|
Decoder decoder = Decoder.GetDecoder(beatmap);
|
||||||
return decoder.GetStoryboardDecoder().DecodeStoryboard(stream);
|
|
||||||
|
if (BeatmapSetInfo?.StoryboardFile == null)
|
||||||
|
return decoder.GetStoryboardDecoder().DecodeStoryboard(beatmap);
|
||||||
|
|
||||||
|
using (var storyboard = new StreamReader(store.GetStream(getPathForFile(BeatmapSetInfo.StoryboardFile))))
|
||||||
|
return decoder.GetStoryboardDecoder().DecodeStoryboard(beatmap, storyboard);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
|
@ -70,10 +70,11 @@ namespace osu.Game.Beatmaps.Formats
|
|||||||
|
|
||||||
protected abstract void ParseBeatmap(StreamReader stream, Beatmap beatmap);
|
protected abstract void ParseBeatmap(StreamReader stream, Beatmap beatmap);
|
||||||
|
|
||||||
public virtual Storyboard DecodeStoryboard(StreamReader stream)
|
public virtual Storyboard DecodeStoryboard(params StreamReader[] streams)
|
||||||
{
|
{
|
||||||
var storyboard = new Storyboard();
|
var storyboard = new Storyboard();
|
||||||
ParseStoryboard(stream, storyboard);
|
foreach (StreamReader stream in streams)
|
||||||
|
ParseStoryboard(stream, storyboard);
|
||||||
return storyboard;
|
return storyboard;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,15 +33,6 @@ namespace osu.Game.Graphics.Containers
|
|||||||
// receive input outside our bounds so we can trigger a close event on ourselves.
|
// receive input outside our bounds so we can trigger a close event on ourselves.
|
||||||
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => BlockScreenWideMouse || base.ReceiveMouseInputAt(screenSpacePos);
|
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => BlockScreenWideMouse || base.ReceiveMouseInputAt(screenSpacePos);
|
||||||
|
|
||||||
protected override bool OnWheel(InputState state)
|
|
||||||
{
|
|
||||||
// always allow wheel to pass through to stuff outside our DrawRectangle.
|
|
||||||
if (!base.ReceiveMouseInputAt(state.Mouse.NativeState.Position))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return BlockPassThroughMouse;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnClick(InputState state)
|
protected override bool OnClick(InputState state)
|
||||||
{
|
{
|
||||||
if (!base.ReceiveMouseInputAt(state.Mouse.NativeState.Position))
|
if (!base.ReceiveMouseInputAt(state.Mouse.NativeState.Position))
|
||||||
|
@ -3,12 +3,13 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Input;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Game.Input.Bindings;
|
using osu.Game.Input.Bindings;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface.Volume
|
namespace osu.Game.Graphics.UserInterface.Volume
|
||||||
{
|
{
|
||||||
public class VolumeControlReceptor : Container, IKeyBindingHandler<GlobalAction>
|
public class VolumeControlReceptor : Container, IKeyBindingHandler<GlobalAction>, IHandleGlobalInput
|
||||||
{
|
{
|
||||||
public Func<GlobalAction, bool> ActionRequested;
|
public Func<GlobalAction, bool> ActionRequested;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user