1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 20:05:29 +08:00

Tidy up visual appearance of settings and add a reset button

This commit is contained in:
Dean Herbert 2021-03-16 16:24:51 +09:00
parent 2dc2cb04c3
commit 9b70f0ee1f

View File

@ -66,6 +66,8 @@ namespace osu.Game.Overlays.Settings.Sections.Input
offsetY.MaxValue = val.NewValue.Height;
sizeY.Default = sizeY.MaxValue = val.NewValue.Height;
areaSize.Default = new Size(sizeX.Default, sizeY.Default);
updateDisplay();
}, true);
}
@ -77,31 +79,44 @@ namespace osu.Game.Overlays.Settings.Sections.Input
Children = new Drawable[]
{
new SettingsSlider<int>
{
LabelText = "Offset X",
Current = offsetX
},
new SettingsSlider<int>
{
LabelText = "Offset Y",
Current = offsetY
},
new SettingsSlider<int>
{
LabelText = "Size X",
Current = sizeX
},
new SettingsSlider<int>
{
LabelText = "Size Y",
Current = sizeY
},
new TabletAreaSelection(tabletHandler)
{
RelativeSizeAxes = Axes.X,
Height = 300,
}
},
new SettingsButton
{
Text = "Reset to full area",
Action = () =>
{
areaOffset.SetDefault();
areaSize.SetDefault();
},
},
new SettingsCheckbox
{
LabelText = "Lock aspect ratio",
},
new SettingsSlider<int>
{
LabelText = "X Offset",
Current = offsetX
},
new SettingsSlider<int>
{
LabelText = "Y Offset",
Current = offsetY
},
new SettingsSlider<int>
{
LabelText = "Width",
Current = sizeX
},
new SettingsSlider<int>
{
LabelText = "Height",
Current = sizeY
},
};
}
}