private void load(OverlayColourProvider colourProvider, OsuColour colours) { AutoSizeAxes = Axes.Y; User.ValueChanged += e => updateDisplay(e.NewValue); InternalChildren = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = colourProvider.Background5, }, fillFlow = new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = expanded ? Axes.Y : Axes.None, AutoSizeDuration = 200, AutoSizeEasing = Easing.OutQuint, Masking = true, Padding = new MarginPadding { Horizontal = UserProfileOverlay.CONTENT_X_MARGIN, Vertical = 10 }, Direction = FillDirection.Vertical, Spacing = new Vector2(0, 20), Children = new Drawable[] { new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { new FillFlowContainer { AutoSizeAxes = Axes.Both, Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, Direction = FillDirection.Horizontal, Spacing = new Vector2(10, 0), Children = new Drawable[] { new OverlinedTotalPlayTime { User = { BindTarget = User } }, medalInfo = new OverlinedInfoContainer { Title = UsersStrings.ShowStatsMedals, LineColour = colours.GreenLight, }, ppInfo = new OverlinedInfoContainer { Title = "pp", LineColour = colours.Red, }, } }, new FillFlowContainer { AutoSizeAxes = Axes.Both, Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, Direction = FillDirection.Horizontal, Spacing = new Vector2(5), Children = new[] { scoreRankInfos[ScoreRank.XH] = new ScoreRankInfo(ScoreRank.XH), scoreRankInfos[ScoreRank.X] = new ScoreRankInfo(ScoreRank.X), scoreRankInfos[ScoreRank.SH] = new ScoreRankInfo(ScoreRank.SH), scoreRankInfos[ScoreRank.S] = new ScoreRankInfo(ScoreRank.S), scoreRankInfos[ScoreRank.A] = new ScoreRankInfo(ScoreRank.A), } } } }, new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Padding = new MarginPadding { Right = 130 }, Children = new Drawable[] { rankGraph = new RankGraph { RelativeSizeAxes = Axes.Both, }, new FillFlowContainer { AutoSizeAxes = Axes.Y, Width = 130, Anchor = Anchor.TopRight, Direction = FillDirection.Vertical, Padding = new MarginPadding { Horizontal = 10 }, Spacing = new Vector2(0, 20), Children = new Drawable[] { detailGlobalRank = new OverlinedInfoContainer(true, 110) { Title = UsersStrings.ShowRankGlobalSimple, LineColour = colourProvider.Highlight1, }, detailCountryRank = new OverlinedInfoContainer(false, 110) { Title = UsersStrings.ShowRankCountrySimple, LineColour = colourProvider.Highlight1, }, } } } }, } }, }; }
private void load(OverlayColourProvider colourProvider, TextureStore textures) { Container <Drawable> hiddenDetailContainer; Container <Drawable> expandedDetailContainer; InternalChildren = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = colourProvider.Background4 }, new FillFlowContainer { AutoSizeAxes = Axes.X, RelativeSizeAxes = Axes.Y, Direction = FillDirection.Horizontal, Padding = new MarginPadding { Vertical = 10 }, Margin = new MarginPadding { Left = UserProfileOverlay.CONTENT_X_MARGIN }, Spacing = new Vector2(10, 0), Children = new Drawable[] { new AddFriendButton { RelativeSizeAxes = Axes.Y, User = { BindTarget = User } }, new MessageUserButton { User = { BindTarget = User } }, } }, new Container { Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, RelativeSizeAxes = Axes.Y, Padding = new MarginPadding { Vertical = 10 }, Width = UserProfileOverlay.CONTENT_X_MARGIN, Child = new ExpandDetailsButton { RelativeSizeAxes = Axes.Y, Anchor = Anchor.Centre, Origin = Anchor.Centre, DetailsVisible = { BindTarget = DetailsVisible } }, }, new Container { Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, AutoSizeAxes = Axes.Both, Margin = new MarginPadding { Right = UserProfileOverlay.CONTENT_X_MARGIN }, Children = new Drawable[] { new LevelBadge { Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, Size = new Vector2(40), User = { BindTarget = User } }, expandedDetailContainer = new Container { Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, Width = 200, Height = 6, Margin = new MarginPadding { Right = 50 }, Child = new LevelProgressBar { RelativeSizeAxes = Axes.Both, User = { BindTarget = User } } }, hiddenDetailContainer = new FillFlowContainer { Direction = FillDirection.Horizontal, Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, Width = 200, AutoSizeAxes = Axes.Y, Alpha = 0, Spacing = new Vector2(10, 0), Margin = new MarginPadding { Right = 50 }, Children = new[] { hiddenDetailGlobal = new OverlinedInfoContainer { Title = "Global Ranking", LineColour = colourProvider.Highlight1 }, hiddenDetailCountry = new OverlinedInfoContainer { Title = "Country Ranking", LineColour = colourProvider.Highlight1 }, } } } } }; DetailsVisible.BindValueChanged(visible => { hiddenDetailContainer.FadeTo(visible.NewValue ? 0 : 1, 200, Easing.OutQuint); expandedDetailContainer.FadeTo(visible.NewValue ? 1 : 0, 200, Easing.OutQuint); }); User.BindValueChanged(user => updateDisplay(user.NewValue)); }
private void load(OsuColour colours) { AutoSizeAxes = Axes.Y; User.ValueChanged += e => updateDisplay(e.NewValue); InternalChildren = new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = colours.CommunityUserGrayGreenDarkest, }, new FillFlowContainer { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Padding = new MarginPadding { Horizontal = UserProfileOverlay.CONTENT_X_MARGIN, Vertical = 10 }, Direction = FillDirection.Vertical, Spacing = new Vector2(0, 20), Children = new Drawable[] { new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Children = new Drawable[] { new FillFlowContainer { AutoSizeAxes = Axes.Both, Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, Direction = FillDirection.Horizontal, Spacing = new Vector2(10, 0), Children = new Drawable[] { new OverlinedTotalPlayTime { User = { BindTarget = User } }, medalInfo = new OverlinedInfoContainer { Title = "Medals", LineColour = colours.GreenLight, }, ppInfo = new OverlinedInfoContainer { Title = "pp", LineColour = colours.Red, }, } }, new FillFlowContainer { AutoSizeAxes = Axes.Both, Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, Direction = FillDirection.Horizontal, Children = new[] { scoreRankInfos[ScoreRank.XH] = new ScoreRankInfo(ScoreRank.XH), scoreRankInfos[ScoreRank.X] = new ScoreRankInfo(ScoreRank.X), scoreRankInfos[ScoreRank.SH] = new ScoreRankInfo(ScoreRank.SH), scoreRankInfos[ScoreRank.S] = new ScoreRankInfo(ScoreRank.S), scoreRankInfos[ScoreRank.A] = new ScoreRankInfo(ScoreRank.A), } } } }, new Container { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Padding = new MarginPadding { Right = 130 }, Children = new Drawable[] { rankGraph = new RankGraph { RelativeSizeAxes = Axes.Both, }, new FillFlowContainer { AutoSizeAxes = Axes.Y, Width = 130, Anchor = Anchor.TopRight, Direction = FillDirection.Vertical, Padding = new MarginPadding { Horizontal = 10 }, Spacing = new Vector2(0, 20), Children = new Drawable[] { detailGlobalRank = new OverlinedInfoContainer(true, 110) { Title = "Global Ranking", LineColour = colours.Yellow, }, detailCountryRank = new OverlinedInfoContainer(false, 110) { Title = "Country Ranking", LineColour = colours.Yellow, }, } } } }, } }, }; }