mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 23:23:04 +08:00
Merge pull request #1877 from smoogipoo/overlaycontainer-mouse-block
Allow mouse wheel to change volume in overlays
This commit is contained in:
commit
f6e6701749
@ -1 +1 @@
|
|||||||
Subproject commit 80bcb82ef8d2e1af1ce077f4a037b6d279ad9e74
|
Subproject commit 65947291229541de3eb1aff0e703f6968b07f976
|
@ -33,15 +33,6 @@ namespace osu.Game.Graphics.Containers
|
|||||||
// receive input outside our bounds so we can trigger a close event on ourselves.
|
// receive input outside our bounds so we can trigger a close event on ourselves.
|
||||||
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => BlockScreenWideMouse || base.ReceiveMouseInputAt(screenSpacePos);
|
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => BlockScreenWideMouse || base.ReceiveMouseInputAt(screenSpacePos);
|
||||||
|
|
||||||
protected override bool OnWheel(InputState state)
|
|
||||||
{
|
|
||||||
// always allow wheel to pass through to stuff outside our DrawRectangle.
|
|
||||||
if (!base.ReceiveMouseInputAt(state.Mouse.NativeState.Position))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return BlockPassThroughMouse;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnClick(InputState state)
|
protected override bool OnClick(InputState state)
|
||||||
{
|
{
|
||||||
if (!base.ReceiveMouseInputAt(state.Mouse.NativeState.Position))
|
if (!base.ReceiveMouseInputAt(state.Mouse.NativeState.Position))
|
||||||
|
@ -3,12 +3,13 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Input;
|
||||||
using osu.Framework.Input.Bindings;
|
using osu.Framework.Input.Bindings;
|
||||||
using osu.Game.Input.Bindings;
|
using osu.Game.Input.Bindings;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.UserInterface.Volume
|
namespace osu.Game.Graphics.UserInterface.Volume
|
||||||
{
|
{
|
||||||
public class VolumeControlReceptor : Container, IKeyBindingHandler<GlobalAction>
|
public class VolumeControlReceptor : Container, IKeyBindingHandler<GlobalAction>, IHandleGlobalInput
|
||||||
{
|
{
|
||||||
public Func<GlobalAction, bool> ActionRequested;
|
public Func<GlobalAction, bool> ActionRequested;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user