mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Tidy up draw hierarchy and bindable logic
This commit is contained in:
@ -25,7 +25,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
|
||||
private readonly Bindable<Size> areaOffset = new BindableSize();
|
||||
private readonly Bindable<Size> areaSize = new BindableSize();
|
||||
private readonly Bindable<Size> tabletSize = new BindableSize();
|
||||
private readonly IBindable<Size> tabletSize = new BindableSize();
|
||||
|
||||
private OsuSpriteText tabletName;
|
||||
|
||||
@ -95,7 +95,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
checkBounds();
|
||||
}, true);
|
||||
|
||||
((IBindable<Size>)tabletSize).BindTo(handler.TabletSize);
|
||||
tabletSize.BindTo(handler.TabletSize);
|
||||
tabletSize.BindValueChanged(val =>
|
||||
{
|
||||
tabletContainer.Size = new Vector2(val.NewValue.Width, val.NewValue.Height);
|
||||
@ -123,6 +123,9 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
|
||||
var size = tabletSize.Value;
|
||||
|
||||
if (size == System.Drawing.Size.Empty)
|
||||
return;
|
||||
|
||||
float fitX = size.Width / DrawWidth;
|
||||
float fitY = size.Height / DrawHeight;
|
||||
|
||||
|
Reference in New Issue
Block a user