mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Removed LinkId and word wrapping (for now).
Also reimplemented the OsuHoverContainer properly
This commit is contained in:
@ -11,6 +11,7 @@ namespace osu.Game.Graphics.Containers
|
||||
public class OsuHoverContainer : OsuClickableContainer
|
||||
{
|
||||
private Color4 hoverColour;
|
||||
private Color4 unhoverColour;
|
||||
|
||||
protected override bool OnHover(InputState state)
|
||||
{
|
||||
@ -20,7 +21,7 @@ namespace osu.Game.Graphics.Containers
|
||||
|
||||
protected override void OnHoverLost(InputState state)
|
||||
{
|
||||
this.FadeColour(Color4.White, 500, Easing.OutQuint);
|
||||
this.FadeColour(unhoverColour, 500, Easing.OutQuint);
|
||||
base.OnHoverLost(state);
|
||||
}
|
||||
|
||||
@ -28,6 +29,7 @@ namespace osu.Game.Graphics.Containers
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
hoverColour = colours.Yellow;
|
||||
unhoverColour = Colour;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,9 @@ namespace osu.Game.Graphics.Containers
|
||||
|
||||
public void AddLink(string text, string url, Action<SpriteText> creationParameters = null)
|
||||
{
|
||||
// TODO: Remove this and get word wrapping working
|
||||
text = text.Replace(' ', '_');
|
||||
|
||||
AddText(text, link =>
|
||||
{
|
||||
creationParameters?.Invoke(link);
|
||||
|
Reference in New Issue
Block a user