mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 04:52:57 +08:00
Update in line with framework changes
This commit is contained in:
parent
51cb7dc774
commit
f083b18663
@ -6,7 +6,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
@ -15,20 +14,20 @@ using osuTK;
|
||||
namespace osu.Game.Online.Chat
|
||||
{
|
||||
/// <summary>
|
||||
/// An invisible drawable that brings multiple <see cref="SpriteText"/> pieces together to form a consumable clickable link.
|
||||
/// An invisible drawable that brings multiple <see cref="Drawable"/> pieces together to form a consumable clickable link.
|
||||
/// </summary>
|
||||
public class DrawableLinkCompiler : OsuHoverContainer, IHasTooltip
|
||||
{
|
||||
/// <summary>
|
||||
/// Each word part of a chat link (split for word-wrap support).
|
||||
/// </summary>
|
||||
public List<SpriteText> Parts;
|
||||
public List<Drawable> Parts;
|
||||
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => Parts.Any(d => d.ReceivePositionalInputAt(screenSpacePos));
|
||||
|
||||
protected override HoverClickSounds CreateHoverClickSounds(HoverSampleSet sampleSet) => new LinkHoverSounds(sampleSet, Parts);
|
||||
|
||||
public DrawableLinkCompiler(IEnumerable<SpriteText> parts)
|
||||
public DrawableLinkCompiler(IEnumerable<Drawable> parts)
|
||||
{
|
||||
Parts = parts.ToList();
|
||||
}
|
||||
@ -45,9 +44,9 @@ namespace osu.Game.Online.Chat
|
||||
|
||||
private class LinkHoverSounds : HoverClickSounds
|
||||
{
|
||||
private readonly List<SpriteText> parts;
|
||||
private readonly List<Drawable> parts;
|
||||
|
||||
public LinkHoverSounds(HoverSampleSet sampleSet, List<SpriteText> parts)
|
||||
public LinkHoverSounds(HoverSampleSet sampleSet, List<Drawable> parts)
|
||||
: base(sampleSet)
|
||||
{
|
||||
this.parts = parts;
|
||||
|
@ -553,9 +553,9 @@ namespace osu.Game
|
||||
|
||||
try
|
||||
{
|
||||
Logger.Log($"Loading {d}...", LoggingTarget.Debug);
|
||||
Logger.Log($"Loading {d}...", level: LogLevel.Debug);
|
||||
await LoadComponentAsync(d, add);
|
||||
Logger.Log($"Loaded {d}!", LoggingTarget.Debug);
|
||||
Logger.Log($"Loaded {d}!", level: LogLevel.Debug);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
|
@ -7,7 +7,6 @@ using osuTK.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Beatmaps;
|
||||
@ -26,7 +25,7 @@ namespace osu.Game.Overlays.Music
|
||||
|
||||
private SpriteIcon handle;
|
||||
private TextFlowContainer text;
|
||||
private IEnumerable<SpriteText> titleSprites;
|
||||
private IEnumerable<Drawable> titleSprites;
|
||||
private ILocalisedBindableString titleBind;
|
||||
private ILocalisedBindableString artistBind;
|
||||
|
||||
@ -58,7 +57,7 @@ namespace osu.Game.Overlays.Music
|
||||
selected = value;
|
||||
|
||||
FinishTransforms(true);
|
||||
foreach (SpriteText s in titleSprites)
|
||||
foreach (Drawable s in titleSprites)
|
||||
s.FadeColour(Selected ? hoverColour : Color4.White, fade_duration);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user