mirror of
https://github.com/osukey/osukey.git
synced 2025-04-29 02:37:25 +09:00
Fix hold-for-right-click showing during gameplay
This commit is contained in:
parent
3e8711ed96
commit
8c542c6c51
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
using osuTK.Input;
|
using osuTK.Input;
|
||||||
|
|
||||||
@ -10,6 +11,10 @@ namespace osu.Game.Input
|
|||||||
{
|
{
|
||||||
public partial class OsuUserInputManager : UserInputManager
|
public partial class OsuUserInputManager : UserInputManager
|
||||||
{
|
{
|
||||||
|
protected override bool AllowRightClickFromLongTouch => !LocalUserPlaying.Value;
|
||||||
|
|
||||||
|
public readonly BindableBool LocalUserPlaying = new BindableBool();
|
||||||
|
|
||||||
internal OsuUserInputManager()
|
internal OsuUserInputManager()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -269,6 +269,13 @@ namespace osu.Game
|
|||||||
if (hideToolbar) Toolbar.Hide();
|
if (hideToolbar) Toolbar.Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override UserInputManager CreateUserInputManager()
|
||||||
|
{
|
||||||
|
var userInputManager = base.CreateUserInputManager();
|
||||||
|
(userInputManager as OsuUserInputManager)?.LocalUserPlaying.BindTo(LocalUserPlaying);
|
||||||
|
return userInputManager;
|
||||||
|
}
|
||||||
|
|
||||||
private DependencyContainer dependencies;
|
private DependencyContainer dependencies;
|
||||||
|
|
||||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) =>
|
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
|
public abstract partial class RulesetInputManager<T> : PassThroughInputManager, ICanAttachHUDPieces, IHasReplayHandler, IHasRecordingHandler
|
||||||
where T : struct
|
where T : struct
|
||||||
{
|
{
|
||||||
|
protected override bool AllowRightClickFromLongTouch => false;
|
||||||
|
|
||||||
public readonly KeyBindingContainer<T> KeyBindingContainer;
|
public readonly KeyBindingContainer<T> KeyBindingContainer;
|
||||||
|
|
||||||
[Resolved(CanBeNull = true)]
|
[Resolved(CanBeNull = true)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user