Expose more pieces of TabletSettings

This commit is contained in:
Dean Herbert
2021-09-04 15:35:46 +09:00
parent cdd0262ca1
commit 16beb2c90c
2 changed files with 8 additions and 4 deletions

View File

@ -17,6 +17,8 @@ namespace osu.Game.Overlays.Settings.Sections.Input
{
public class TabletAreaSelection : CompositeDrawable
{
public bool IsWithinBounds { get; private set; }
private readonly ITabletHandler handler;
private Container tabletContainer;
@ -171,10 +173,10 @@ namespace osu.Game.Overlays.Settings.Sections.Input
var usableSsdq = usableAreaContainer.ScreenSpaceDrawQuad;
bool isWithinBounds = tabletContainer.ScreenSpaceDrawQuad.Contains(usableSsdq.TopLeft + new Vector2(1)) &&
tabletContainer.ScreenSpaceDrawQuad.Contains(usableSsdq.BottomRight - new Vector2(1));
IsWithinBounds = tabletContainer.ScreenSpaceDrawQuad.Contains(usableSsdq.TopLeft + new Vector2(1)) &&
tabletContainer.ScreenSpaceDrawQuad.Contains(usableSsdq.BottomRight - new Vector2(1));
usableFill.FadeColour(isWithinBounds ? colour.Blue : colour.RedLight, 100);
usableFill.FadeColour(IsWithinBounds ? colour.Blue : colour.RedLight, 100);
}
protected override void Update()