mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 15:12:57 +08:00
Fix menu cursor size not sticking on startup.
Also tidied up bindables.
This commit is contained in:
parent
7b06f31ddf
commit
537f0b9340
@ -54,8 +54,6 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
cursorScale = config.GetBindable<double>(OsuConfig.GameplayCursorSize);
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
cursorContainer = new CircularContainer
|
cursorContainer = new CircularContainer
|
||||||
@ -63,7 +61,6 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Scale = new Vector2((float)cursorScale),
|
|
||||||
Masking = true,
|
Masking = true,
|
||||||
BorderThickness = Size.X / 6,
|
BorderThickness = Size.X / 6,
|
||||||
BorderColour = Color4.White,
|
BorderColour = Color4.White,
|
||||||
@ -119,7 +116,9 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cursorScale = config.GetBindable<double>(OsuConfig.GameplayCursorSize);
|
||||||
cursorScale.ValueChanged += scaleChanged;
|
cursorScale.ValueChanged += scaleChanged;
|
||||||
|
cursorScale.TriggerChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void scaleChanged(object sender, EventArgs e)
|
private void scaleChanged(object sender, EventArgs e)
|
||||||
|
@ -97,8 +97,6 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config, TextureStore textures, OsuColour colour)
|
private void load(OsuConfigManager config, TextureStore textures, OsuColour colour)
|
||||||
{
|
{
|
||||||
cursorScale = config.GetBindable<double>(OsuConfig.MenuCursorSize);
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
cursorContainer = new Container
|
cursorContainer = new Container
|
||||||
@ -122,7 +120,10 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cursorScale = config.GetBindable<double>(OsuConfig.MenuCursorSize);
|
||||||
cursorScale.ValueChanged += scaleChanged;
|
cursorScale.ValueChanged += scaleChanged;
|
||||||
|
cursorScale.TriggerChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void scaleChanged(object sender, EventArgs e)
|
private void scaleChanged(object sender, EventArgs e)
|
||||||
|
Loading…
Reference in New Issue
Block a user