1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 19:42:55 +08:00

Fix hold-for-right-click showing during gameplay

This commit is contained in:
Dean Herbert 2023-05-13 21:12:21 +09:00
parent 3e8711ed96
commit 8c542c6c51
3 changed files with 14 additions and 0 deletions

View File

@ -3,6 +3,7 @@
#nullable disable
using osu.Framework.Bindables;
using osu.Framework.Input;
using osuTK.Input;
@ -10,6 +11,10 @@ namespace osu.Game.Input
{
public partial class OsuUserInputManager : UserInputManager
{
protected override bool AllowRightClickFromLongTouch => !LocalUserPlaying.Value;
public readonly BindableBool LocalUserPlaying = new BindableBool();
internal OsuUserInputManager()
{
}

View File

@ -269,6 +269,13 @@ namespace osu.Game
if (hideToolbar) Toolbar.Hide();
}
protected override UserInputManager CreateUserInputManager()
{
var userInputManager = base.CreateUserInputManager();
(userInputManager as OsuUserInputManager)?.LocalUserPlaying.BindTo(LocalUserPlaying);
return userInputManager;
}
private DependencyContainer dependencies;
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) =>

View File

@ -28,6 +28,8 @@ namespace osu.Game.Rulesets.UI
public abstract partial class RulesetInputManager<T> : PassThroughInputManager, ICanAttachHUDPieces, IHasReplayHandler, IHasRecordingHandler
where T : struct
{
protected override bool AllowRightClickFromLongTouch => false;
public readonly KeyBindingContainer<T> KeyBindingContainer;
[Resolved(CanBeNull = true)]