zhaoyang 3 роки тому
батько
коміт
91415dd5de

+ 3 - 3
FGUIProject/assets/Common/FloatingTextPromptErrUI.xml

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="354,40" opaque="false">
+<component size="376,70" opaque="false">
   <displayList>
-    <image id="n2_s2cc" name="n2" src="s2cc4l" fileName="imagesExport/zx_jq_rwbszik.png" xy="0,0" size="354,40">
+    <image id="n2_s2cc" name="n2" src="s2cc4l" fileName="imagesExport/zx_jq_rwbszik.png" xy="0,15">
       <relation target="n4_s2cc" sidePair="width-width"/>
     </image>
-    <text id="n4_s2cc" name="txtMessage" xy="85,-1" size="184,41" fontSize="30" color="#ffffff" align="center" singleLine="true" autoClearText="true" text="这是一个提示">
+    <text id="n4_s2cc" name="txtMessage" xy="96,13" size="182,42" fontSize="30" color="#ffffff" align="center" singleLine="true" autoClearText="true" text="这是一个提示">
       <relation target="n2_s2cc" sidePair="center-center"/>
     </text>
   </displayList>

+ 3 - 3
FGUIProject/assets/Common/FloatingTextPromptNarmalUI.xml

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="354,40" opaque="false">
+<component size="1040,70" opaque="false">
   <displayList>
-    <image id="n2_s2cc" name="n2" src="qp4l4q" fileName="imagesExport/zx_jq_rwbszik_normal.png" xy="0,0" size="354,40">
+    <image id="n2_s2cc" name="n2" src="qp4l4q" fileName="imagesExport/zx_jq_rwbszik_normal.png" xy="0,0">
       <relation target="n4_s2cc" sidePair="width-width"/>
     </image>
-    <text id="n4_s2cc" name="txtMessage" xy="85,-1" size="184,41" fontSize="30" color="#ffffff" align="center" singleLine="true" autoClearText="true" text="这是一个提示">
+    <text id="n4_s2cc" name="txtMessage" xy="422,13" size="196,44" fontSize="32" color="#e8dbb3" align="center" singleLine="true" autoClearText="true" text="这是一个提示">
       <relation target="n2_s2cc" sidePair="center-center"/>
     </text>
   </displayList>

BIN
FGUIProject/assets/Common/imagesExport/zx_jq_rwbszik_normal.png


+ 1 - 1
FGUIProject/assets/Common/package.xml

@@ -4,7 +4,7 @@
     <component id="q08x7" name="Button2.xml" path="/components/" exported="true"/>
     <component id="q08x6" name="Button1.xml" path="/components/" exported="true"/>
     <component id="s2cc4k" name="FloatingTextPromptErrUI.xml" path="/" exported="true"/>
-    <image id="s2cc4l" name="zx_jq_rwbszik.png" path="/imagesExport/" exported="true" scale="9grid" scale9grid="197,10,6,20"/>
+    <image id="s2cc4l" name="zx_jq_rwbszik.png" path="/imagesExport/" exported="true" scale="9grid" scale9grid="153,7,76,19"/>
     <component id="d4iw4m" name="ModalStatusUI.xml" path="/" exported="true"/>
     <image id="q08xo" name="ANNIU_3.png" path="/imagesExport/" exported="true"/>
     <component id="q08xu" name="Button3.xml" path="/components/" exported="true"/>

+ 18 - 16
GameClient/Assets/Game/HotUpdate/Controller/PromptController.cs

