|
@@ -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;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //}
|
|
|
}
|
|
|
}
|