mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 16:32:54 +08:00
Fix incorrect proportions of menu cursor
This commit is contained in:
parent
a43890ffb4
commit
50158a1cd2
@ -1 +1 @@
|
||||
Subproject commit e5f0cf73c1e0bbcbd04194bf175d73af47fc850a
|
||||
Subproject commit 8e1aa80d64094f9c2590278b990ba17c2fb38f0b
|
@ -93,6 +93,7 @@ namespace osu.Game.Graphics.Cursor
|
||||
{
|
||||
private Container cursorContainer;
|
||||
private Bindable<double> cursorScale;
|
||||
private const float base_scale = 0.15f;
|
||||
|
||||
public Sprite AdditiveLayer;
|
||||
|
||||
@ -108,17 +109,15 @@ namespace osu.Game.Graphics.Cursor
|
||||
{
|
||||
cursorContainer = new Container
|
||||
{
|
||||
Size = new Vector2(32),
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Sprite
|
||||
{
|
||||
FillMode = FillMode.Fit,
|
||||
Texture = textures.Get(@"Cursor/menu-cursor"),
|
||||
},
|
||||
AdditiveLayer = new Sprite
|
||||
{
|
||||
FillMode = FillMode.Fit,
|
||||
BlendingMode = BlendingMode.Additive,
|
||||
Colour = colour.Pink,
|
||||
Alpha = 0,
|
||||
@ -129,7 +128,7 @@ namespace osu.Game.Graphics.Cursor
|
||||
};
|
||||
|
||||
cursorScale = config.GetBindable<double>(OsuSetting.MenuCursorSize);
|
||||
cursorScale.ValueChanged += newScale => cursorContainer.Scale = new Vector2((float)newScale);
|
||||
cursorScale.ValueChanged += newScale => cursorContainer.Scale = new Vector2((float)newScale * base_scale);
|
||||
cursorScale.TriggerChange();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user