コード例 #1
0
 private void setTextAsync(string text)
 {
     textFlow?.Expire();
     TextContainer.Add(textFlow = new OsuTextFlowContainer(s => s.Font = s.Font.With(size: 14))
     {
         RelativeSizeAxes = Axes.X,
         AutoSizeAxes     = Axes.Y,
         Colour           = Color4.White.Opacity(0.75f),
         Text             = text
     });
 }
コード例 #2
0
            private void setTextAsync(string text)
            {
                LoadComponentAsync(new OsuTextFlowContainer(s => s.TextSize = 14)
                {
                    RelativeSizeAxes = Axes.X,
                    AutoSizeAxes     = Axes.Y,
                    Colour           = Color4.White.Opacity(0.75f),
                    Text             = text
                }, loaded =>
                {
                    textFlow?.Expire();
                    textContainer.Add(textFlow = loaded);

                    // fade in if we haven't yet.
                    this.FadeIn(transition_duration);
                });
            }
コード例 #3
0
        private void setTextAsync(string text)
        {
            LoadComponentAsync(new LinkFlowContainer(s => s.Font = s.Font.With(size: 14))
            {
                RelativeSizeAxes = Axes.X,
                AutoSizeAxes     = Axes.Y,
                Colour           = Colour4.White.Opacity(0.75f),
            }, loaded =>
            {
                textFlow?.Expire();

                switch (type)
                {
                case MetadataType.Tags:
                    string[] tags = text.Split(" ");

                    for (int i = 0; i <= tags.Length - 1; i++)
                    {
                        loaded.AddLink(tags[i], LinkAction.SearchBeatmapSet, tags[i]);

                        if (i != tags.Length - 1)
                        {
                            loaded.AddText(" ");
                        }
                    }

                    break;

                case MetadataType.Source:
                    loaded.AddLink(text, LinkAction.SearchBeatmapSet, text);
                    break;

                default:
                    loaded.AddText(text);
                    break;
                }

                textContainer.Add(textFlow = loaded);

                // fade in if we haven't yet.
                textContainer.FadeIn(transition_duration);
            });
        }