From 09bc892c7283df8757a07b646d5af21ddaa263d1 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期四, 06 十一月 2025 18:22:34 +0800
Subject: [PATCH] 164 天子的考验-客户端

---
 Main/System/Tip/ConfirmCancel.cs |  100 ++++++++++++++++++++++++++++++++-----------------
 1 files changed, 65 insertions(+), 35 deletions(-)

diff --git a/Main/System/Tip/ConfirmCancel.cs b/Main/System/Tip/ConfirmCancel.cs
index cc00f34..6fa1683 100644
--- a/Main/System/Tip/ConfirmCancel.cs
+++ b/Main/System/Tip/ConfirmCancel.cs
@@ -192,13 +192,10 @@
     }
 
     //鏈鐧婚檰涓嶅啀鎻愮ず, toggle鐨勭‘璁ょ被鍨嬶紝鏂逛究澶栭儴璋冪敤
-    static Dictionary<int, bool> toggleCheckDict = new Dictionary<int, bool>();
-    public enum ToggleCheckType
-    {
-        Auction = 0, //鎷嶅崠琛�
-    }
+    public static Dictionary<ToggleCheckType, bool> toggleCheckDict = new Dictionary<ToggleCheckType, bool>();
 
-    public static void ToggleConfirmCancelByType(int type, string fullTip, Action func)
+
+    public static void ToggleConfirmCancelByType(ToggleCheckType type, string fullTip, Action func)
     {
         if (toggleCheckDict.ContainsKey(type) && toggleCheckDict[type])
         {
@@ -260,7 +257,11 @@
     public static string generalItemTip;
     public static string generalItemTip2;
 
+    public static int moneyType;
+    public static int moneyNeedCount;
+
     public static List<Item> getItems { get; private set; }
+    public static string replaceItemName;
     /// <summary>
     /// 澶氱墿鍝佺‘璁ゆ
     /// </summary>
@@ -273,7 +274,7 @@
     /// <param name="moneyCnt"></param>
     /// <param name="type"></param>
     public static void ShowItemsConfirm(List<Item> items, string tiltle, string info, Action<bool> func,
-        string info2 = "", string btnText = "", int moneyCnt = 0, int type = 0)
+        string info2 = "", string btnText = "", int moneyCnt = 0, int type = 0, string itemName = "")
     {
         getItems = items;
         generalTitle = tiltle;
@@ -283,6 +284,7 @@
         OnPopConfirmClickEvent = func;
         moneyType = type;
         moneyNeedCount = moneyCnt;
+        replaceItemName = itemName;
         if (!UIManager.Instance.IsOpened<ItemsConfirmWin>())
         {
             UIManager.Instance.OpenWindow<ItemsConfirmWin>();
@@ -290,37 +292,65 @@
     }
 
 
+    public static void MoneyIconToggleConfirmByType(ToggleCheckType type, int moneyCnt, int _moneyType, string fullTip, Action func)
+    {
+        if (toggleCheckDict.ContainsKey(type) && toggleCheckDict[type])
+        {
+            func?.Invoke();
+            return;
+        }
 
-    public static string moneyTitle;
-    public static string moneyTopInfo;
-    public static string moneybtnOkText;
-    public static int moneyType;
-    public static int moneyNeedCount;
-    public static ulong moneyHaveCount;
-    public static string moneyToggleText { get; private set; }
-    public static bool moneytoggleOpen { get; private set; }
-    public static bool moneytoggleOpenState { get; private set; }
+        MoneyIconToggleConfirm(moneyCnt, _moneyType, fullTip, Language.Get("ConfirmCancel102"), (bool isOk, bool isToggle) =>
+            {
+                if (isOk)
+                {
+                    func?.Invoke();
+                    toggleCheckDict[type] = isToggle;
+                }
 
-    // public static Action<bool, bool> OnMoneyToggleConfirmAct;
-    // public static void MoneyIconToggleConfirm(string title, string topInfo,string okTxt, int type,
-    //  int needCnt, ulong haveCnt, Action<bool, bool> func, bool toggleOpen = false, string toggleTxt = "", bool toggleOpenState = false)
-    // {
-    //     moneyTitle = title;
-    //     moneyTopInfo = topInfo;
-    //     moneybtnOkText = okTxt;
-    //     moneyType = type;
-    //     moneyNeedCount = needCnt;
-    //     moneyHaveCount = haveCnt;
-    //     moneyToggleText = toggleTxt;
-    //     moneytoggleOpen = toggleOpen;
-    //     moneytoggleOpenState = toggleOpenState;
-    //     OnMoneyToggleConfirmAct = func;
-    //     if (!UIManager.Instance.IsOpened<MoneyIconToggleConfirmWin>())
-    //     {
-    //         UIManager.Instance.OpenWindow<MoneyIconToggleConfirmWin>();
-    //     }
-    // }
+            });
+    }
 
+
+
+    //璐у竵纭妗�:鏈夋樉绀哄嬀閫夌殑
+    public static Action<bool, bool> OnMoneyToggleConfirmAct;
+    public static void MoneyIconToggleConfirm(int moneyCnt, int _moneyType, string content, string toggleTxt, Action<bool, bool> func, bool _toggle = false)
+    {
+        generalContent = content;
+        toggleContent = toggleTxt;
+        OnToggleConfirmEvent = func;
+        toggleOpenState = _toggle;
+        moneyType = _moneyType;
+        moneyNeedCount = moneyCnt;
+        if (!UIManager.Instance.IsOpened<MoneyIconToggleConfirmWin>())
+        {
+            UIManager.Instance.OpenWindow<MoneyIconToggleConfirmWin>();
+        }
+    }
+
+    //璐у竵纭妗�:涓嶆樉绀哄嬀閫夌殑
+    public static void MoneyIconConfirm(int moneyCnt, int _moneyType, string content, Action<bool, bool> func)
+    {
+        generalContent = content;
+        OnToggleConfirmEvent = func;
+        moneyType = _moneyType;
+        moneyNeedCount = moneyCnt;
+        if (!UIManager.Instance.IsOpened<MoneyIconToggleConfirmWin>())
+        {
+            UIManager.Instance.OpenWindow<MoneyIconToggleConfirmWin>();
+        }
+    }
+
+
+}
+
+public enum ToggleCheckType
+{
+    Auction = 0, //鎷嶅崠琛�
+    WashCancel = 1, //娲楃粌鍙栨秷
+    GoldRush = 2,   //娣橀噾 
+    BoneField = 3,   //鐧介鐩堥噹
 }
 
 

--
Gitblit v1.8.0