1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 03:22:55 +08:00

Merge pull request #435 from Tom94/update-flow

Update usage of FillDirection
This commit is contained in:
Dean Herbert 2017-03-04 23:44:43 +09:00 committed by GitHub
commit adad248ae3
37 changed files with 76 additions and 69 deletions

@ -1 +1 @@
Subproject commit 854977e3fa0c41eec7637641ec5fec9ee65d73b9
Subproject commit 288236eaba95dfa15268a55f38c009a97d806f25

View File

@ -61,13 +61,13 @@ namespace osu.Desktop.Overlays
new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Children = new Drawable[]
{
new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(5),
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,

View File

@ -25,7 +25,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
AutoSizeAxes = Axes.Both;
Origin = Anchor.Centre;
Direction = FillDirection.Down;
Direction = FillDirection.Vertical;
Spacing = new Vector2(0, 2);
Position = (h?.StackedEndPosition ?? Vector2.Zero) + judgement.PositionOffset;

View File

@ -86,7 +86,7 @@ namespace osu.Game.Beatmaps.Drawables
new FillFlowContainer
{
Padding = new MarginPadding(5),
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
AutoSizeAxes = Axes.Both,
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
@ -95,19 +95,17 @@ namespace osu.Game.Beatmaps.Drawables
new DifficultyIcon(beatmap)
{
Scale = new Vector2(1.8f),
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
},
new FillFlowContainer
{
Padding = new MarginPadding { Left = 5 },
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
AutoSizeAxes = Axes.Both,
Children = new Drawable[]
{
new FillFlowContainer
{
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(4, 0),
AutoSizeAxes = Axes.Both,
Children = new[]

View File

@ -38,7 +38,7 @@ namespace osu.Game.Beatmaps.Drawables
},
new FillFlowContainer
{
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Padding = new MarginPadding { Top = 5, Left = 18, Right = 10, Bottom = 10 },
AutoSizeAxes = Axes.Both,
Children = new[]
@ -111,7 +111,7 @@ namespace osu.Game.Beatmaps.Drawables
new FillFlowContainer
{
Depth = -1,
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
RelativeSizeAxes = Axes.Both,
// This makes the gradient not be perfectly horizontal, but diagonal at a ~40° angle
Shear = new Vector2(0.8f, 0),

View File

@ -21,7 +21,7 @@ namespace osu.Game.Graphics.UserInterface
{
new FillFlowContainer
{
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Children = new Drawable[]

View File

@ -71,7 +71,7 @@ namespace osu.Game.Graphics.UserInterface
stars = new FillFlowContainer<Star>
{
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(star_spacing),
}
};

View File

@ -41,7 +41,7 @@ namespace osu.Game.Online.Chat.Drawables
{
flow = new FillFlowContainer
{
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Padding = new MarginPadding { Left = 20, Right = 20 }

View File

@ -173,7 +173,7 @@ namespace osu.Game.Overlays.Dialog
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Position = new Vector2(0f, -50f),
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Spacing = new Vector2(0f, 10f),
Children = new Drawable[]
{
@ -236,7 +236,7 @@ namespace osu.Game.Overlays.Dialog
Origin = Anchor.TopCentre,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
},
},
},

View File

@ -236,7 +236,7 @@ namespace osu.Game.Overlays.Mods
public ModButton(Mod m)
{
Direction = FillDirection.Down;
Direction = FillDirection.Vertical;
Spacing = new Vector2(0f, -5f);
Size = new Vector2(100f);

View File

@ -240,7 +240,7 @@ namespace osu.Game.Overlays.Mods
AutoSizeAxes = Axes.Y,
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Spacing = new Vector2(0f, 10f),
Children = new Drawable[]
{
@ -264,7 +264,7 @@ namespace osu.Game.Overlays.Mods
Anchor = Anchor.TopCentre,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Width = content_width,
Padding = new MarginPadding
{
@ -332,7 +332,7 @@ namespace osu.Game.Overlays.Mods
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Width = content_width,
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
Padding = new MarginPadding
{
Top = 20,

View File

@ -46,7 +46,7 @@ namespace osu.Game.Overlays
{
sections = new FillFlowContainer<NotificationSection>
{
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Children = new []

View File

@ -60,7 +60,7 @@ namespace osu.Game.Overlays.Notifications
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Direction = FillDirection.Down;
Direction = FillDirection.Vertical;
Padding = new MarginPadding
{

View File

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

View File

@ -61,7 +61,7 @@ namespace osu.Game.Overlays.Options
FlowContent = new FillFlowContainer
{
Margin = new MarginPadding { Top = header_size + header_margin },
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Spacing = 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 = FillDirection.Down;
Direction = FillDirection.Vertical;
AddInternal(new Drawable[]
{
new OsuSpriteText
@ -31,7 +31,7 @@ namespace osu.Game.Overlays.Options
},
content = new FillFlowContainer
{
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 5),
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,

View File

@ -100,7 +100,7 @@ namespace osu.Game.Overlays.Options.Sections.General
private void load(APIAccess api, OsuConfigManager config)
{
this.api = api;
Direction = FillDirection.Down;
Direction = FillDirection.Vertical;
Spacing = new Vector2(0, 5);
AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X;

View File

@ -39,12 +39,20 @@ namespace osu.Game.Overlays.Options.Sections
RelativeSizeAxes = Axes.X,
Text = "Run osu! updater",
},
new OptionLabel
new Container
{
Text = "TODO: osu version here",
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
},
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Children = new[]
{
new OptionLabel
{
Text = "osu!lazer",
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
},
}
}
};
}
}

View File

@ -40,7 +40,7 @@ namespace osu.Game.Overlays.Options
Anchor = Anchor.CentreLeft,
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
}
}
},

View File

@ -77,7 +77,7 @@ namespace osu.Game.Overlays
{
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Children = new Drawable[]
{
@ -98,7 +98,7 @@ namespace osu.Game.Overlays
{
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Children = sections,
}
}

View File

@ -43,7 +43,7 @@ namespace osu.Game.Overlays.Toolbar
new ToolbarBackground(),
new FillFlowContainer
{
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X,
Children = new Drawable[]
@ -66,7 +66,7 @@ namespace osu.Game.Overlays.Toolbar
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X,
Children = new Drawable[]

View File

@ -84,7 +84,7 @@ namespace osu.Game.Overlays.Toolbar
},
Flow = new FillFlowContainer
{
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(5),
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
@ -107,7 +107,7 @@ namespace osu.Game.Overlays.Toolbar
},
tooltipContainer = new FillFlowContainer
{
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
RelativeSizeAxes = Axes.Both, //stops us being considered in parent's autosize
Anchor = (TooltipAnchor & Anchor.x0) > 0 ? Anchor.BottomLeft : Anchor.BottomRight,
Origin = TooltipAnchor,

View File

@ -36,7 +36,7 @@ namespace osu.Game.Overlays.Toolbar
{
RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X,
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Padding = new MarginPadding { Left = padding, Right = padding },

View File

@ -126,7 +126,7 @@ namespace osu.Game.Screens
},
childModeButtons = new FillFlowContainer
{
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
RelativeSizeAxes = Axes.Both,

View File

@ -78,7 +78,7 @@ namespace osu.Game.Screens.Menu
},
buttonFlow = new FlowContainerWithOrigin
{
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(-WEDGE_WIDTH, 0),
Anchor = Anchor.Centre,
AutoSizeAxes = Axes.Both,

View File

@ -32,7 +32,7 @@ namespace osu.Game.Screens.Menu
AutoSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 2),
Children = new Drawable[]
{

View File

@ -12,7 +12,7 @@ namespace osu.Game.Screens.Play
{
public KeyCounterCollection()
{
Direction = FillDirection.Right;
Direction = FillDirection.Horizontal;
AutoSizeAxes = Axes.Both;
}

View File

@ -105,7 +105,7 @@ namespace osu.Game.Screens.Play
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 50),
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
@ -113,11 +113,12 @@ namespace osu.Game.Screens.Play
{
new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Down,
Spacing = new Vector2(0, 20),
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 20),
Children = new Drawable[]
{
new OsuSpriteText
@ -144,6 +145,8 @@ namespace osu.Game.Screens.Play
},
new FillFlowContainer
{
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Masking = true,
@ -188,9 +191,9 @@ namespace osu.Game.Screens.Play
},
retryCounterContainer = new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre
Anchor = Anchor.TopCentre,
AutoSizeAxes = Axes.Both,
}
}
},

View File

@ -136,7 +136,7 @@ namespace osu.Game.Screens.Play
AutoSizeAxes = Axes.Both,
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Children = new Drawable[]
{
new OsuSpriteText

View File

@ -68,7 +68,7 @@ namespace osu.Game.Screens.Ranking
new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Children = new Drawable[]
{
new OsuSpriteText

View File

@ -125,7 +125,7 @@ namespace osu.Game.Screens.Select
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Margin = new MarginPadding { Top = 10, Left = 25, Right = 10, Bottom = 20 },
AutoSizeAxes = Axes.Both,
Children = new Drawable[]
@ -147,7 +147,7 @@ namespace osu.Game.Screens.Select
new FillFlowContainer
{
Margin = new MarginPadding { Top = 10 },
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
AutoSizeAxes = Axes.Both,
Children = new []
{

View File

@ -55,7 +55,7 @@ namespace osu.Game.Screens.Select
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
Width = 0.4f, // TODO: InnerWidth property or something
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Children = new Drawable[]
{
searchTextBox = new SearchTextBox {
@ -188,7 +188,7 @@ namespace osu.Game.Screens.Select
new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(10, 0),
Children = new Drawable[]
{
@ -210,17 +210,16 @@ namespace osu.Game.Screens.Select
groupsEllipsis = new TextAwesome
{
Icon = FontAwesome.fa_ellipsis_h,
Origin = Anchor.TopLeft,
TextSize = 14,
Margin = new MarginPadding { Top = 5, Bottom = 5 },
Origin = Anchor.BottomLeft,
Anchor = Anchor.BottomLeft,
}
}
},
new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(10, 0),
Origin = Anchor.TopRight,
Anchor = Anchor.TopRight,
@ -241,10 +240,9 @@ namespace osu.Game.Screens.Select
sortEllipsis = new TextAwesome
{
Icon = FontAwesome.fa_ellipsis_h,
Origin = Anchor.TopLeft,
TextSize = 14,
Margin = new MarginPadding { Top = 5, Bottom = 5 },
Origin = Anchor.BottomLeft,
Anchor = Anchor.BottomLeft,
}
}
},

View File

@ -98,13 +98,13 @@ namespace osu.Game.Screens.Select
Position = new Vector2(BackButton.SIZE_EXTENDED.X + padding, 0),
RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X,
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(padding, 0),
Children = new Drawable[]
{
buttons = new FillFlowContainer
{
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(0.2f, 0),
AutoSizeAxes = Axes.Both,
}

View File

@ -115,7 +115,7 @@ namespace osu.Game.Screens.Select.Options
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Children = new Drawable[]
{
iconText = new TextAwesome

View File

@ -132,7 +132,7 @@ namespace osu.Game.Screens.Select.Options
public ButtonFlow()
{
Direction = FillDirection.Right;
Direction = FillDirection.Horizontal;
}
}
}

View File

@ -77,7 +77,7 @@ namespace osu.Game.Screens.Tournament
new FillFlowContainer
{
RelativeSizeAxes = Axes.Both,
Direction = FillDirection.Right,
Direction = FillDirection.Horizontal,
Children = new Drawable[]
{
@ -173,7 +173,7 @@ namespace osu.Game.Screens.Tournament
Position = new Vector2(0, 35f),
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 5f),
Children = new Drawable[]
@ -212,7 +212,7 @@ namespace osu.Game.Screens.Tournament
Position = new Vector2(0, -5f),
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 5f),
Children = new Drawable[]

View File

@ -144,7 +144,7 @@ namespace osu.Game.Screens.Tournament
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FillDirection.Down,
Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 5f),
Children = new Drawable[]