1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 10:03:05 +08:00

Simplify container logic

This commit is contained in:
Joseph Madamba 2023-01-16 23:24:47 -08:00
parent b5caa1b778
commit 08c570849f

View File

@ -46,8 +46,6 @@ namespace osu.Game.Tests.Visual
{ {
var mainContent = content = new Container { RelativeSizeAxes = Axes.Both }; var mainContent = content = new Container { RelativeSizeAxes = Axes.Both };
var inputContainer = new Container { RelativeSizeAxes = Axes.Both };
if (DisplayCursorForManualInput) if (DisplayCursorForManualInput)
{ {
var cursorDisplay = new GlobalCursorDisplay { RelativeSizeAxes = Axes.Both }; var cursorDisplay = new GlobalCursorDisplay { RelativeSizeAxes = Axes.Both };
@ -57,12 +55,11 @@ namespace osu.Game.Tests.Visual
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}); });
inputContainer.Add(cursorDisplay); mainContent.Add(cursorDisplay);
mainContent = inputContainer;
} }
if (CreateNestedActionContainer) if (CreateNestedActionContainer)
inputContainer.Add(new GlobalActionContainer(null)); mainContent.Add(new GlobalActionContainer(null));
base.Content.AddRange(new Drawable[] base.Content.AddRange(new Drawable[]
{ {