Update framewörk

This commit is contained in:
Thomas Müller
2017-03-01 19:33:01 +01:00
parent d46e68b36b
commit 9c853b0465
37 changed files with 127 additions and 179 deletions

View File

@ -62,10 +62,10 @@ namespace osu.Game.Overlays.Toolbar
protected TextAwesome DrawableIcon;
protected SpriteText DrawableText;
protected Box HoverBackground;
private FlowContainer tooltipContainer;
private FillFlowContainer tooltipContainer;
private SpriteText tooltip1;
private SpriteText tooltip2;
protected FlowContainer Flow;
protected FillFlowContainer Flow;
private SampleChannel sampleClick;
public ToolbarButton()
@ -82,9 +82,10 @@ namespace osu.Game.Overlays.Toolbar
BlendingMode = BlendingMode.Additive,
Alpha = 0,
},
Flow = new FlowContainer
Flow = new FillFlowContainer
{
FlowStrategy = FlowStrategies.CreateHorizontalFlow(new Vector2(5)),
Direction = FlowDirection.Right,
Spacing = new Vector2(5),
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Padding = new MarginPadding { Left = Toolbar.HEIGHT / 2, Right = Toolbar.HEIGHT / 2 },
@ -104,9 +105,9 @@ namespace osu.Game.Overlays.Toolbar
},
},
},
tooltipContainer = new FlowContainer
tooltipContainer = new FillFlowContainer
{
FlowStrategy = FlowStrategies.CreateVerticalFlow(),
Direction = FlowDirection.Down,
RelativeSizeAxes = Axes.Both, //stops us being considered in parent's autosize
Anchor = (TooltipAnchor & Anchor.x0) > 0 ? Anchor.BottomLeft : Anchor.BottomRight,
Origin = TooltipAnchor,