mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Apply newline additions
This commit is contained in:
@ -34,6 +34,7 @@ namespace osu.Game.Graphics.Containers
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
if (InternalChildren.Count > 0 && InternalChild.DrawSize.X > 0)
|
||||
{
|
||||
// We're modifying scale here for a few reasons
|
||||
|
@ -51,6 +51,7 @@ namespace osu.Game.Graphics.Containers
|
||||
}
|
||||
|
||||
int previousLinkEnd = 0;
|
||||
|
||||
foreach (var link in links)
|
||||
{
|
||||
AddText(text.Substring(previousLinkEnd, link.Index - previousLinkEnd));
|
||||
@ -90,10 +91,12 @@ namespace osu.Game.Graphics.Containers
|
||||
if (linkArgument != null && int.TryParse(linkArgument.Contains('?') ? linkArgument.Split('?')[0] : linkArgument, out int beatmapId))
|
||||
game?.ShowBeatmap(beatmapId);
|
||||
break;
|
||||
|
||||
case LinkAction.OpenBeatmapSet:
|
||||
if (int.TryParse(linkArgument, out int setId))
|
||||
game?.ShowBeatmapSet(setId);
|
||||
break;
|
||||
|
||||
case LinkAction.OpenChannel:
|
||||
try
|
||||
{
|
||||
@ -105,18 +108,22 @@ namespace osu.Game.Graphics.Containers
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case LinkAction.OpenEditorTimestamp:
|
||||
case LinkAction.JoinMultiplayerMatch:
|
||||
case LinkAction.Spectate:
|
||||
showNotImplementedError?.Invoke();
|
||||
break;
|
||||
|
||||
case LinkAction.External:
|
||||
game?.OpenUrlExternally(url);
|
||||
break;
|
||||
|
||||
case LinkAction.OpenUserProfile:
|
||||
if (long.TryParse(linkArgument, out long userId))
|
||||
game?.ShowUser(userId);
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new NotImplementedException($"This {nameof(LinkAction)} ({linkType.ToString()}) is missing an associated action.");
|
||||
}
|
||||
|
@ -150,6 +150,7 @@ namespace osu.Game.Graphics.Containers
|
||||
|
||||
float headerH = (ExpandableHeader?.LayoutSize.Y ?? 0) + (FixedHeader?.LayoutSize.Y ?? 0);
|
||||
float footerH = Footer?.LayoutSize.Y ?? 0;
|
||||
|
||||
if (headerH != headerHeight || footerH != footerHeight)
|
||||
{
|
||||
headerHeight = headerH;
|
||||
@ -181,6 +182,7 @@ namespace osu.Game.Graphics.Containers
|
||||
foreach (var section in Children)
|
||||
{
|
||||
float diff = Math.Abs(scrollContainer.GetChildPosInContent(section) - currentScroll - scrollOffset);
|
||||
|
||||
if (diff < minDiff)
|
||||
{
|
||||
minDiff = diff;
|
||||
|
Reference in New Issue
Block a user