1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 02:33:02 +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()
{
Container containerHorizontal;
Container container;
LineBadge lineBadge;
Add(containerHorizontal = new Container
Add(container = new Container
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
@ -41,7 +41,7 @@ namespace osu.Game.Tests.Visual
AddStep(@"", () => { });
AddStep(@"Collapse", () => lineBadge.Collapse());
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(@"Anchor top", () => lineBadge.Anchor = Anchor.TopCentre);
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"/>.
/// </summary>
/// <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)
{
IsCollapsed = startCollapsed;

View File

@ -21,6 +21,7 @@ namespace osu.Game.Graphics.UserInterface
{
private readonly SpriteIcon icon;
private SampleChannel sampleHover;
public Action Action;
private bool isEnabled;
@ -30,7 +31,7 @@ namespace osu.Game.Graphics.UserInterface
set
{
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
{
// maybe look to osu.Game.Screens.Play.SquareGraph for reference later
// placeholder json file: https://api.myjson.com/bins/10ye8a
public class ChangelogChart : BufferedContainer
{
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)
{
if (changelogChart != null)

View File

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