Browse Source

快速挑战消耗显示

zhaoyang 2 years ago
parent
commit
65da8f4ccb

+ 6 - 6
FGUIProject/assets/Main/StoryLevelInfoUI.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1345" designImageOffsetX="-750">
-  <controller name="ctrlNeed" pages="0,,1,,2,,3," selected="3"/>
+  <controller name="ctrlNeed" pages="0,,1,,2,,3," selected="0"/>
   <displayList>
     <loader id="n44_yoe2" name="btnBg" xy="0,0" size="1080,1345" touchable="false" url="ui://mfvz4q8kj48o94" autoSize="true"/>
     <component id="n0_vxw5" name="btnStart" src="t8o13i" fileName="componentsLevel/ButtonStart.xml" xy="756,969">
@@ -57,18 +57,18 @@
       <item/>
       <item/>
     </list>
-    <component id="n19_t8o1" name="btnFightOnce" src="v95qtjw" fileName="components/Button22.xml" pkg="mk0fwx0x" xy="102,1046" group="n23_t8o1">
+    <component id="n19_t8o1" name="btnFightOnce" src="v95qtjw" fileName="components/Button22.xml" pkg="mk0fwx0x" xy="102,1069" group="n23_t8o1">
       <Button title="挑战一次"/>
     </component>
-    <component id="n20_t8o1" name="btnFightTimes" src="v95qtjw" fileName="components/Button22.xml" pkg="mk0fwx0x" xy="425,1046" group="n23_t8o1">
+    <component id="n20_t8o1" name="btnFightTimes" src="v95qtjw" fileName="components/Button22.xml" pkg="mk0fwx0x" xy="425,1069" group="n23_t8o1">
       <Button title="挑战十次"/>
     </component>
-    <group id="n23_t8o1" name="groupPass" xy="102,1046" size="596,78" advanced="true" layout="hz" colGap="50" excludeInvisibles="true">
+    <group id="n23_t8o1" name="groupPass" xy="102,1069" size="596,78" advanced="true" layout="hz" colGap="50" excludeInvisibles="true">
       <relation target="n0_vxw5" sidePair="right-right"/>
     </group>
     <loader id="n46_kzvk" name="btnGuide" xy="480,1455" size="120,120"/>
-    <text id="n22_t8o1" name="txtUnpassTips" xy="200,1055" pivot="0.5,0" size="404,54" group="n24_t8o1" fontSize="40" color="#d1b3b1" align="center" vars="true" singleLine="true" text="{count=二}星及以上可快速通关"/>
-    <group id="n24_t8o1" name="groupUnpass" xy="200,1055" size="404,54" advanced="true"/>
+    <text id="n22_t8o1" name="txtUnpassTips" xy="200,1079" pivot="0.5,0" size="404,54" group="n24_t8o1" fontSize="40" color="#d1b3b1" align="center" vars="true" singleLine="true" text="{count=二}星及以上可快速通关"/>
+    <group id="n24_t8o1" name="groupUnpass" xy="200,1079" size="404,54" advanced="true"/>
     <text id="n67_v95q" name="n67" xy="791,1211" size="60,39" group="n55_rqo4" fontSize="28" color="#b89370" vAlign="middle" vars="true" text="花费"/>
     <loader id="n47_m1l9" name="loaCost" xy="862,1201" size="60,60" group="n55_rqo4" url="ui://eg2y0ldpq08x4" autoSize="true"/>
     <text id="n18_t8o1" name="txtPowerDesc" xy="933,1211" size="21,39" group="n55_rqo4" fontSize="28" color="#b19270" vAlign="middle" vars="true" text="{power=5}"/>

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightQuicklyView.cs

@@ -227,11 +227,12 @@ namespace GFGGame
                 InstanceZonesDataManager.GetCanFightTime(_type, _storyType, _levelID, out _fightTimes, out string title);
                 _ui.m_btnFightTimes.title = _fightType == 1 ? "挑战一次" : title;
                 _ui.m_btnFightTimes.visible = _fightTimes > 0;
-                _ui.m_comCostCurrent.visible = _fightTimes > 0;
 
                 _fightTimes = _fightType == 1 ? 1 : _fightTimes;
                 int power = _fightTimes * levelCfg.power;
                 ItemUtil.SetItemNeedNum(_ui.m_comCostCurrent, ConstItemID.POWER, power);
+                _ui.m_comCostCurrent.visible = _fightTimes > 0 && power > 0;
+
             }
         }
 

BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes