1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 03:15:45 +08:00

Fix incorrect proportions of menu cursor

This commit is contained in:
Thomas Müller 2017-06-03 16:34:00 +02:00
parent a43890ffb4
commit 50158a1cd2
2 changed files with 4 additions and 5 deletions

@ -1 +1 @@
Subproject commit e5f0cf73c1e0bbcbd04194bf175d73af47fc850a Subproject commit 8e1aa80d64094f9c2590278b990ba17c2fb38f0b

View File

@ -93,6 +93,7 @@ namespace osu.Game.Graphics.Cursor
{ {
private Container cursorContainer; private Container cursorContainer;
private Bindable<double> cursorScale; private Bindable<double> cursorScale;
private const float base_scale = 0.15f;
public Sprite AdditiveLayer; public Sprite AdditiveLayer;
@ -108,17 +109,15 @@ namespace osu.Game.Graphics.Cursor
{ {
cursorContainer = new Container cursorContainer = new Container
{ {
Size = new Vector2(32), AutoSizeAxes = Axes.Both,
Children = new Drawable[] Children = new Drawable[]
{ {
new Sprite new Sprite
{ {
FillMode = FillMode.Fit,
Texture = textures.Get(@"Cursor/menu-cursor"), Texture = textures.Get(@"Cursor/menu-cursor"),
}, },
AdditiveLayer = new Sprite AdditiveLayer = new Sprite
{ {
FillMode = FillMode.Fit,
BlendingMode = BlendingMode.Additive, BlendingMode = BlendingMode.Additive,
Colour = colour.Pink, Colour = colour.Pink,
Alpha = 0, Alpha = 0,
@ -129,7 +128,7 @@ namespace osu.Game.Graphics.Cursor
}; };
cursorScale = config.GetBindable<double>(OsuSetting.MenuCursorSize); 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(); cursorScale.TriggerChange();
} }
} }