mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Make protected variables private
This commit is contained in:
@ -16,28 +16,29 @@ namespace osu.Game.Graphics.Containers.Markdown
|
|||||||
[Resolved(canBeNull: true)]
|
[Resolved(canBeNull: true)]
|
||||||
private OsuGame game { get; set; }
|
private OsuGame game { get; set; }
|
||||||
|
|
||||||
protected string Text;
|
private readonly string text;
|
||||||
protected string Title;
|
private readonly string title;
|
||||||
|
|
||||||
public OsuMarkdownLinkText(string text, LinkInline linkInline)
|
public OsuMarkdownLinkText(string text, LinkInline linkInline)
|
||||||
: base(text, linkInline)
|
: base(text, linkInline)
|
||||||
{
|
{
|
||||||
Text = text;
|
this.text = text;
|
||||||
Title = linkInline.Title;
|
title = linkInline.Title;
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OverlayColourProvider colourProvider)
|
private void load(OverlayColourProvider colourProvider)
|
||||||
{
|
{
|
||||||
var text = CreateSpriteText().With(t => t.Text = Text);
|
var textDrawable = CreateSpriteText().With(t => t.Text = text);
|
||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
text,
|
textDrawable,
|
||||||
new OsuMarkdownLinkCompiler(new[] { text })
|
new OsuMarkdownLinkCompiler(new[] { textDrawable })
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Action = OnLinkPressed,
|
Action = OnLinkPressed,
|
||||||
TooltipText = Title ?? Url,
|
TooltipText = title ?? Url,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user