Update usage of FlowContainer and its subclasses

This commit is contained in:
default0
2017-02-26 21:32:43 +01:00
parent 1b92519a86
commit 8d91519d59
34 changed files with 58 additions and 69 deletions

View File

@ -89,7 +89,7 @@ namespace osu.Game.Overlays.Options
{
Items = new KeyValuePair<string, T>[0];
Direction = FlowDirections.Vertical;
FlowStrategy = FlowStrategies.GetVerticalFlow();
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Children = new Drawable[]

View File

@ -40,7 +40,7 @@ namespace osu.Game.Overlays.Options
public OptionSlider()
{
Direction = FlowDirections.Vertical;
FlowStrategy = FlowStrategies.GetFillFlow();
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Padding = new MarginPadding { Right = 5 };

View File

@ -61,8 +61,7 @@ namespace osu.Game.Overlays.Options
FlowContent = new FlowContainer
{
Margin = new MarginPadding { Top = header_size + header_margin },
Direction = FlowDirections.Vertical,
Spacing = new Vector2(0, 30),
FlowStrategy = FlowStrategies.GetVerticalFlow(new Vector2(0, 30)),
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
},

View File

@ -20,7 +20,7 @@ namespace osu.Game.Overlays.Options
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Direction = FlowDirections.Vertical;
FlowStrategy = FlowStrategies.GetVerticalFlow();
AddInternal(new Drawable[]
{
new OsuSpriteText
@ -31,10 +31,9 @@ namespace osu.Game.Overlays.Options
},
content = new FlowContainer
{
Direction = FlowDirections.Vertical,
FlowStrategy = FlowStrategies.GetVerticalFlow(new Vector2(0, 5)),
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Spacing = new Vector2(0, 5),
},
});
}

View File

@ -7,6 +7,7 @@ using osu.Game.Configuration;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
using OpenTK;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Overlays.Options.Sections
{
@ -18,7 +19,7 @@ namespace osu.Game.Overlays.Options.Sections
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
FlowContent.Spacing = new Vector2(0, 5);
FlowContent.FlowStrategy = FlowStrategies.GetFillFlow(new Vector2(0, 5));
Children = new Drawable[]
{
new OsuCheckbox

View File

@ -100,10 +100,9 @@ namespace osu.Game.Overlays.Options.Sections.General
private void load(APIAccess api, OsuConfigManager config)
{
this.api = api;
Direction = FlowDirections.Vertical;
FlowStrategy = FlowStrategies.GetVerticalFlow(new Vector2(0, 5));
AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X;
Spacing = new Vector2(0, 5);
Children = new Drawable[]
{
username = new OsuTextBox

View File

@ -5,6 +5,7 @@ using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
using OpenTK;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Overlays.Options.Sections
{
@ -15,7 +16,7 @@ namespace osu.Game.Overlays.Options.Sections
public MaintenanceSection()
{
FlowContent.Spacing = new Vector2(0, 5);
FlowContent.FlowStrategy = FlowStrategies.GetFillFlow(new Vector2(0, 5));
Children = new Drawable[]
{
new OsuButton

View File

@ -8,6 +8,7 @@ using osu.Game.Configuration;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
using OpenTK;
using osu.Framework.Graphics.Containers;
namespace osu.Game.Overlays.Options.Sections
{
@ -19,7 +20,7 @@ namespace osu.Game.Overlays.Options.Sections
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
FlowContent.Spacing = new Vector2(0, 5);
FlowContent.FlowStrategy = FlowStrategies.GetFillFlow(new Vector2(0, 5));
Children = new Drawable[]
{
new OptionLabel { Text = "TODO: Skin preview textures" },

View File

@ -40,7 +40,7 @@ namespace osu.Game.Overlays.Options
Anchor = Anchor.CentreLeft,
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Direction = FlowDirections.Vertical
FlowStrategy = FlowStrategies.GetVerticalFlow(),
}
}
},