mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Fix incorrect proportions of menu cursor
This commit is contained in:
Submodule osu-framework updated: e5f0cf73c1...8e1aa80d64
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user