Explorar o código

Merge branch 'master' of http://10.108.64.190:3000/gfg/client

guodong %!s(int64=2) %!d(string=hai) anos
pai
achega
c78d13c56c

BIN=BIN
GameClient/Assets/ResIn/UI/ClothingDecompose/ClothingDecompose_fui.bytes


BIN=BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes


+ 56 - 0
GameClient/Assets/ThirdParty/FairyGUI/Scripts/Core/DisplayObject.cs

@@ -1874,5 +1874,61 @@ namespace FairyGUI
             if (displayObject != null)
                 displayObject._flags |= DisplayObject.Flags.GameObjectDisposed;
         }
+
+        //public static string FontName;
+
+        //private void LoadLocalizationFont()
+        //{
+        //    switch (GameEntry.Localization.Language)
+        //    {
+        //        case GameFramework.Localization.Language.ChineseSimplified:
+        //        case GameFramework.Localization.Language.ChineseSimplified:
+        //            LoadFont2("FZZCH_GBK");
+        //            break;
+        //        case GameFramework.Localization.Language.ChineseSimplified:
+        //            LoadFont2("MyFont");
+        //            break;
+        //        default:
+        //            LoadFont2("IMPACT");
+        //            break;
+        //    }
+        //}
+
+        //private void LoadFont2(string fontName)
+        //{
+
+        //    BaseFont newFont = FontManager.GetFont(fontName);
+
+        //    if (newFont == null)
+        //    {
+        //        Debug.Log("字体:" + fontName + ",不存在Resources或Resources/Fonts文件夹下");
+        //        return;
+        //    }
+        //    FGuiForm.setMainFont(fontName);
+        //}
+
+        //public static void SetMainFont(string fontName)
+        //{
+        //    FontName = fontName;
+        //}
+
+        //private void SetFont()
+        //{
+        //    DisplayObjectInfo[] displayObjectInfos = GetComponentsInChildren<DisplayObjectInfo>(true);
+        //    foreach (var item in displayObjectInfos)
+        //    {
+        //        if (item.displayObject.GetType() == typeof(TextField))
+        //        {
+        //            TextField textField = item.displayObject as TextField;
+        //            textField.textFormat.font = FontName;
+        //            textField.ApplyFormat();
+        //        }
+        //        else if (item.displayObject.GetType() == typeof(InputTextField))
+        //        {
+        //            InputTextField textField = item.displayObject as InputTextField;
+        //            textField.textFormat.font = FontName;
+        //        }
+        //    }
+        //}
     }
 }