Merge remote-tracking branch 'upstream/master' into muted-notification

This commit is contained in:
Dean Herbert
2019-09-25 16:47:56 +09:00
46 changed files with 1269 additions and 531 deletions

View File

@ -15,6 +15,7 @@ using osu.Game.Users;
using osuTK.Graphics;
using osu.Framework.Allocation;
using System.Net;
using osuTK;
namespace osu.Game.Overlays.Changelog
{
@ -67,22 +68,34 @@ namespace osu.Game.Overlays.Changelog
foreach (APIChangelogEntry entry in categoryEntries)
{
LinkFlowContainer title = new LinkFlowContainer
{
Direction = FillDirection.Full,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Margin = new MarginPadding { Vertical = 5 },
};
var entryColour = entry.Major ? colours.YellowLight : Color4.White;
title.AddIcon(entry.Type == ChangelogEntryType.Fix ? FontAwesome.Solid.Check : FontAwesome.Solid.Plus, t =>
LinkFlowContainer title;
Container titleContainer = new Container
{
t.Font = fontSmall;
t.Colour = entryColour;
t.Padding = new MarginPadding { Left = -17, Right = 5 };
});
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Margin = new MarginPadding { Vertical = 5 },
Children = new Drawable[]
{
new SpriteIcon
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreRight,
Size = new Vector2(fontSmall.Size),
Icon = entry.Type == ChangelogEntryType.Fix ? FontAwesome.Solid.Check : FontAwesome.Solid.Plus,
Colour = entryColour,
Margin = new MarginPadding { Right = 5 },
},
title = new LinkFlowContainer
{
Direction = FillDirection.Full,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
}
}
};
title.AddText(entry.Title, t =>
{
@ -139,7 +152,7 @@ namespace osu.Game.Overlays.Changelog
t.Colour = entryColour;
});
ChangelogEntries.Add(title);
ChangelogEntries.Add(titleContainer);
if (!string.IsNullOrEmpty(entry.MessageHtml))
{

View File

@ -67,7 +67,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
api?.Register(this);
}
public void APIStateChanged(IAPIProvider api, APIState state)
public void APIStateChanged(IAPIProvider api, APIState state) => Schedule(() =>
{
form = null;
@ -184,7 +184,7 @@ namespace osu.Game.Overlays.Settings.Sections.General
}
if (form != null) GetContainingInputManager()?.ChangeFocus(form);
}
});
public override bool AcceptsFocus => true;