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:
parent
3e8711ed96
commit
8c542c6c51
@ -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()
|
||||
{
|
||||
}
|
||||
|
@ -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) =>
|
||||
|
@ -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)]
|
||||
|
Loading…
Reference in New Issue
Block a user