예제 #1
0
        private void load(OsuColour colour)
        {
            RightFlowContainer.Add(new OsuSpriteText
            {
                Text     = $"accuracy: {Score.Accuracy:P2}",
                Anchor   = Anchor.TopRight,
                Origin   = Anchor.TopRight,
                Colour   = colour.GrayA,
                TextSize = 11,
                Font     = "Exo2.0-RegularItalic",
                Depth    = -1,
            });

            LeftFlowContainer.Add(new BeatmapMetadataContainer(Score.Beatmap));
            LeftFlowContainer.Add(new OsuSpriteText
            {
                Text     = Score.Date.LocalDateTime.ToShortDateString(),
                TextSize = 11,
                Colour   = OsuColour.Gray(0xAA),
            });

            foreach (Mod mod in Score.Mods)
            {
                modsContainer.Add(new ModIcon(mod)
                {
                    Scale = new Vector2(0.5f)
                });
            }
        }
        private void load(OsuColour colour)
        {
            var text = new OsuSpriteText
            {
                Text   = $"accuracy: {Score.Accuracy:P2}",
                Anchor = Anchor.TopRight,
                Origin = Anchor.TopRight,
                Colour = colour.GrayA,
                Font   = OsuFont.GetFont(size: 11, weight: FontWeight.Regular, italics: true)
            };

            RightFlowContainer.Add(text);
            RightFlowContainer.SetLayoutPosition(text, 1);

            LeftFlowContainer.Add(new BeatmapMetadataContainer(Score.Beatmap));
            LeftFlowContainer.Add(new DrawableDate(Score.Date));

            foreach (Mod mod in Score.Mods)
            {
                modsContainer.Add(new ModIcon(mod)
                {
                    Scale = new Vector2(0.5f)
                });
            }
        }
예제 #3
0
        private void load(IAPIProvider api)
        {
            this.api = api;

            LeftFlowContainer.Padding = new MarginPadding {
                Left = 10, Right = 160
            };

            LeftFlowContainer.Add(content = new LinkFlowContainer
            {
                AutoSizeAxes     = Axes.Y,
                RelativeSizeAxes = Axes.X,
            });

            RightFlowContainer.Add(new DrawableDate(activity.CreatedAt)
            {
                Font   = OsuFont.GetFont(size: 13),
                Colour = OsuColour.Gray(0xAA),
                Anchor = Anchor.TopRight,
                Origin = Anchor.TopRight,
            });

            var formatted = createMessage();

            content.AddLinks(formatted.Text, formatted.Links);
        }
예제 #4
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);
            }
        }
예제 #5
0
        private void load(OsuColour colour)
        {
            double pp = Score.PP ?? 0;

            RightFlowContainer.Add(new OsuSpriteText
            {
                Text     = $"{pp:0}pp",
                Anchor   = Anchor.TopRight,
                Origin   = Anchor.TopRight,
                TextSize = 18,
                Font     = "Exo2.0-BoldItalic",
            });

            if (weight.HasValue)
            {
                RightFlowContainer.Add(new OsuSpriteText
                {
                    Text     = $"weighted: {pp * weight:0}pp ({weight:P0})",
                    Anchor   = Anchor.TopRight,
                    Origin   = Anchor.TopRight,
                    Colour   = colour.GrayA,
                    TextSize = 11,
                    Font     = "Exo2.0-RegularItalic",
                });
            }
        }
예제 #6
0
        private void load(APIAccess api)
        {
            this.api = api;

            LeftFlowContainer.Padding = new MarginPadding {
                Left = 10, Right = 160
            };

            LeftFlowContainer.Add(content = new LinkFlowContainer
            {
                AutoSizeAxes     = Axes.Y,
                RelativeSizeAxes = Axes.X,
            });

            RightFlowContainer.Add(new OsuSpriteText
            {
                Text     = activity.CreatedAt.LocalDateTime.ToShortDateString(),
                Anchor   = Anchor.TopRight,
                Origin   = Anchor.TopRight,
                Font     = "Exo2.0-RegularItalic",
                TextSize = 12,
                Colour   = OsuColour.Gray(0xAA),
            });

            var formatted = createMessage();

            content.AddLinks(formatted.Text, formatted.Links);
        }
예제 #7
0
 private void load()
 {
     RightFlowContainer.Add(new OsuSpriteText
     {
         Text   = Score.TotalScore.ToString("#,###"),
         Anchor = Anchor.TopRight,
         Origin = Anchor.TopRight,
         Font   = OsuFont.GetFont(size: 18, weight: FontWeight.Bold, italics: true)
     });
 }
예제 #8
0
 private void load()
 {
     RightFlowContainer.Add(new OsuSpriteText
     {
         Text     = Score.TotalScore.ToString("#,###"),
         Anchor   = Anchor.TopRight,
         Origin   = Anchor.TopRight,
         TextSize = 18,
         Font     = "Exo2.0-BoldItalic",
     });
 }
예제 #9
0
        private void load()
        {
            LeftFlowContainer.Add(new BeatmapMetadataContainer(beatmap));
            LeftFlowContainer.Add(new LinkFlowContainer(t => t.Font = OsuFont.GetFont(size: 12))
            {
                RelativeSizeAxes = Axes.X,
                AutoSizeAxes     = Axes.Y,
                Direction        = FillDirection.Horizontal,
            }.With(d =>
            {
                d.AddText("mapped by ");
                d.AddUserLink(beatmap.Metadata.Author);
            }));

            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)
                    },
                }
            });
        }
예제 #10
0
        private void load(OsuColour colour)
        {
            double pp = Score.PP ?? 0;

            RightFlowContainer.Add(new OsuSpriteText
            {
                Text   = $"{pp:0}pp",
                Anchor = Anchor.TopRight,
                Origin = Anchor.TopRight,
                Font   = OsuFont.GetFont(size: 18, weight: FontWeight.Bold, italics: true)
            });

            if (weight.HasValue)
            {
                RightFlowContainer.Add(new OsuSpriteText
                {
                    Text   = $"实得: {pp * weight:0}pp (权重:{weight:P0})",
                    Anchor = Anchor.TopRight,
                    Origin = Anchor.TopRight,
                    Colour = colour.GrayA,
                    Font   = OsuFont.GetFont(size: 11, weight: FontWeight.Regular, italics: true)
                });
            }
        }