mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Hide manual input manager cursor in OsuGameTestScene
s
Allows checking that the cursor is actually hidden in `TestSceneOsuGame.TestCursorHidesWhenIdle`.
This commit is contained in:
@ -36,21 +36,31 @@ namespace osu.Game.Tests.Visual
|
||||
/// </summary>
|
||||
protected virtual bool CreateNestedActionContainer => true;
|
||||
|
||||
/// <summary>
|
||||
/// Whether a menu cursor controlled by the manual input manager should be displayed.
|
||||
/// True by default, but is disabled for <see cref="OsuGameTestScene"/>s as they provide their own global cursor.
|
||||
/// </summary>
|
||||
protected virtual bool DisplayCursorForManualInput => true;
|
||||
|
||||
protected OsuManualInputManagerTestScene()
|
||||
{
|
||||
GlobalCursorDisplay cursorDisplay;
|
||||
var mainContent = content = new Container { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
CompositeDrawable mainContent = cursorDisplay = new GlobalCursorDisplay { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
cursorDisplay.Child = content = new OsuTooltipContainer(cursorDisplay.MenuCursor)
|
||||
if (DisplayCursorForManualInput)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
};
|
||||
var cursorDisplay = new GlobalCursorDisplay { RelativeSizeAxes = Axes.Both };
|
||||
|
||||
cursorDisplay.Add(new OsuTooltipContainer(cursorDisplay.MenuCursor)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Child = mainContent
|
||||
});
|
||||
|
||||
mainContent = cursorDisplay;
|
||||
}
|
||||
|
||||
if (CreateNestedActionContainer)
|
||||
{
|
||||
mainContent = new GlobalActionContainer(null).WithChild(mainContent);
|
||||
}
|
||||
|
||||
base.Content.AddRange(new Drawable[]
|
||||
{
|
||||
|
Reference in New Issue
Block a user