From 51b0f6ed9f4e1d3bb6f8144470b46908c7699a96 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期一, 11 五月 2026 16:20:37 +0800
Subject: [PATCH] Merge branch 'master' into h5version
---
Main/Utility/UIHelper.cs | 49 ++++++++++++++++++++++++++++++++++++-------------
1 files changed, 36 insertions(+), 13 deletions(-)
diff --git a/Main/Utility/UIHelper.cs b/Main/Utility/UIHelper.cs
index 0b79d43..43a23f7 100644
--- a/Main/Utility/UIHelper.cs
+++ b/Main/Utility/UIHelper.cs
@@ -237,10 +237,17 @@
/// </summary>
public static string ReplaceLargeNum(double num, int decimalPlaces = 1)
{
- const long K = 10000; //鍥藉唴涓轰竾锛屾捣澶栦负鍗�
- const long M = K * 10000;
- const long B = M * 10000;
- const long T = B * 10000;
+ // 鑾峰彇褰撳墠璇█鐘舵��
+ string langId = Language.Id;
+ bool isChinese = langId == "zh" || langId == "ft";
+
+ // 绠�绻佷腑鏂囦竾杩涘埗 (10000)锛屽叾浠栧崈杩涘埗 (1000)
+ long baseUnit = isChinese ? 10000 : 1000;
+
+ long K = baseUnit;
+ long M = K * baseUnit;
+ long B = M * baseUnit;
+ long T = B * baseUnit;
if (num >= T)
{
@@ -267,10 +274,17 @@
//鐢ㄤ簬缇庢湳瀛� 缁熶竴鐢ㄥ瓧姣岾MBT浠h〃浣跨敤锛屽皬鏁扮偣鐢�.
public static string ReplaceLargeArtNum(double num)
{
- const long K = 10000; //鍥藉唴涓轰竾锛屾捣澶栦负鍗�
- const long M = K * 10000;
- const long B = M * 10000;
- const long T = B * 10000;
+ // 鑾峰彇褰撳墠璇█鐘舵��
+ string langId = Language.Id;
+ bool isChinese = langId == "zh" || langId == "ft";
+
+ // 绠�绻佷腑鏂囦竾杩涘埗 (10000)锛屽叾浠栧崈杩涘埗 (1000)
+ long baseUnit = isChinese ? 10000 : 1000;
+
+ long K = baseUnit;
+ long M = K * baseUnit;
+ long B = M * baseUnit;
+ long T = B * baseUnit;
if (num >= T)
{
@@ -1560,10 +1574,10 @@
serverList.Add(serverName);
//澶暱浼氬鑷寸晫闈㈤《鐐规暟瓒呰繃65000
if (serverList.Count > 1000)
- return string.Join(", ", serverList.ToArray());
+ return string.Join(", ", serverList);
}
}
- return string.Join(", ", serverList.ToArray());
+ return string.Join(", ", serverList);
}
//涓嶅悓鐗堟湰鐜伴噾鐨勫崟浣嶄笉涓�鏍凤紝姣斿瓒婂崡鐩炬槸鏁存暟锛屼笅鍙戞槸鍘熷�硷紱缇庡厓鍜孯MB鏄皬鏁帮紝涓嬪彂鏄師鍊肩殑100
@@ -1580,18 +1594,27 @@
return content;
}
- //澶嶅埗鍒板壀璐存澘
- // TODO 鏆備笉鏀寔web鍚庣画琛ュ厖
+
+
public static void CopyToClipboard(string text)
{
+#if UNITY_WEBGL && !UNITY_EDITOR
+ LaunchUtility.UIHelper_CopyToClipboard(text);
+#else
GUIUtility.systemCopyBuffer = text;
+#endif
Debug.Log("鏂囧瓧宸插鍒跺埌鍓创鏉�: " + text);
}
//鑾峰彇鍓垏鏉垮唴瀹�
public static string GetClipboardText()
{
+#if UNITY_WEBGL && !UNITY_EDITOR
+ // WebGL涓嬫祻瑙堝櫒瀹夊叏闄愬埗锛屾棤娉曞悓姝ヨ鍙栧壀璐存澘
+ return string.Empty;
+#else
return GUIUtility.systemCopyBuffer;
+#endif
}
/// <summary>
@@ -1623,7 +1646,7 @@
UIManager.Instance.CloseWindow<ServersSmallTipWin>();
}
ServersSmallTipWin.serverIDList = serverIDList;
- UIManager.Instance.OpenWindow<ServersSmallTipWin>();
+ UIManager.Instance.OpenWindowAsync<ServersSmallTipWin>().Forget();
}
}
--
Gitblit v1.8.0