@@ -26,7 +26,8 @@ namespace GFGGame
                 {
                     _uis.Remove(ui);
                     GTweener gTweener = ui.TweenFade(0, 0.5f);
-                    gTweener.OnComplete(() => { 
+                    gTweener.OnComplete(() =>
+                    {
                         ui.RemoveFromParent();
                         ui.Dispose();
                     });
@@ -38,22 +39,23 @@ namespace GFGGame
         public void ShowFloatTextPrompt(string message, MessageType messageType = MessageType.ERR)
         {
             GComponent ui;
-            switch(messageType)
-            {
-                case MessageType.WARNING:
-                    ui = UI_FloatingTextPromptWarningUI.Proxy().target;
-                    break;
-                case MessageType.NORMAL:
-                    ui = UI_FloatingTextPromptNarmalUI.Proxy().target;
-                    break;
-                case MessageType.SUCCESS:
-                    ui = UI_FloatingTextPromptSuccessUI.Proxy().target;
-                    break;
-                default:
-                    ui = UI_FloatingTextPromptErrUI.Proxy().target;
-                    break;
+            // switch(messageType)
+            // {
+            //     case MessageType.WARNING:
+            //         ui = UI_FloatingTextPromptWarningUI.Proxy().target;
+            //         break;
+            //     case MessageType.NORMAL:
+            //         ui = UI_FloatingTextPromptNarmalUI.Proxy().target;
+            //         break;
+            //     case MessageType.SUCCESS:
+            //         ui = UI_FloatingTextPromptSuccessUI.Proxy().target;
+            //         break;
+            //     default:
+            //         ui = UI_FloatingTextPromptErrUI.Proxy().target;
+            //         break;
 
-            }
+            // }
+            ui = UI_FloatingTextPromptNarmalUI.Proxy().target;
             ViewManager.AddChildToTopLayer(ui);
             GTextField textField = ui.GetChild("txtMessage") as GTextField;
             textField.text = message;

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/CommonGame/BuyConfirmView.cs

@@ -103,7 +103,7 @@ namespace GFGGame
             {
                 _onSuccess();
             }
-            PromptController.Instance.ShowFloatTextPrompt("购买成功!");
+            PromptController.Instance.ShowFloatTextPrompt("购买成功!", MessageType.SUCCESS);
 
             this.Hide();
         }

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioBuyNumView.cs

@@ -38,11 +38,11 @@ namespace GFGGame
 
             EventAgent.AddEventListener(ConstMessage.BUY_STUDIO_PLAY_TIMES, () =>
             {
-                PromptController.Instance.ShowFloatTextPrompt("购买成功");
+                PromptController.Instance.ShowFloatTextPrompt("购买成功", MessageType.SUCCESS);
                 UpdateView();
                 if (_studioData.BuyTimes == _studioCfg.buyNum)
                 {
-                    PromptController.Instance.ShowFloatTextPrompt("今日购买次数已达上限");
+                    PromptController.Instance.ShowFloatTextPrompt("今日购买次数已达上限", MessageType.ERR);
                     this.Hide();
                 }
             });
@@ -84,14 +84,14 @@ namespace GFGGame
         {
             if (_studioData.BuyTimes == _studioCfg.buyNum)
             {
-                PromptController.Instance.ShowFloatTextPrompt("今日购买次数已达上限");
+                PromptController.Instance.ShowFloatTextPrompt("今日购买次数已达上限", MessageType.ERR);
                 return;
             }
             StudioCfgArray.Instance.GetMoneyIdAndNum(_studioCfg.id, _studioData.BuyTimes, 1, out int moneyId, out int moneyNum);
 
             if (type == BUY_TYPE_0 && ItemDataManager.GetItemNum(_studioCfg.itemID) < _studioCfg.itemNum || type == BUY_TYPE_1 && ItemDataManager.GetItemNum(moneyId) < moneyNum)
             {
-                PromptController.Instance.ShowFloatTextPrompt("道具不足");
+                PromptController.Instance.ShowFloatTextPrompt("道具不足", MessageType.ERR);
                 return;
             }
             StudioProxy.ReqBuyStudioPlayTimes(_chapterId, type, 1).Coroutine();

BIN
GameClient/Assets/ResIn/UI/Common/Common_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/Common/Common_atlas0.png


BIN
GameClient/Assets/ResIn/UI/Common/Common_fui.bytes