mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 18:03:22 +08:00
Switch back to strings and update setting labels
This commit is contained in:
parent
d24fa18bc2
commit
c27751050b
@ -92,7 +92,7 @@ namespace osu.Game.Beatmaps.Formats
|
||||
var offset = Parsing.ParseInt(split[1]);
|
||||
var filename = CleanFilename(split[2]);
|
||||
|
||||
storyboard.GetLayer(LegacyStoryLayer.Video).Add(new StoryboardVideo(filename, offset));
|
||||
storyboard.GetLayer("Video").Add(new StoryboardVideo(filename, offset));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace osu.Game.Beatmaps.Legacy
|
||||
{
|
||||
public enum LegacyStoryLayer
|
||||
internal enum LegacyStoryLayer
|
||||
{
|
||||
Background = 0,
|
||||
Fail = 1,
|
||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
||||
{
|
||||
new SettingsCheckbox
|
||||
{
|
||||
LabelText = "Storyboards",
|
||||
LabelText = "Storyboard / Video",
|
||||
Bindable = config.GetBindable<bool>(OsuSetting.ShowStoryboard)
|
||||
},
|
||||
new SettingsCheckbox
|
||||
|
@ -42,7 +42,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
{
|
||||
Text = "Toggles:"
|
||||
},
|
||||
showStoryboardToggle = new PlayerCheckbox { LabelText = "Storyboards" },
|
||||
showStoryboardToggle = new PlayerCheckbox { LabelText = "Storyboard / Video" },
|
||||
beatmapSkinsToggle = new PlayerCheckbox { LabelText = "Beatmap skins" },
|
||||
beatmapHitsoundsToggle = new PlayerCheckbox { LabelText = "Beatmap hitsounds" }
|
||||
};
|
||||
|
@ -1,11 +1,10 @@
|
||||
// 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.Game.Beatmaps;
|
||||
using osu.Game.Beatmaps.Legacy;
|
||||
using osu.Game.Storyboards.Drawables;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Storyboards.Drawables;
|
||||
|
||||
namespace osu.Game.Storyboards
|
||||
{
|
||||
@ -29,8 +28,6 @@ namespace osu.Game.Storyboards
|
||||
layers.Add("Foreground", new StoryboardLayer("Foreground", 0));
|
||||
}
|
||||
|
||||
public StoryboardLayer GetLayer(LegacyStoryLayer layer) => GetLayer(layer.ToString());
|
||||
|
||||
public StoryboardLayer GetLayer(string name)
|
||||
{
|
||||
if (!layers.TryGetValue(name, out var layer))
|
||||
@ -50,17 +47,17 @@ namespace osu.Game.Storyboards
|
||||
if (backgroundPath == null)
|
||||
return false;
|
||||
|
||||
if (GetLayer(LegacyStoryLayer.Video).Elements.Any())
|
||||
if (GetLayer("Video").Elements.Any())
|
||||
return true;
|
||||
|
||||
return GetLayer(LegacyStoryLayer.Background).Elements.Any(e => e.Path.ToLowerInvariant() == backgroundPath);
|
||||
return GetLayer("Background").Elements.Any(e => e.Path.ToLowerInvariant() == backgroundPath);
|
||||
}
|
||||
}
|
||||
|
||||
public DrawableStoryboard CreateDrawable(WorkingBeatmap working = null)
|
||||
{
|
||||
var drawable = new DrawableStoryboard(this);
|
||||
drawable.Width = drawable.Height * (BeatmapInfo.WidescreenStoryboard || GetLayer(LegacyStoryLayer.Video).Elements.Any() ? 16 / 9f : 4 / 3f);
|
||||
drawable.Width = drawable.Height * (BeatmapInfo.WidescreenStoryboard || GetLayer("Video").Elements.Any() ? 16 / 9f : 4 / 3f);
|
||||
return drawable;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user