public Toolbar() { AlwaysReceiveInput = true; Children = new Drawable[] { new ToolbarBackground(), new FillFlowContainer { Direction = FillDirection.Horizontal, RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Children = new Drawable[] { new ToolbarSettingsButton(), new ToolbarHomeButton { Action = () => OnHome?.Invoke() }, modeSelector = new ToolbarModeSelector { OnPlayModeChange = mode => { OnPlayModeChange?.Invoke(mode); } } } }, new FillFlowContainer { AlwaysReceiveInput = true, Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Direction = FillDirection.Horizontal, RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Children = new Drawable[] { new ToolbarMusicButton(), new ToolbarButton { Icon = FontAwesome.fa_search }, userArea = new ToolbarUserArea(), new ToolbarNotificationButton(), } } }; RelativeSizeAxes = Axes.X; Size = new Vector2(1, HEIGHT); }
public Toolbar() { Children = new Drawable[] { solidBackground = new Box { RelativeSizeAxes = Axes.Both, Colour = OsuColour.Gray(0.1f), Alpha = alpha_normal, }, gradientBackground = new Box { RelativeSizeAxes = Axes.X, Anchor = Anchor.BottomLeft, Alpha = 0, Height = 90, ColourInfo = ColourInfo.GradientVertical( OsuColour.Gray(0.1f).Opacity(0.5f), OsuColour.Gray(0.1f).Opacity(0)), }, new FlowContainer { Direction = FlowDirection.HorizontalOnly, RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Children = new Drawable[] { new ToolbarSettingsButton(), new ToolbarHomeButton() { Action = () => OnHome?.Invoke() }, modeSelector = new ToolbarModeSelector { OnPlayModeChange = OnPlayModeChange } } }, new FlowContainer { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Direction = FlowDirection.HorizontalOnly, RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Children = new [] { new ToolbarMusicButton(), new ToolbarButton { Icon = FontAwesome.fa_search }, new ToolbarUserButton(), new ToolbarButton { Icon = FontAwesome.fa_bars }, } } }; RelativeSizeAxes = Axes.X; Size = new Vector2(1, height); }
public Toolbar() { Children = new Drawable[] { solidBackground = new Box { RelativeSizeAxes = Axes.Both, Colour = new Color4(0.1f, 0.1f, 0.1f, 1), Alpha = alpha_normal, }, gradientBackground = new Box { RelativeSizeAxes = Axes.X, Anchor = Anchor.BottomLeft, Alpha = 0, Height = 90, ColourInfo = ColourInfo.GradientVertical(new Color4(0.1f, 0.1f, 0.1f, 0.5f), new Color4(0.1f, 0.1f, 0.1f, 0f)), }, new FlowContainer { Direction = FlowDirection.HorizontalOnly, RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Children = new Drawable[] { new ToolbarSettingsButton(), new ToolbarHomeButton() { Action = () => OnHome?.Invoke() }, modeSelector = new ToolbarModeSelector { OnPlayModeChange = OnPlayModeChange } } }, new FlowContainer { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Direction = FlowDirection.HorizontalOnly, RelativeSizeAxes = Axes.Y, AutoSizeAxes = Axes.X, Children = new [] { new ToolbarMusicButton(), new ToolbarButton { Icon = FontAwesome.fa_search }, new ToolbarUserButton(), new ToolbarButton { Icon = FontAwesome.fa_bars }, } } }; RelativeSizeAxes = Axes.X; Size = new Vector2(1, height); }