private static string UpdateUILabelByConfig(UILabel uiConfigLabel, int fontID)
    {
        if (null == uiConfigLabel || fontID <= 0)
        {
            return(null);
        }

        ClientUIFontDto tClientUIFontDto = TempFontData.GetFontData(fontID);

        return(UpdateUILabelByConfig(uiConfigLabel, tClientUIFontDto));
    }
    /// <summary>
    /// 得到FontI的颜色Hex值
    /// </summary>
    /// <param name="colorId"></param>
    /// <param name="DefaultId"></param>
    /// <returns></returns>
    public static string GetColorHexStr(int colorId, int DefaultId = -1)
    {
        ClientUIFontDto colorData = TempFontData.GetFontData(colorId);

        if (colorData == null)
        {
            if (DefaultId == -1)
            {
                return("FFFFFFFF");
            }
            return(GetColorHexStr(DefaultId));
        }
        return(colorData.colorTint.Replace("#", string.Empty));
    }
    /// <summary>
    /// 改变字体大小(必须存在字大小的字体数据)
    /// </summary>
    /// <param name="fontId"></param>
    /// <param name="fontSize"></param>
    /// <returns></returns>
    public static int ChangeFontIdSize(int fontId, int fontSize)
    {
        ClientUIFontDto fontData = TempFontData.GetFontData(fontId);

        if (fontData != null && fontData.fontSize != fontSize)
        {
            int temp = fontId;
            fontId   = int.Parse(fontId.ToString().Substring(0, fontId.ToString().Length - 3) + fontSize.ToString());
            fontData = TempFontData.GetFontData(fontId);
            if (fontData == null)
            {
                fontId = temp;
            }
        }
        return(fontId);
    }
    private static ClientUIFontDto AddClientUiFontDto(int FontId)
    {
        var data = new ClientUIFontDto();

        data.id             = FontId;
        data.shortDesc      = "通用深";
        data.fontName       = "SIMYOU";
        data.colorTint      = "#2E303FFF";
        data.fontSize       = 22;
        data.fontStyle      = 0;
        data.gradient       = false;
        data.gradientTop    = "";
        data.gradientBottom = "";
        data.effect         = 0;
        data.effectColor    = "";
        data.effectX        = 0;
        data.effectY        = 0;
        data.spacingX       = 0;
        data.spacingY       = 0;
        return(data);
    }
 private static string UpdateUILabelByConfig(UILabel uiConfigLabel, ClientUIFontDto ClientUIFontDto)
 {
     if (null == uiConfigLabel || null == ClientUIFontDto)
     {
         return(null);
     }
     uiConfigLabel.fontSize       = ClientUIFontDto.fontSize;
     uiConfigLabel.bitmapFont     = FontManager.GetFontNoNull(ClientUIFontDto.fontName);
     uiConfigLabel.fontStyle      = (FontStyle)ClientUIFontDto.fontStyle;
     uiConfigLabel.applyGradient  = ClientUIFontDto.gradient;
     uiConfigLabel.gradientTop    = ColorExt.HexStrToColor(ClientUIFontDto.gradientTop);
     uiConfigLabel.gradientBottom = ColorExt.HexStrToColor(ClientUIFontDto.gradientBottom);
     uiConfigLabel.effectStyle    = (UILabel.Effect)ClientUIFontDto.effect;
     uiConfigLabel.effectColor    = ColorExt.HexStrToColor(ClientUIFontDto.effectColor.ToString());
     uiConfigLabel.effectDistance = new Vector2(ClientUIFontDto.effectX, ClientUIFontDto.effectY);
     uiConfigLabel.floatSpacingX  = ClientUIFontDto.spacingX;
     uiConfigLabel.floatSpacingY  = ClientUIFontDto.spacingY;
     uiConfigLabel.spacingX       = ClientUIFontDto.spacingX;
     uiConfigLabel.spacingY       = ClientUIFontDto.spacingY;
     uiConfigLabel.color          = ColorExt.HexStrToColor(ClientUIFontDto.colorTint);
     return(ClientUIFontDto.shortDesc);
 }