mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 14:37:25 +08:00
Make CursorExpand skinnable
This commit is contained in:
parent
667eaf95d8
commit
0816eaacb8
@ -23,6 +23,8 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
|
|||||||
|
|
||||||
protected override Container<Drawable> Content => fadeContainer;
|
protected override Container<Drawable> Content => fadeContainer;
|
||||||
|
|
||||||
|
private bool cursorExpand;
|
||||||
|
|
||||||
private readonly Container<Drawable> fadeContainer;
|
private readonly Container<Drawable> fadeContainer;
|
||||||
|
|
||||||
public GameplayCursor()
|
public GameplayCursor()
|
||||||
@ -37,6 +39,12 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(ISkinSource source)
|
||||||
|
{
|
||||||
|
cursorExpand = source.GetValue<SkinConfiguration, string>(s => s.CursorExpand).Equals("1");
|
||||||
|
}
|
||||||
|
|
||||||
private int downCount;
|
private int downCount;
|
||||||
|
|
||||||
private const float pressed_scale = 1.2f;
|
private const float pressed_scale = 1.2f;
|
||||||
@ -46,6 +54,7 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
|
|||||||
|
|
||||||
public bool OnPressed(OsuAction action)
|
public bool OnPressed(OsuAction action)
|
||||||
{
|
{
|
||||||
|
if (cursorExpand)
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case OsuAction.LeftButton:
|
case OsuAction.LeftButton:
|
||||||
@ -60,6 +69,7 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
|
|||||||
|
|
||||||
public bool OnReleased(OsuAction action)
|
public bool OnReleased(OsuAction action)
|
||||||
{
|
{
|
||||||
|
if (cursorExpand)
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case OsuAction.LeftButton:
|
case OsuAction.LeftButton:
|
||||||
|
@ -30,6 +30,9 @@ namespace osu.Game.Skinning
|
|||||||
case @"Author":
|
case @"Author":
|
||||||
skin.SkinInfo.Creator = pair.Value;
|
skin.SkinInfo.Creator = pair.Value;
|
||||||
break;
|
break;
|
||||||
|
case @"CursorExpand":
|
||||||
|
skin.CursorExpand = pair.Value;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -16,5 +16,7 @@ namespace osu.Game.Skinning
|
|||||||
public Dictionary<string, Color4> CustomColours { get; set; } = new Dictionary<string, Color4>();
|
public Dictionary<string, Color4> CustomColours { get; set; } = new Dictionary<string, Color4>();
|
||||||
|
|
||||||
public string HitCircleFont { get; set; } = "default";
|
public string HitCircleFont { get; set; } = "default";
|
||||||
|
|
||||||
|
public string CursorExpand { get; set; } = "1";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user