AlwaysReceiveInput and InternalContains.

This commit is contained in:
Dean Herbert
2017-03-16 17:38:36 +09:00
parent e17f728282
commit ab8a5afdb9
19 changed files with 43 additions and 50 deletions

View File

@ -18,10 +18,10 @@ namespace osu.Game.Graphics.Containers
private Bindable<bool> parallaxEnabled;
public override bool Contains(Vector2 screenSpacePos) => true;
public ParallaxContainer()
{
AlwaysReceiveInput = true;
RelativeSizeAxes = Axes.Both;
AddInternal(content = new Container
{

View File

@ -18,7 +18,6 @@ namespace osu.Game.Graphics.Cursor
{
internal class CursorTrail : Drawable
{
public override bool Contains(Vector2 screenSpacePos) => true;
public override bool HandleInput => true;
private int currentIndex;
@ -59,6 +58,7 @@ namespace osu.Game.Graphics.Cursor
public CursorTrail()
{
AlwaysReceiveInput = true;
RelativeSizeAxes = Axes.Both;
for (int i = 0; i < max_sprites; i++)

View File

@ -10,10 +10,9 @@ namespace osu.Game.Graphics.Processing
{
internal class RatioAdjust : Container
{
public override bool Contains(Vector2 screenSpacePos) => true;
public RatioAdjust()
{
AlwaysReceiveInput = true;
RelativeSizeAxes = Axes.Both;
}

View File

@ -88,7 +88,7 @@ namespace osu.Game.Graphics.UserInterface
private bool didClick; // Used for making sure that the OnMouseDown animation can call instead of OnHoverLost's when clicking
public override bool Contains(Vector2 screenSpacePos) => backgroundContainer.Contains(screenSpacePos);
protected override bool InternalContains(Vector2 screenSpacePos) => backgroundContainer.Contains(screenSpacePos);
protected override bool OnClick(Framework.Input.InputState state)
{

View File

@ -158,7 +158,7 @@ namespace osu.Game.Graphics.UserInterface
}
}
public override bool Contains(Vector2 screenSpacePos) => IconLayer.Contains(screenSpacePos) || TextLayer.Contains(screenSpacePos);
protected override bool InternalContains(Vector2 screenSpacePos) => IconLayer.Contains(screenSpacePos) || TextLayer.Contains(screenSpacePos);
protected override bool OnHover(InputState state)
{