public HUDOverlay(DrawableRuleset drawableRuleset, IReadOnlyList <Mod> mods) { this.drawableRuleset = drawableRuleset; this.mods = mods; RelativeSizeAxes = Axes.Both; Children = new Drawable[] { CreateFailingLayer(), visibilityContainer = new Container { RelativeSizeAxes = Axes.Both, Child = mainComponents = new SkinnableTargetContainer(SkinnableTarget.MainHUDComponents) { RelativeSizeAxes = Axes.Both, }, }, topRightElements = new FillFlowContainer { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Margin = new MarginPadding(10), Spacing = new Vector2(10), AutoSizeAxes = Axes.Both, Direction = FillDirection.Vertical, Children = new Drawable[] { ModDisplay = CreateModsContainer(), PlayerSettingsOverlay = CreatePlayerSettingsOverlay(), } }, bottomRightElements = new FillFlowContainer { Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, Margin = new MarginPadding(10), Spacing = new Vector2(10), AutoSizeAxes = Axes.Both, LayoutDuration = FADE_DURATION / 2, LayoutEasing = FADE_EASING, Direction = FillDirection.Vertical, Children = new Drawable[] { KeyCounter = CreateKeyCounter(), HoldToQuit = CreateHoldForMenuButton(), } } }; }
public HUDOverlay(DrawableRuleset drawableRuleset, IReadOnlyList <Mod> mods) { this.drawableRuleset = drawableRuleset; this.mods = mods; RelativeSizeAxes = Axes.Both; Children = new Drawable[] { CreateFailingLayer(), visibilityContainer = new Container { RelativeSizeAxes = Axes.Both, Child = new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new Drawable[] { new Container { RelativeSizeAxes = Axes.Both, Children = new Drawable[] { mainComponents = new SkinnableTargetContainer(SkinnableTarget.MainHUDComponents) { RelativeSizeAxes = Axes.Both, }, new Container { RelativeSizeAxes = Axes.Both, Children = new Drawable[] { // still need to be migrated; a bit more involved. new HitErrorDisplay(this.drawableRuleset?.FirstAvailableHitWindows), } }, } }, }, new Drawable[] { Progress = CreateProgress(), } }, RowDimensions = new[] { new Dimension(), new Dimension(GridSizeMode.AutoSize) } }, }, topRightElements = new FillFlowContainer { Anchor = Anchor.TopRight, Origin = Anchor.TopRight, Margin = new MarginPadding(10), Spacing = new Vector2(10), AutoSizeAxes = Axes.Both, Direction = FillDirection.Vertical, Children = new Drawable[] { ModDisplay = CreateModsContainer(), PlayerSettingsOverlay = CreatePlayerSettingsOverlay(), } }, bottomRightElements = new FillFlowContainer { Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, Margin = new MarginPadding(10), Spacing = new Vector2(10), AutoSizeAxes = Axes.Both, LayoutDuration = FADE_DURATION / 2, LayoutEasing = FADE_EASING, Direction = FillDirection.Vertical, Children = new Drawable[] { KeyCounter = CreateKeyCounter(), HoldToQuit = CreateHoldForMenuButton(), } } }; }