Exemplo n.º 1
0
        /// <summary>
        /// 创建元素
        /// </summary>
        /// <param name="source"></param>
        /// <returns></returns>
        public static HtmlElement CreateElement(this FontAwesome source)
        {
            var result = new HtmlElement(HtmlTag.I);

            result.AddClass(string.Format("fa fa-{0}", source.ToString().ToLower().Replace("_", "-")));
            return(result);
        }
            public Icon(FontAwesome fa)
            {
                TooltipText = fa.ToString();

                AutoSizeAxes = Axes.Both;
                Child        = new SpriteIcon
                {
                    Icon = fa,
                    Size = new Vector2(60),
                };
            }
Exemplo n.º 3
0
        public OptionCategory(OsuString titleString, FontAwesome icon = FontAwesome.circle)
        {
            Icon = icon;

            addKeyword(icon.ToString());
            addKeyword(titleString.ToString());

            Title = LocalisationManager.GetString(titleString);
            addKeyword(Title);

            headerText = new pText(Title.ToUpper(), 24, Vector2.Zero, 0, true, SkinManager.NEW_SKIN_COLOUR_SECONDARY)
            {
                Alpha      = 0.4f,
                Origin     = Origins.TopRight,
                Field      = Fields.TopRight,
                TextShadow = false,
            };

            spriteManager.Add(headerText);

            Size = new Vector2(0, 10);

            addKeyword(Title);
        }