mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Add comments about why both positional input checks are required in OsuClickableContainer
This commit is contained in:
@ -61,7 +61,11 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
protected override Container<Drawable> Content { get; }
|
||||
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => base.ReceivePositionalInputAt(screenSpacePos) && Content.ReceivePositionalInputAt(screenSpacePos);
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) =>
|
||||
// base call is checked for cases when `OsuClickableContainer` has masking applied to it directly (ie. externally in object initialisation).
|
||||
base.ReceivePositionalInputAt(screenSpacePos)
|
||||
// Implementations often apply masking / edge rounding at a content level, so it's imperative to check that as well.
|
||||
&& Content.ReceivePositionalInputAt(screenSpacePos);
|
||||
|
||||
protected Box Hover;
|
||||
protected Box Background;
|
||||
|
Reference in New Issue
Block a user