コード例 #1
0
ファイル: text_style.cs プロジェクト: wxFancer/UIWidgets
        public ui.TextStyle getTextStyle(ui.TextStyle currentStyle = null)
        {
            if (currentStyle != null)
            {
                return(new ui.TextStyle(
                           color: this.color ?? currentStyle.color,
                           fontSize: this.fontSize ?? currentStyle.fontSize,
                           fontWeight: this.fontWeight ?? currentStyle.fontWeight,
                           fontStyle: this.fontStyle ?? currentStyle.fontStyle,
                           letterSpacing: this.letterSpacing ?? currentStyle.letterSpacing,
                           wordSpacing: this.wordSpacing ?? currentStyle.wordSpacing,
                           textBaseline: this.textBaseline ?? currentStyle.textBaseline,
                           height: this.height ?? currentStyle.height,
                           decoration: this.decoration ?? currentStyle.decoration,
                           decorationColor: this.decorationColor ?? currentStyle.decorationColor,
                           fontFamily: this.fontFamily ?? currentStyle.fontFamily,
                           background: this.background ?? currentStyle.background
                           ));
            }

            return(new ui.TextStyle(
                       color: this.color,
                       fontSize: this.fontSize,
                       fontWeight: this.fontWeight,
                       fontStyle: this.fontStyle,
                       letterSpacing: this.letterSpacing,
                       wordSpacing: this.wordSpacing,
                       textBaseline: this.textBaseline,
                       height: this.height,
                       decoration: this.decoration,
                       decorationColor: this.decorationColor,
                       fontFamily: this.fontFamily,
                       background: this.background
                       ));
        }
コード例 #2
0
ファイル: error.cs プロジェクト: MaxAkbar/com.unity.uiwidgets
 public static ui.TextStyle _initTextStyle()
 {
     ui.TextStyle result = new ui.TextStyle(
         color: new Color(0xFF303030),
         fontFamily: "sans-serif",
         fontSize: 18.0f
         );
     D.assert(() => {
         result = new ui.TextStyle(
             color: new Color(0xFFFFFF66),
             fontFamily: "monospace",
             fontSize: 14.0f,
             fontWeight: FontWeight.bold
             );
         return(true);
     });
     return(result);
 }