mirror of
https://github.com/ppy/osu
synced 2025-01-07 06:40:05 +00:00
Expose more pieces of TabletSettings
This commit is contained in:
parent
cdd0262ca1
commit
16beb2c90c
@ -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()
|
||||
|
@ -20,6 +20,8 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
{
|
||||
public class TabletSettings : SettingsSubsection
|
||||
{
|
||||
public TabletAreaSelection AreaSelection { get; private set; }
|
||||
|
||||
private readonly ITabletHandler tabletHandler;
|
||||
|
||||
private readonly Bindable<bool> enabled = new BindableBool(true);
|
||||
@ -121,7 +123,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
Direction = FillDirection.Vertical,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new TabletAreaSelection(tabletHandler)
|
||||
AreaSelection = new TabletAreaSelection(tabletHandler)
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 300,
|
||||
|
Loading…
Reference in New Issue
Block a user