1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 15:12:57 +08:00

Fix typos; remove outdated comments; minor order changes

This commit is contained in:
HoutarouOreki 2018-07-23 18:38:20 +02:00
parent 554c56d51f
commit f685c5ba58
5 changed files with 11 additions and 14 deletions

View File

@ -13,10 +13,10 @@ namespace osu.Game.Tests.Visual
{ {
public TestCaseLineBadge() public TestCaseLineBadge()
{ {
Container containerHorizontal; Container container;
LineBadge lineBadge; LineBadge lineBadge;
Add(containerHorizontal = new Container Add(container = new Container
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
@ -41,7 +41,7 @@ namespace osu.Game.Tests.Visual
AddStep(@"", () => { }); AddStep(@"", () => { });
AddStep(@"Collapse", () => lineBadge.Collapse()); AddStep(@"Collapse", () => lineBadge.Collapse());
AddStep(@"Uncollapse", () => lineBadge.Uncollapse()); AddStep(@"Uncollapse", () => lineBadge.Uncollapse());
AddSliderStep(@"Resize container", 1, 300, 150, value => containerHorizontal.ResizeTo(value)); AddSliderStep(@"Resize container", 1, 300, 150, value => container.ResizeTo(value));
AddStep(@"Horizontal", () => lineBadge.IsHorizontal = true); AddStep(@"Horizontal", () => lineBadge.IsHorizontal = true);
AddStep(@"Anchor top", () => lineBadge.Anchor = Anchor.TopCentre); AddStep(@"Anchor top", () => lineBadge.Anchor = Anchor.TopCentre);
AddStep(@"Vertical", () => lineBadge.IsHorizontal = false); AddStep(@"Vertical", () => lineBadge.IsHorizontal = false);

View File

@ -45,7 +45,7 @@ namespace osu.Game.Graphics.UserInterface
/// takes up the full parent's axis defined by <see cref="IsHorizontal"/>. /// takes up the full parent's axis defined by <see cref="IsHorizontal"/>.
/// </summary> /// </summary>
/// <param name="startCollapsed">Whether to initialize with the /// <param name="startCollapsed">Whether to initialize with the
/// <see cref="CollapsedSize"/> or the <see cref="UncollapsedSize"/></param> /// <see cref="CollapsedSize"/> or the <see cref="UncollapsedSize"/>.</param>
public LineBadge(bool startCollapsed = true) public LineBadge(bool startCollapsed = true)
{ {
IsCollapsed = startCollapsed; IsCollapsed = startCollapsed;

View File

@ -21,6 +21,7 @@ namespace osu.Game.Graphics.UserInterface
{ {
private readonly SpriteIcon icon; private readonly SpriteIcon icon;
private SampleChannel sampleHover; private SampleChannel sampleHover;
public Action Action; public Action Action;
private bool isEnabled; private bool isEnabled;
@ -30,7 +31,7 @@ namespace osu.Game.Graphics.UserInterface
set set
{ {
isEnabled = value; isEnabled = value;
icon.Alpha = value ? 1 : 0.5f; icon.FadeTo(value ? 1 : 0.5f, 250);
} }
} }

View File

@ -15,7 +15,6 @@ using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Overlays.Changelog namespace osu.Game.Overlays.Changelog
{ {
// maybe look to osu.Game.Screens.Play.SquareGraph for reference later // maybe look to osu.Game.Screens.Play.SquareGraph for reference later
// placeholder json file: https://api.myjson.com/bins/10ye8a
public class ChangelogChart : BufferedContainer public class ChangelogChart : BufferedContainer
{ {
private readonly Box background; private readonly Box background;
@ -43,10 +42,6 @@ namespace osu.Game.Overlays.Changelog
}; };
} }
/// <summary>
/// Draw the graph for a specific build
/// </summary>
private bool isEmpty(APIChangelogChart changelogChart) private bool isEmpty(APIChangelogChart changelogChart)
{ {
if (changelogChart != null) if (changelogChart != null)

View File

@ -31,7 +31,6 @@ namespace osu.Game.Overlays.Changelog
public void ShowListing(APIChangelog[] changelog) public void ShowListing(APIChangelog[] changelog)
{ {
DateTime currentDate = new DateTime(); DateTime currentDate = new DateTime();
Clear(); Clear();
foreach (APIChangelog build in changelog) foreach (APIChangelog build in changelog)
@ -48,10 +47,10 @@ namespace osu.Game.Overlays.Changelog
Margin = new MarginPadding { Top = 30, }, Margin = new MarginPadding { Top = 30, },
}); });
} }
// watch out for this? changelogContentGroup = new ChangelogContentGroup(build, true);
Add(changelogContentGroup = new ChangelogContentGroup(build, true));
changelogContentGroup.BuildSelected += OnBuildSelected; changelogContentGroup.BuildSelected += OnBuildSelected;
changelogContentGroup.GenerateText(build.ChangelogEntries); changelogContentGroup.GenerateText(build.ChangelogEntries);
Add(changelogContentGroup);
currentDate = build.CreatedAt.Date; currentDate = build.CreatedAt.Date;
} }
else else
@ -63,9 +62,11 @@ namespace osu.Game.Overlays.Changelog
Colour = new Color4(32, 24, 35, 255), Colour = new Color4(32, 24, 35, 255),
Margin = new MarginPadding { Top = 30, }, Margin = new MarginPadding { Top = 30, },
}); });
Add(changelogContentGroup = new ChangelogContentGroup(build, false));
changelogContentGroup = new ChangelogContentGroup(build, false);
changelogContentGroup.BuildSelected += OnBuildSelected; changelogContentGroup.BuildSelected += OnBuildSelected;
changelogContentGroup.GenerateText(build.ChangelogEntries); changelogContentGroup.GenerateText(build.ChangelogEntries);
Add(changelogContentGroup);
} }
} }
} }