-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29508 from peppy/hold-for-menu-sometimes
Change "hold for menu" button to only show for touch by default
- Loading branch information
Showing
7 changed files
with
43 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
#nullable disable | ||
|
||
using System.Linq; | ||
using NUnit.Framework; | ||
using osu.Framework.Allocation; | ||
using osu.Framework.Graphics; | ||
using osu.Framework.Graphics.Sprites; | ||
using osu.Framework.Testing; | ||
using osu.Game.Configuration; | ||
using osu.Game.Screens.Play.HUD; | ||
using osuTK; | ||
using osuTK.Input; | ||
|
@@ -21,11 +21,19 @@ public partial class TestSceneHoldForMenuButton : OsuManualInputManagerTestScene | |
|
||
protected override double TimePerAction => 100; // required for the early exit test, since hold-to-confirm delay is 200ms | ||
|
||
private HoldForMenuButton holdForMenuButton; | ||
private HoldForMenuButton holdForMenuButton = null!; | ||
|
||
[Resolved] | ||
private OsuConfigManager config { get; set; } = null!; | ||
|
||
[SetUpSteps] | ||
public void SetUpSteps() | ||
{ | ||
AddStep("set button always on", () => | ||
{ | ||
config.SetValue(OsuSetting.AlwaysShowHoldForMenuButton, true); | ||
}); | ||
|
||
AddStep("create button", () => | ||
{ | ||
exitAction = false; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters