Skip to content

Commit

Permalink
Merge pull request #353 from Tom94/horizontal-scroll
Browse files Browse the repository at this point in the history
Update framework.
  • Loading branch information
peppy authored Feb 13, 2017
2 parents 6e0a2ec + aaaf716 commit c86701f
Show file tree
Hide file tree
Showing 28 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion osu.Desktop.VisualTests/Tests/TestCaseChatDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private void initializeChannels()
Add(flow = new FlowContainer
{
RelativeSizeAxes = Axes.Both,
Direction = FlowDirection.VerticalOnly
Direction = FlowDirections.Vertical
});

SpriteText loading;
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Modes.Osu/Objects/Drawables/HitExplosion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public HitExplosion(OsuJudgementInfo judgement, OsuHitObject h = null)
AutoSizeAxes = Axes.Both;
Origin = Anchor.Centre;

Direction = FlowDirection.VerticalOnly;
Direction = FlowDirections.Vertical;
Spacing = new Vector2(0, 2);
Position = (h?.StackedEndPosition ?? Vector2.Zero) + judgement.PositionOffset;

Expand Down
6 changes: 3 additions & 3 deletions osu.Game/Beatmaps/Drawables/BeatmapPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public BeatmapPanel(BeatmapInfo beatmap)
new FlowContainer
{
Padding = new MarginPadding(5),
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
AutoSizeAxes = Axes.Both,
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Expand All @@ -93,13 +93,13 @@ public BeatmapPanel(BeatmapInfo beatmap)
{
Padding = new MarginPadding { Left = 5 },
Spacing = new Vector2(0, 5),
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
AutoSizeAxes = Axes.Both,
Children = new Drawable[]
{
new FlowContainer
{
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
AutoSizeAxes = Axes.Both,
Spacing = new Vector2(4, 0),
Children = new[]
Expand Down
4 changes: 2 additions & 2 deletions osu.Game/Beatmaps/Drawables/BeatmapSetHeader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public BeatmapSetHeader(WorkingBeatmap beatmap)
},
new FlowContainer
{
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Padding = new MarginPadding { Top = 5, Left = 18, Right = 10, Bottom = 10 },
AutoSizeAxes = Axes.Both,
Children = new[]
Expand Down Expand Up @@ -113,7 +113,7 @@ public PanelBackground(WorkingBeatmap working)
new FlowContainer
{
Depth = -1,
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
RelativeSizeAxes = Axes.Both,
// This makes the gradient not be perfectly horizontal, but diagonal at a ~40° angle
Shear = new Vector2(0.8f, 0),
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Graphics/UserInterface/OsuDropDownMenuItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public OsuDropDownMenuItem(string text, U value) : base(text, value)
{
new FlowContainer
{
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Children = new Drawable[]
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Online/Chat/Drawables/ChannelDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public ChannelDisplay(Channel channel)
{
flow = new FlowContainer
{
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Spacing = new Vector2(1, 1)
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Overlays/NotificationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private void load(OsuColour colours)
{
sections = new FlowContainer<NotificationSection>
{
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Children = new []
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Overlays/Notifications/NotificationSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private void load(OsuColour colours)
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Direction = FlowDirection.VerticalOnly;
Direction = FlowDirections.Vertical;

Padding = new MarginPadding
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Overlays/Options/OptionDropDown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public OptionDropDown()
{
Items = new KeyValuePair<string, T>[0];

Direction = FlowDirection.VerticalOnly;
Direction = FlowDirections.Vertical;
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Children = new Drawable[]
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Overlays/Options/OptionSlider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public BindableNumber<T> Bindable

public OptionSlider()
{
Direction = FlowDirection.VerticalOnly;
Direction = FlowDirections.Vertical;
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Padding = new MarginPadding { Right = 5 };
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Overlays/Options/OptionsSection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public OptionsSection()
FlowContent = new FlowContainer
{
Margin = new MarginPadding { Top = header_size + header_margin },
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Spacing = new Vector2(0, 30),
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Expand Down
4 changes: 2 additions & 2 deletions osu.Game/Overlays/Options/OptionsSubsection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public OptionsSubsection()
{
RelativeSizeAxes = Axes.X;
AutoSizeAxes = Axes.Y;
Direction = FlowDirection.VerticalOnly;
Direction = FlowDirections.Vertical;
AddInternal(new Drawable[]
{
new OsuSpriteText
Expand All @@ -32,7 +32,7 @@ public OptionsSubsection()
},
content = new FlowContainer
{
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Spacing = new Vector2(0, 5),
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Overlays/Options/Sections/General/LoginOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private void performLogin()
private void load(APIAccess api, OsuConfigManager config)
{
this.api = api;
Direction = FlowDirection.VerticalOnly;
Direction = FlowDirections.Vertical;
AutoSizeAxes = Axes.Y;
RelativeSizeAxes = Axes.X;
Spacing = new Vector2(0, 5);
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Overlays/Options/Sidebar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public Sidebar()
Anchor = Anchor.CentreLeft,
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Direction = FlowDirection.VerticalOnly
Direction = FlowDirections.Vertical
}
}
},
Expand Down
6 changes: 3 additions & 3 deletions osu.Game/Overlays/OptionsOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private void load(OsuGame game, OsuColour colours)
{
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,

Children = new Drawable[]
{
Expand All @@ -103,7 +103,7 @@ private void load(OsuGame game, OsuColour colours)
{
AutoSizeAxes = Axes.Y,
RelativeSizeAxes = Axes.X,
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Children = sections,
}
}
Expand Down Expand Up @@ -141,7 +141,7 @@ protected override void Update()

foreach (OptionsSection section in sections)
{
float distance = Math.Abs(scrollContainer.GetChildYInContent(section) - currentScroll);
float distance = Math.Abs(scrollContainer.GetChildPosInContent(section) - currentScroll);
if (distance < bestDistance)
{
bestDistance = distance;
Expand Down
4 changes: 2 additions & 2 deletions osu.Game/Overlays/Pause/PauseOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private void load(OsuColour colours)
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Spacing = new Vector2(0f, 50f),
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
Expand All @@ -113,7 +113,7 @@ private void load(OsuColour colours)
new FlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Spacing = new Vector2(0f, 20f),
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
Expand Down
4 changes: 2 additions & 2 deletions osu.Game/Overlays/Toolbar/Toolbar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public Toolbar()
new ToolbarBackground(),
new FlowContainer
{
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X,
Children = new Drawable[]
Expand All @@ -63,7 +63,7 @@ public Toolbar()
{
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X,
Children = new Drawable[]
Expand Down
4 changes: 2 additions & 2 deletions osu.Game/Overlays/Toolbar/ToolbarButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public ToolbarButton()
},
Flow = new FlowContainer
{
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Padding = new MarginPadding { Left = Toolbar.HEIGHT / 2, Right = Toolbar.HEIGHT / 2 },
Expand All @@ -107,7 +107,7 @@ public ToolbarButton()
},
tooltipContainer = new FlowContainer
{
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
RelativeSizeAxes = Axes.Both, //stops us being considered in parent's autosize
Anchor = (TooltipAnchor & Anchor.x0) > 0 ? Anchor.BottomLeft : Anchor.BottomRight,
Origin = TooltipAnchor,
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Overlays/Toolbar/ToolbarModeSelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public ToolbarModeSelector()
{
RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X,
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Padding = new MarginPadding { Left = 10, Right = 10 },
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Screens/GameModeWhiteBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public GameModeWhiteBox()
},
childModeButtons = new FlowContainer
{
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
RelativeSizeAxes = Axes.Both,
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Screens/Menu/Button.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public Button(string text, string internalName, FontAwesome symbol, Color4 colou
new OsuSpriteText
{
Shadow = true,
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
TextSize = 16,
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Screens/Menu/ButtonSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public ButtonSystem()
},
buttonFlow = new FlowContainerWithOrigin
{
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
Anchor = Anchor.Centre,
AutoSizeAxes = Axes.Both,
Spacing = new Vector2(-WEDGE_WIDTH, 0),
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Screens/Play/KeyCounterCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class KeyCounterCollection : FlowContainer<KeyCounter>
{
public KeyCounterCollection()
{
Direction = FlowDirection.HorizontalOnly;
Direction = FlowDirections.Horizontal;
AutoSizeAxes = Axes.Both;
}

Expand Down
2 changes: 1 addition & 1 deletion osu.Game/Screens/Ranking/Results.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public ScoreDisplay(Score s)
new FlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Children = new Drawable[]
{
new OsuSpriteText
Expand Down
4 changes: 2 additions & 2 deletions osu.Game/Screens/Select/BeatmapInfoWedge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void UpdateBeatmap(WorkingBeatmap beatmap)
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Margin = new MarginPadding { Top = 10, Left = 25, Right = 10, Bottom = 20 },
AutoSizeAxes = Axes.Both,
Children = new Drawable[]
Expand All @@ -149,7 +149,7 @@ public void UpdateBeatmap(WorkingBeatmap beatmap)
new FlowContainer
{
Margin = new MarginPadding { Top = 10 },
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
AutoSizeAxes = Axes.Both,
Children = new []
{
Expand Down
6 changes: 3 additions & 3 deletions osu.Game/Screens/Select/FilterControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public FilterControl()
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
Width = 0.4f, // TODO: InnerWidth property or something
Direction = FlowDirection.VerticalOnly,
Direction = FlowDirections.Vertical,
Children = new Drawable[]
{
searchTextBox = new SearchTextBox { RelativeSizeAxes = Axes.X },
Expand Down Expand Up @@ -175,7 +175,7 @@ public GroupSortTabs()
new FlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
Spacing = new Vector2(10, 0),
Children = new Drawable[]
{
Expand Down Expand Up @@ -207,7 +207,7 @@ public GroupSortTabs()
new FlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
Spacing = new Vector2(10, 0),
Origin = Anchor.TopRight,
Anchor = Anchor.TopRight,
Expand Down
4 changes: 2 additions & 2 deletions osu.Game/Screens/Select/Footer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ public Footer()
Position = new Vector2(BackButton.SIZE_EXTENDED.X + padding, 0),
RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X,
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
Spacing = new Vector2(padding, 0),
Children = new Drawable[]
{

buttons = new FlowContainer
{
Direction = FlowDirection.HorizontalOnly,
Direction = FlowDirections.Horizontal,
Spacing = new Vector2(0.2f, 0),
AutoSizeAxes = Axes.Both,
}
Expand Down

0 comments on commit c86701f

Please sign in to comment.