mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 08:32:57 +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:
parent
e3507d5453
commit
0c55bba220
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user