mirror of
https://github.com/ppy/osu.git
synced 2026-05-31 07:09:54 +08:00
Allow storyboards to be widescreen if only a video element exists
This matches stable behaviour, which will allow videos to display filling the screen if they are the only thing contained within the "storyboard".
This commit is contained in:
@@ -57,9 +57,12 @@ namespace osu.Game.Storyboards.Drawables
|
||||
public DrawableStoryboard(Storyboard storyboard)
|
||||
{
|
||||
Storyboard = storyboard;
|
||||
|
||||
Size = new Vector2(640, 480);
|
||||
|
||||
Width = Height * (storyboard.BeatmapInfo.WidescreenStoryboard ? 16 / 9f : 4 / 3f);
|
||||
bool onlyHasVideoElements = !Storyboard.Layers.Any(l => l.Elements.Any(e => !(e is StoryboardVideo)));
|
||||
|
||||
Width = Height * (storyboard.BeatmapInfo.WidescreenStoryboard || onlyHasVideoElements ? 16 / 9f : 4 / 3f);
|
||||
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
|
||||
Reference in New Issue
Block a user