Ejemplo n.º 1
0
        public override void FreshStyle(YxBaseLabelAdapter labelGo)
        {
            var nlabelAdapter = labelGo as NguiLabelAdapter;

            if (nlabelAdapter == null)
            {
                return;
            }
            var style = nlabelAdapter.Label;

            Label.color          = style.color;
            Label.fontSize       = style.fontSize;
            Label.bitmapFont     = style.bitmapFont;
            Label.fontStyle      = style.fontStyle;
            Label.gradientTop    = style.gradientTop;
            Label.gradientBottom = style.gradientBottom;
            Label.applyGradient  = style.applyGradient;
            Label.effectStyle    = style.effectStyle;
            Label.effectColor    = style.effectColor;
            Label.effectDistance = style.effectDistance;
            Label.spacingX       = style.spacingX;
            Label.spacingY       = style.spacingY;
            Label.floatSpacingX  = style.floatSpacingX;
            Label.floatSpacingY  = style.floatSpacingY;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 设置文本值
 /// </summary>
 /// <param name="component"></param>
 /// <param name="value"></param>
 /// <returns></returns>
 public static bool TrySetComponentValue(this YxBaseLabelAdapter component, string value)
 {
     if (component)
     {
         component.Text(value);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 设置
 /// </summary>
 /// <param name="component"></param>
 /// <param name="value"></param>
 /// <param name="costType"></param>
 /// <param name="format"></param>
 /// <param name="type"></param>
 /// <param name="defaultType"></param>
 /// <returns></returns>
 public static bool TrySetComponentValue(this YxBaseLabelAdapter component, long value, string costType = "", string format = "{0}", YxBaseLabelAdapter.YxELabelType defaultType = YxBaseLabelAdapter.YxELabelType.Normal, YxBaseLabelAdapter.YxELabelType type = YxBaseLabelAdapter.YxELabelType.ReduceNumberWithUnit)
 {
     if (component)
     {
         component.LabelType     = GetLabelTypeByCostType(costType, type, defaultType);
         component.ContentFormat = format;
         component.Text(value);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 设置
 /// </summary>
 /// <param name="component"></param>
 /// <param name="value"></param>
 /// <param name="costType"></param>
 /// <param name="format"></param>
 /// <returns></returns>
 public static bool TrySetComponentValue(YxBaseLabelAdapter component, long value, string costType = "", string format = "{0}")
 {
     if (component)
     {
         component.LabelType     = GetLabelTypeByCostType(costType);
         component.ContentFormat = format;
         component.Text(value);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 5
0
 public override void FreshStyle(YxBaseLabelAdapter labelGo)
 {
 }