示例#1
0
    public UiThemeFont GetFont(UIThemeFontType type)
    {
        var font = fonts[type];

        if (font == null)
        {
            throw new Exception($"font type ${type} is undefined for theme");
        }
        return(font);
    }
示例#2
0
        public void SetFontType(UIThemeFontType aFontType)
        {
            fontType = aFontType;
            var themeFont = theme.GetFont(fontType);

            text.font        = themeFont.font;
            text.lineSpacing = themeFont.spacing;
            text.fontSize    = themeFont.size;
            text.text        = themeFont.isCaps ? value.ToUpper() : value;
        }