Beispiel #1
0
 public LinkText()
 {
     AddInternal(content = new OsuHoverContainer
     {
         AutoSizeAxes = Axes.Both,
     });
 }
Beispiel #2
0
        private void load(UserProfileOverlay profileOverlay)
        {
            LeftFlowContainer.Add(new BeatmapMetadataContainer(beatmap));
            LeftFlowContainer.Add(new FillFlowContainer
            {
                RelativeSizeAxes = Axes.X,
                AutoSizeAxes     = Axes.Y,
                Direction        = FillDirection.Horizontal,
                Children         = new Drawable[]
                {
                    new OsuSpriteText
                    {
                        Text = @"mapped by ",
                        Font = OsuFont.GetFont(size: 12)
                    },
                    mapperContainer = new OsuHoverContainer
                    {
                        AutoSizeAxes = Axes.Both,
                        Children     = new Drawable[]
                        {
                            new OsuSpriteText
                            {
                                Text = beatmap.Metadata.AuthorString,
                                Font = OsuFont.GetFont(size: 12, weight: FontWeight.Medium, italics: true)
                            }
                        }
                    },
                }
            });

            RightFlowContainer.Add(new FillFlowContainer
            {
                Anchor       = Anchor.TopRight,
                Origin       = Anchor.TopRight,
                AutoSizeAxes = Axes.Both,
                Direction    = FillDirection.Horizontal,
                Children     = new[]
                {
                    new OsuSpriteText
                    {
                        Anchor = Anchor.BottomRight,
                        Origin = Anchor.BottomRight,
                        Text   = playCount.ToString(),
                        Font   = OsuFont.GetFont(size: 18, weight: FontWeight.SemiBold, italics: true)
                    },
                    new OsuSpriteText
                    {
                        Anchor = Anchor.BottomRight,
                        Origin = Anchor.BottomRight,
                        Text   = @"times played ",
                        Font   = OsuFont.GetFont(size: 12, weight: FontWeight.Regular, italics: true)
                    },
                }
            });

            if (profileOverlay != null)
            {
                mapperContainer.Action = () => profileOverlay.ShowUser(beatmap.BeatmapSet.Metadata.Author);
            }
        }
Beispiel #3
0
        public PaginatedContainer(Bindable <User> user, string header, string missing)
        {
            User.BindTo(user);

            RelativeSizeAxes = Axes.X;
            AutoSizeAxes     = Axes.Y;
            Direction        = FillDirection.Vertical;

            Children = new Drawable[]
            {
                new OsuSpriteText
                {
                    TextSize = 15,
                    Text     = header,
                    Font     = "Exo2.0-RegularItalic",
                    Margin   = new MarginPadding {
                        Top = 10, Bottom = 10
                    },
                },
                ItemsContainer = new FillFlowContainer
                {
                    AutoSizeAxes     = Axes.Y,
                    RelativeSizeAxes = Axes.X,
                    Margin           = new MarginPadding {
                        Bottom = 10
                    }
                },
                ShowMoreButton = new OsuHoverContainer
                {
                    Alpha        = 0,
                    Action       = ShowMore,
                    AutoSizeAxes = Axes.Both,
                    Anchor       = Anchor.TopCentre,
                    Origin       = Anchor.TopCentre,
                    Child        = new OsuSpriteText
                    {
                        TextSize = 14,
                        Text     = "show more",
                        Padding  = new MarginPadding {
                            Vertical = 10, Horizontal = 15
                        },
                    }
                },
                ShowMoreLoading = new LoadingAnimation
                {
                    Anchor = Anchor.TopCentre,
                    Origin = Anchor.TopCentre,
                    Size   = new Vector2(14),
                },
                MissingText = new OsuSpriteText
                {
                    TextSize = 14,
                    Text     = missing,
                    Alpha    = 0,
                },
            };
        }
        public PaginatedScoreContainer(ScoreType type, Bindable <User> user, string header, bool includeWeight = false)
        {
            this.type          = type;
            this.includeWeight = includeWeight;
            this.user.BindTo(user);

            RelativeSizeAxes = Axes.X;
            AutoSizeAxes     = Axes.Y;
            Direction        = FillDirection.Vertical;

            Children = new Drawable[]
            {
                new OsuSpriteText
                {
                    TextSize = 15,
                    Text     = header,
                    Font     = "Exo2.0-RegularItalic",
                    Margin   = new MarginPadding {
                        Top = 10, Bottom = 10
                    },
                },
                scoreContainer = new FillFlowContainer <DrawableScore>
                {
                    AutoSizeAxes     = Axes.Y,
                    RelativeSizeAxes = Axes.X,
                    Direction        = FillDirection.Vertical,
                },
                showMoreButton = new OsuHoverContainer
                {
                    Alpha        = 0,
                    Action       = showMore,
                    AutoSizeAxes = Axes.Both,
                    Anchor       = Anchor.TopCentre,
                    Origin       = Anchor.TopCentre,
                    Child        = new OsuSpriteText
                    {
                        TextSize = 14,
                        Text     = "show more",
                    }
                },
                showMoreLoading = new LoadingAnimation
                {
                    Anchor = Anchor.TopCentre,
                    Origin = Anchor.TopCentre,
                    Size   = new Vector2(14),
                },
                missing = new OsuSpriteText
                {
                    TextSize = 14,
                    Text     = type == ScoreType.Recent ? "No performance records. :(" : "No awesome performance records yet. :(",
                },
            };
        }