1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:47:29 +08:00

Tweak style to more closely match osu!next

This commit is contained in:
Drew DeVault 2016-11-02 21:49:00 -04:00
parent 40e667b2d8
commit 2f990b884e

View File

@ -19,6 +19,7 @@ namespace osu.Game.Overlays
{ {
public class Options : OverlayContainer public class Options : OverlayContainer
{ {
internal const float SideMargins = 10;
private const float width = 400; private const float width = 400;
private FlowContainer optionsContainer; private FlowContainer optionsContainer;
private BasicStorage storage; private BasicStorage storage;
@ -39,13 +40,12 @@ namespace osu.Game.Overlays
new Box new Box
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = new Color4(0.1f, 0.1f, 0.1f, 0.9f) Colour = new Color4(51, 51, 51, 255)
}, },
// TODO: Links on the side to jump to a section // TODO: Links on the side to jump to a section
new ScrollContainer new ScrollContainer
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Left = 5, Right = 5, Top = 50 },
ScrollDraggerOnLeft = true, ScrollDraggerOnLeft = true,
Children = new[] Children = new[]
{ {
@ -58,25 +58,16 @@ namespace osu.Game.Overlays
{ {
new SpriteText new SpriteText
{ {
Text = "Options", Text = "settings",
TextSize = 40, TextSize = 40,
Anchor = Anchor.TopCentre, Margin = new MarginPadding { Left = SideMargins, Top = 30 },
Origin = Anchor.TopCentre,
}, },
new SpriteText new SpriteText
{ {
Colour = new Color4(235, 117, 139, 255), Colour = new Color4(235, 117, 139, 255),
Text = "Change the way osu! behaves", Text = "Change the way osu! behaves",
Anchor = Anchor.TopCentre, TextSize = 18,
Origin = Anchor.TopCentre, Margin = new MarginPadding { Left = SideMargins, Bottom = 30 },
Margin = new MarginPadding { Bottom = 25 },
},
new SpriteText
{
Text = "TODO: SEARCH",
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Margin = new MarginPadding { Bottom = 25 },
} }
} }
} }
@ -130,7 +121,7 @@ namespace osu.Game.Overlays
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Colour = new Color4(14, 132, 165, 255), Colour = new Color4(14, 132, 165, 255),
Text = "Open osu! folder", Text = "Open osu! folder",
Action = storage.OpenOsuDirectory, Action = storage.OpenInNativeExplorer,
} }
} }
} }
@ -171,30 +162,49 @@ namespace osu.Game.Overlays
public string Header public string Header
{ {
get { return header.Text; } get { return header.Text; }
set { header.Text = value.ToUpper(); } set { header.Text = value; }
} }
public OptionsSection() public OptionsSection()
{ {
const int headerSize = 40, headerMargin = 25; const int headerSize = 30, headerMargin = 25;
const int borderSize = 2;
AutoSizeAxes = Axes.Y; AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
AddInternal(new[] AddInternal(new Drawable[]
{ {
header = new SpriteText new Box
{ {
TextSize = headerSize, Colour = new Color4(3, 3, 3, 255),
Colour = new Color4(88, 218, 254, 255),
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
},
content = new FlowContainer
{
Margin = new MarginPadding { Top = headerSize + headerMargin, Left = 10 },
Direction = FlowDirection.VerticalOnly,
Spacing = new Vector2(0, 25),
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Height = borderSize,
},
new Container
{
Padding = new MarginPadding
{
Top = 10 + borderSize,
Left = Options.SideMargins,
Right = Options.SideMargins,
},
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Children = new[]
{
header = new SpriteText
{
TextSize = headerSize,
Colour = new Color4(247, 198, 35, 255),
},
content = new FlowContainer
{
Margin = new MarginPadding { Top = headerSize + headerMargin },
Direction = FlowDirection.VerticalOnly,
Spacing = new Vector2(0, 25),
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
},
}
}, },
}); });
} }
@ -214,23 +224,15 @@ namespace osu.Game.Overlays
public OptionsSubsection() public OptionsSubsection()
{ {
const int borderWidth = 3, borderMargin = 10;
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y; AutoSizeAxes = Axes.Y;
AddInternal(new Drawable[] AddInternal(new Drawable[]
{ {
new Box
{
Colour = new Color4(50, 50, 50, 255),
RelativeSizeAxes = Axes.Y,
Width = borderWidth,
},
content = new FlowContainer content = new FlowContainer
{ {
Direction = FlowDirection.VerticalOnly, Direction = FlowDirection.VerticalOnly,
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
Padding = new MarginPadding { Left = borderWidth + borderMargin },
Children = new[] Children = new[]
{ {
header = new SpriteText header = new SpriteText