Naming standardisation and enforcing.

This commit is contained in:
Dean Herbert
2017-02-07 16:15:45 +09:00
parent 50bd80cb0c
commit 6b011a50d2
28 changed files with 182 additions and 136 deletions

View File

@ -15,8 +15,8 @@ namespace osu.Game.Overlays.Options
{
public abstract class OptionsSection : Container
{
protected FlowContainer content;
protected override Container<Drawable> Content => content;
protected FlowContainer FlowContent;
protected override Container<Drawable> Content => FlowContent;
public abstract FontAwesome Icon { get; }
public abstract string Header { get; }
@ -28,22 +28,23 @@ namespace osu.Game.Overlays.Options
Margin = new MarginPadding { Top = 20 };
AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X;
const int headerSize = 26, headerMargin = 25;
const int borderSize = 2;
const int header_size = 26;
const int header_margin = 25;
const int border_size = 2;
AddInternal(new Drawable[]
{
new Box
{
Colour = new Color4(0, 0, 0, 255),
RelativeSizeAxes = Axes.X,
Height = borderSize,
Height = border_size,
},
new Container
{
Padding = new MarginPadding
{
Top = 20 + borderSize,
Top = 20 + border_size,
Left = OptionsOverlay.CONTENT_MARGINS,
Right = OptionsOverlay.CONTENT_MARGINS,
Bottom = 10,
@ -54,12 +55,12 @@ namespace osu.Game.Overlays.Options
{
headerLabel = new OsuSpriteText
{
TextSize = headerSize,
TextSize = header_size,
Text = Header,
},
content = new FlowContainer
FlowContent = new FlowContainer
{
Margin = new MarginPadding { Top = headerSize + headerMargin },
Margin = new MarginPadding { Top = header_size + header_margin },
Direction = FlowDirection.VerticalOnly,
Spacing = new Vector2(0, 30),
AutoSizeAxes = Axes.Y,