1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 09:32:55 +08:00

Formatting and remove magic number

This commit is contained in:
DrabWeb 2017-05-19 20:13:59 -03:00
parent 83c81c0626
commit e7a64126a3
3 changed files with 7 additions and 5 deletions

View File

@ -54,7 +54,7 @@ namespace osu.Game.Overlays.Direct
set
{
this.value = value;
text.Text = string.Format("{0:n0}", Value);
text.Text = string.Format(@"{0:n0}", Value);
}
}

View File

@ -101,7 +101,7 @@ namespace osu.Game.Overlays.Direct
Origin = Anchor.TopRight,
Spacing = new Vector2(10f, 0f),
Direction = FillDirection.Horizontal,
Margin = new MarginPadding { Top = Height - 25 - padding, Right = DirectOverlay.WIDTH_PADDING },
Margin = new MarginPadding { Top = Height - SlimEnumDropdown<DirectTab>.HEIGHT - padding, Right = DirectOverlay.WIDTH_PADDING },
Children = new Drawable[]
{
new FillFlowContainer
@ -255,7 +255,7 @@ namespace osu.Game.Overlays.Direct
{
this.bindable = bindable;
this.style = style;
Size = new Vector2(25f);
Size = new Vector2(SlimEnumDropdown<DirectTab>.HEIGHT);
Children = new Drawable[]
{
@ -288,6 +288,8 @@ namespace osu.Game.Overlays.Direct
private class SlimEnumDropdown<T> : OsuEnumDropdown<T>
{
public const float HEIGHT = 25;
protected override DropdownHeader CreateHeader() => new SlimDropdownHeader { AccentColour = AccentColour };
protected override Menu CreateMenu() => new SlimMenu();
@ -295,7 +297,7 @@ namespace osu.Game.Overlays.Direct
{
public SlimDropdownHeader()
{
Height = 25;
Height = HEIGHT;
Icon.TextSize = 16;
Foreground.Padding = new MarginPadding { Top = 4, Bottom = 4, Left = 8, Right = 4 };
}

View File

@ -28,7 +28,7 @@ namespace osu.Game.Overlays
get { return beatmapSets; }
set
{
if (value == beatmapSets) return;
if (beatmapSets?.Equals(value) ?? false) return;
beatmapSets = value;
recreatePanels(filter.DisplayStyle.Value);