예제 #1
0
 public ClickableLyric(Lyric lyric)
 {
     AutoSizeAxes     = Axes.Y;
     RelativeSizeAxes = Axes.X;
     Masking          = true;
     CornerRadius     = 5;
     Children         = new[]
     {
         background = new Box
         {
             RelativeSizeAxes = Axes.Both
         },
         icon         = CreateIcon(),
         previewLyric = CreateLyric(lyric),
     };
 }
예제 #2
0
        public override bool SetContent(object content)
        {
            if (!(content is Lyric lyric))
            {
                return(false);
            }

            Child = new PreviewLyricSpriteText(lyric)
            {
                Margin     = new MarginPadding(10),
                Font       = new FontUsage(size: 32),
                RubyFont   = new FontUsage(size: 12),
                RomajiFont = new FontUsage(size: 12)
            };

            return(true);
        }