mirror of
https://github.com/ppy/osu.git
synced 2025-02-12 02:02:55 +08:00
Merge pull request #24528 from bdach/fix-dual-stages-skinnable-layer
Fix playfield skinnable layer bounds being incorrectly calculated with multiple stages
This commit is contained in:
commit
31c31a9359
@ -30,15 +30,15 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Stages.Count == 1)
|
||||
return Stages.First().ScreenSpaceDrawQuad;
|
||||
RectangleF totalArea = RectangleF.Empty;
|
||||
|
||||
RectangleF area = RectangleF.Empty;
|
||||
for (int i = 0; i < Stages.Count; ++i)
|
||||
{
|
||||
var stageArea = Stages[i].ScreenSpaceDrawQuad.AABBFloat;
|
||||
totalArea = i == 0 ? stageArea : RectangleF.Union(totalArea, stageArea);
|
||||
}
|
||||
|
||||
foreach (var stage in Stages)
|
||||
area = RectangleF.Union(area, stage.ScreenSpaceDrawQuad.AABBFloat);
|
||||
|
||||
return area;
|
||||
return totalArea;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user