mirror of
https://github.com/ppy/osu
synced 2025-02-08 14:17:29 +00:00
Rename classes and fix back-to-front state
This commit is contained in:
parent
d1a0bb7582
commit
9f9e86f18c
@ -17,7 +17,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
typeof(BadgeDisplay),
|
||||
typeof(StreamBadgeArea),
|
||||
typeof(StreamBadge),
|
||||
typeof(ChangelogHeader),
|
||||
typeof(ChangelogContent),
|
||||
|
@ -77,6 +77,7 @@ namespace osu.Game.Overlays.Changelog
|
||||
Colour = stream.Colour,
|
||||
ExpandedSize = 4,
|
||||
CollapsedSize = 2,
|
||||
IsCollapsed = true
|
||||
},
|
||||
};
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Overlays.Changelog
|
||||
{
|
||||
public class BadgeDisplay : CompositeDrawable
|
||||
public class StreamBadgeArea : CompositeDrawable
|
||||
{
|
||||
private const float vertical_padding = 20;
|
||||
private const float horizontal_padding = 85;
|
||||
@ -21,7 +21,7 @@ namespace osu.Game.Overlays.Changelog
|
||||
|
||||
private readonly FillFlowContainer<StreamBadge> badgesContainer;
|
||||
|
||||
public BadgeDisplay()
|
||||
public StreamBadgeArea()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
@ -26,7 +26,7 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
private ChangelogHeader header;
|
||||
|
||||
private BadgeDisplay badges;
|
||||
private StreamBadgeArea streamBadges;
|
||||
|
||||
private Container<ChangelogContent> content;
|
||||
|
||||
@ -81,7 +81,7 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
ListingSelected = ShowListing,
|
||||
},
|
||||
badges = new BadgeDisplay(),
|
||||
streamBadges = new StreamBadgeArea(),
|
||||
content = new Container<ChangelogContent>
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
@ -92,7 +92,7 @@ namespace osu.Game.Overlays
|
||||
},
|
||||
};
|
||||
|
||||
badges.Current.ValueChanged += e =>
|
||||
streamBadges.Current.ValueChanged += e =>
|
||||
{
|
||||
if (e.NewValue?.LatestBuild != null && e.NewValue != Current.Value?.UpdateStream)
|
||||
ShowBuild(e.NewValue.LatestBuild);
|
||||
@ -106,13 +106,13 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
if (e.NewValue != null)
|
||||
{
|
||||
badges.Current.Value = e.NewValue.UpdateStream;
|
||||
streamBadges.Current.Value = e.NewValue.UpdateStream;
|
||||
|
||||
loadContent(new ChangelogSingleBuild(e.NewValue));
|
||||
}
|
||||
else
|
||||
{
|
||||
badges.Current.Value = null;
|
||||
streamBadges.Current.Value = null;
|
||||
loadContent(new ChangelogListing(builds));
|
||||
}
|
||||
});
|
||||
@ -161,7 +161,7 @@ namespace osu.Game.Overlays
|
||||
res.Streams.ForEach(s => s.LatestBuild.UpdateStream = res.Streams.Find(s2 => s2.Id == s.LatestBuild.UpdateStream.Id));
|
||||
|
||||
builds = res.Builds;
|
||||
badges.Populate(res.Streams);
|
||||
streamBadges.Populate(res.Streams);
|
||||
|
||||
Current.TriggerChange();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user