···34using System.Collections.Generic;
5using osu.Framework.Input;
6-using osuTK;
78namespace osu.Framework.Graphics.Containers
9{
···28 {
29 // when blocking non-positional input behind us, we still want to make sure the global handlers receive events
30 // but we don't want other drawables behind us handling them.
31- queue.RemoveAll(d => !(d is IHandleGlobalInput));
32 }
3334 return base.BuildNonPositionalInputQueue(queue, allowBlocking);
35 }
3637- internal override bool BuildPositionalInputQueue(Vector2 screenSpacePos, List<Drawable> queue)
38 {
39- if (PropagatePositionalInputSubTree && HandlePositionalInput && BlockPositionalInput && ReceivePositionalInputAt(screenSpacePos))
40 {
41- // when blocking positional input behind us, we still want to make sure the global handlers receive events
42- // but we don't want other drawables behind us handling them.
43- queue.RemoveAll(d => !(d is IHandleGlobalInput));
0000000044 }
4546- return base.BuildPositionalInputQueue(screenSpacePos, queue);
47 }
48 }
49}
···34using System.Collections.Generic;
5using osu.Framework.Input;
6+using osu.Framework.Input.Events;
78namespace osu.Framework.Graphics.Containers
9{
···28 {
29 // when blocking non-positional input behind us, we still want to make sure the global handlers receive events
30 // but we don't want other drawables behind us handling them.
31+ queue.RemoveAll(d => !(d is IHandleGlobalKeyboardInput));
32 }
3334 return base.BuildNonPositionalInputQueue(queue, allowBlocking);
35 }
3637+ protected override bool Handle(UIEvent e)
38 {
39+ switch (e)
40 {
41+ case ScrollEvent _:
42+ if (BlockPositionalInput && base.ReceivePositionalInputAt(e.ScreenSpaceMousePosition))
43+ return true;
44+45+ break;
46+47+ case MouseEvent _:
48+ if (BlockPositionalInput)
49+ return true;
50+51+ break;
52 }
5354+ return base.Handle(e);
55 }
56 }
57}
+1-1
osu.Framework/Graphics/Cursor/TooltipContainer.cs
···17 /// <summary>
18 /// Displays Tooltips for all its children that inherit from the <see cref="IHasTooltip"/> or <see cref="IHasCustomTooltip"/> interfaces. Keep in mind that only children with <see cref="Drawable.HandlePositionalInput"/> set to true will be checked for their tooltips.
19 /// </summary>
20- public class TooltipContainer : CursorEffectContainer<TooltipContainer, ITooltipContentProvider>, IHandleGlobalInput
21 {
22 private readonly CursorContainer cursorContainer;
23 private readonly ITooltip defaultTooltip;
···17 /// <summary>
18 /// Displays Tooltips for all its children that inherit from the <see cref="IHasTooltip"/> or <see cref="IHasCustomTooltip"/> interfaces. Keep in mind that only children with <see cref="Drawable.HandlePositionalInput"/> set to true will be checked for their tooltips.
19 /// </summary>
20+ public class TooltipContainer : CursorEffectContainer<TooltipContainer, ITooltipContentProvider>
21 {
22 private readonly CursorContainer cursorContainer;
23 private readonly ITooltip defaultTooltip;
···20 /// support for pinning items, causing them to be displayed before all other items at the
21 /// start of the list.
22 /// </summary>
000023 /// <typeparam name="T">The type of item to be represented by tabs.</typeparam>
24 public abstract class TabControl<T> : CompositeDrawable, IHasCurrentValue<T>, IKeyBindingHandler<PlatformAction>
25 {
···363 {
364 private bool allowMultiline;
365000366 public bool AllowMultiline
367 {
368 get => allowMultiline;
···20 /// support for pinning items, causing them to be displayed before all other items at the
21 /// start of the list.
22 /// </summary>
23+ /// <remarks>
24+ /// If a multi-line (or vertical) tab control is required, <see cref="TabFillFlowContainer.AllowMultiline"/> must be set to true.
25+ /// Without this, <see cref="TabControl{T}"/> will automatically hide extra items.
26+ /// </remarks>
27 /// <typeparam name="T">The type of item to be represented by tabs.</typeparam>
28 public abstract class TabControl<T> : CompositeDrawable, IHasCurrentValue<T>, IKeyBindingHandler<PlatformAction>
29 {
···367 {
368 private bool allowMultiline;
369370+ /// <summary>
371+ /// Whether tabs should be allowed to flow beyond a single line. If set to false, overflowing tabs will be automatically hidden.
372+ /// </summary>
373 public bool AllowMultiline
374 {
375 get => allowMultiline;
···4namespace osu.Framework.Input
5{
6 /// <summary>
7- /// Denotes that this class handles input globally.
8 /// </summary>
9- public interface IHandleGlobalInput
10 {
11 }
12}
···4namespace osu.Framework.Input
5{
6 /// <summary>
7+ /// Denotes that this class handles keyboard input globally.
8 /// </summary>
9+ public interface IHandleGlobalKeyboardInput
10 {
11 }
12}
+1-1
osu.Framework/Input/PlatformActionContainer.cs
···14 /// can be created to handle events that should trigger specifically on a focused drawable.
15 /// Will send repeat events by default.
16 /// </summary>
17- public class PlatformActionContainer : KeyBindingContainer<PlatformAction>, IHandleGlobalInput
18 {
19 [Resolved]
20 private GameHost host { get; set; }
···14 /// can be created to handle events that should trigger specifically on a focused drawable.
15 /// Will send repeat events by default.
16 /// </summary>
17+ public class PlatformActionContainer : KeyBindingContainer<PlatformAction>, IHandleGlobalKeyboardInput
18 {
19 [Resolved]
20 private GameHost host { get; set; }
+1-1
osu.Framework/Testing/TestBrowser.cs
···33namespace osu.Framework.Testing
34{
35 [Cached]
36- public class TestBrowser : KeyBindingContainer<TestBrowserAction>, IKeyBindingHandler<TestBrowserAction>, IHandleGlobalInput
37 {
38 public TestScene CurrentTest { get; private set; }
39
···33namespace osu.Framework.Testing
34{
35 [Cached]
36+ public class TestBrowser : KeyBindingContainer<TestBrowserAction>, IKeyBindingHandler<TestBrowserAction>, IHandleGlobalKeyboardInput
37 {
38 public TestScene CurrentTest { get; private set; }
39