浏览代码

feat GM面板修改

Jae 2 年之前
父节点
当前提交
3daa19385d

+ 1 - 1
FGUIProject/assets/RoleInfo/GMPanelUI.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="600,600">
   <displayList>
-    <loader id="n0_d4iw" name="bg" xy="0,0" size="600,730" url="ui://mk0fwx0xq08x4" fill="scaleFree"/>
+    <loader id="n0_d4iw" name="bg" xy="0,0" size="603,718" url="ui://mk0fwx0xq08x4" fill="scaleFree"/>
     <component id="n11_c5sc" name="ComBtn" src="lqp0dm" fileName="components/ComBtn.xml" xy="45,51"/>
     <richtext id="n3_c5sc" name="n3" xy="70,472" size="134,36" group="n14_g926" fontSize="26" color="#999999" text="添加物品:"/>
     <graph id="n5_c5sc" name="n5" xy="249,467" size="219,42" group="n14_g926" type="rect" lineSize="0" fillColor="#ffd0cfdb">

+ 12 - 0
FGUIProject/assets/RoleInfo/components/ComBtn.xml

@@ -57,5 +57,17 @@
       <Button title="活动结束" titleFontSize="30"/>
     </component>
     <group id="n48_miy3" name="n48" xy="0,426" size="499,47" advanced="true" layout="hz" colGap="40" excludeInvisibles="true"/>
+    <component id="n60_y5mt" name="btnAddLeagueNum" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,492" size="166,46" group="n53_y5mt">
+      <Button title="添加联盟值" titleFontSize="30"/>
+    </component>
+    <text id="n50_y5mt" name="AddLeagueNumType" xy="184,492" size="139,42" group="n53_y5mt" fontSize="30" vAlign="middle" autoSize="none" text="" input="true" prompt="[color=#999999][size=18]计数类型[/size][/color]" keyboardType="4"/>
+    <text id="n51_y5mt" name="AddNum" xy="354,492" size="141,42" group="n53_y5mt" fontSize="30" vAlign="middle" autoSize="none" text="" input="true" prompt="[color=#999999][size=18]计数值[/size][/color]" keyboardType="4"/>
+    <group id="n53_y5mt" name="n53" xy="1,492" size="494,46"/>
+    <component id="n61_y5mt" name="btnSetLeaguNum" src="c5sc8h" fileName="components/ButtonGM.xml" xy="1,545" size="166,46" group="n58_y5mt">
+      <Button title="设置联盟值" titleFontSize="30"/>
+    </component>
+    <text id="n55_y5mt" name="SetLeagueNumType" xy="186,545" size="139,42" group="n58_y5mt" fontSize="30" vAlign="middle" autoSize="none" text="" input="true" prompt="[color=#999999][size=18]计数类型[/size][/color]" keyboardType="4"/>
+    <text id="n56_y5mt" name="SetNum" xy="354,545" size="141,42" group="n58_y5mt" fontSize="30" vAlign="middle" autoSize="none" text="" input="true" prompt="[color=#999999][size=18]计数值[/size][/color]" keyboardType="4"/>
+    <group id="n58_y5mt" name="n58" xy="1,545" size="494,46"/>
   </displayList>
 </component>

+ 18 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/RoleInfo/UI_ComBtn.cs

@@ -24,6 +24,12 @@ namespace UI.RoleInfo
         public GButton m_btnAnswerStart;
         public GButton m_btnAnswerEnd;
         public GButton m_btnAnswerActiveEnd;
+        public GButton m_btnAddLeagueNum;
+        public GTextInput m_AddLeagueNumType;
+        public GTextInput m_AddNum;
+        public GButton m_btnSetLeaguNum;
+        public GTextInput m_SetLeagueNumType;
+        public GTextInput m_SetNum;
         public const string URL = "ui://374k3dwvlqp0dm";
         public const string PACKAGE_NAME = "RoleInfo";
         public const string RES_NAME = "ComBtn";
@@ -88,6 +94,12 @@ namespace UI.RoleInfo
             m_btnAnswerStart = (GButton)comp.GetChild("btnAnswerStart");
             m_btnAnswerEnd = (GButton)comp.GetChild("btnAnswerEnd");
             m_btnAnswerActiveEnd = (GButton)comp.GetChild("btnAnswerActiveEnd");
+            m_btnAddLeagueNum = (GButton)comp.GetChild("btnAddLeagueNum");
+            m_AddLeagueNumType = (GTextInput)comp.GetChild("AddLeagueNumType");
+            m_AddNum = (GTextInput)comp.GetChild("AddNum");
+            m_btnSetLeaguNum = (GButton)comp.GetChild("btnSetLeaguNum");
+            m_SetLeagueNumType = (GTextInput)comp.GetChild("SetLeagueNumType");
+            m_SetNum = (GTextInput)comp.GetChild("SetNum");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -108,6 +120,12 @@ namespace UI.RoleInfo
             m_btnAnswerStart = null;
             m_btnAnswerEnd = null;
             m_btnAnswerActiveEnd = null;
+            m_btnAddLeagueNum = null;
+            m_AddLeagueNumType = null;
+            m_AddNum = null;
+            m_btnSetLeaguNum = null;
+            m_SetLeagueNumType = null;
+            m_SetNum = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 42 - 26
GameClient/Assets/Game/HotUpdate/Views/RoleInfo/GMPanelView.cs

@@ -39,12 +39,28 @@ namespace GFGGame
             _ui.m_ComBtn.m_btnAnswerEnd.onClick.Add(OnClickBtnEnd);
             _ui.m_ComBtn.m_btnAnswerActiveEnd.onClick.Add(OnClickBtnActiveEnd);
             _ui.m_ComBtn.m_btnLeagueSkill.onClick.Add(OnClickBtnLeagueSkill);
+            _ui.m_ComBtn.m_btnAddLeagueNum.onClick.Add(OnClickBtnLeagueAddNum);
+            _ui.m_ComBtn.m_btnSetLeaguNum.onClick.Add(OnClickBtnLeagueSetNum);
             _ui.m_btnAddItem.onClick.Add(OnClickBtnAddItem);
             _ui.m_btnGM.onClick.Add(OnClickBtnGM);
             _ui.m_btnAddNum.onClick.Add(OnClickBtnAddCount);
             _ui.m_btnSetNum.onClick.Add(OnClickBtnSetCount);
         }
 
+        private void OnClickBtnLeagueSetNum(EventContext context)
+        {
+            var setType = _ui.m_ComBtn.m_SetLeagueNumType.text;
+            var setNum = _ui.m_ComBtn.m_SetNum.text;
+            GMController.SendGMCommand($"setLeagueValue 0 {setType} {setNum}", "").Coroutine();
+        }
+
+        private void OnClickBtnLeagueAddNum(EventContext context)
+        {
+            var addType = _ui.m_ComBtn.m_AddLeagueNumType.text;
+            var addNum = _ui.m_ComBtn.m_AddNum.text;
+            GMController.SendGMCommand($"setLeagueValue 1 {addType} {addNum}", "").Coroutine();
+        }
+
         protected override void OnShown()
         {
             base.OnShown();
@@ -74,7 +90,7 @@ namespace GFGGame
             string[] infos = Regex.Split(content, " ");
             if (infos.Length < 2)
             {
-                PromptController.Instance.ShowFloatTextPrompt("请按照指定格式输入物品信息", MessageType.ERR);
+                PromptController.Instance.ShowFloatTextPrompt("锟诫按锟斤拷指锟斤拷锟斤拷式锟斤拷锟斤拷锟斤拷品锟斤拷息", MessageType.ERR);
                 return;
             }
 
@@ -85,18 +101,18 @@ namespace GFGGame
                 string messageSuc;
                 if (itemNum > 0)
                 {
-                    messageSuc = "已获得物品" + itemId + "*" + itemNum;
+                    messageSuc = "锟窖伙拷锟斤拷锟狡�" + itemId + "*" + itemNum;
                     GMController.SendGMCommand("getItem " + content, messageSuc).Coroutine();
                 }
                 else if (itemNum < 0)
                 {
-                    messageSuc = "已扣除物品" + itemId + "*" + itemNum;
+                    messageSuc = "锟窖扣筹拷锟斤拷品" + itemId + "*" + itemNum;
                     GMController.SendGMCommand("getItem " + content, messageSuc).Coroutine();
                 }
             }
             else
             {
-                PromptController.Instance.ShowFloatTextPrompt("请按照指定格式输入物品信息", MessageType.ERR);
+                PromptController.Instance.ShowFloatTextPrompt("锟诫按锟斤拷指锟斤拷锟斤拷式锟斤拷锟斤拷锟斤拷品锟斤拷息", MessageType.ERR);
             }
         }
 
@@ -105,11 +121,11 @@ namespace GFGGame
             int tmp;
             if (!int.TryParse(_ui.m_ComBtn.m_txtRoleLv.text, out tmp))
             {
-                PromptController.Instance.ShowFloatTextPrompt("请输入数字");
+                PromptController.Instance.ShowFloatTextPrompt("锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷");
                 return;
             }
             string lv = _ui.m_ComBtn.m_txtRoleLv.text;
-            string messageSuc = "等级提升至" + lv;
+            string messageSuc = "锟饺硷拷锟斤拷锟斤拷锟斤拷" + lv;
 
             GMController.SendGMCommand("lv " + lv, messageSuc).Coroutine();
         }
@@ -121,11 +137,11 @@ namespace GFGGame
             if (!int.TryParse(_ui.m_ComBtn.m_txtChapter.text, out tmp) ||
                 !int.TryParse(_ui.m_ComBtn.m_txtChapterLv.text, out tmp1))
             {
-                PromptController.Instance.ShowFloatTextPrompt("请输入数字");
+                PromptController.Instance.ShowFloatTextPrompt("锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷");
                 return;
             }
             string content = _ui.m_ComBtn.m_txtChapter.text + " " + _ui.m_ComBtn.m_txtChapterLv.text;
-            string messageSuc = string.Format("当前关卡第{0}章第{1}关", _ui.m_ComBtn.m_txtChapter.text,
+            string messageSuc = string.Format("锟斤拷前锟截匡拷锟斤拷{0}锟铰碉拷{1}锟斤拷", _ui.m_ComBtn.m_txtChapter.text,
                 _ui.m_ComBtn.m_txtChapterLv.text);
             GMController.SendGMCommand("chapter " + content, messageSuc).Coroutine();
         }
@@ -137,7 +153,7 @@ namespace GFGGame
             if (result)
             {
                 GameGlobal.skipCheckOpen = !GameGlobal.skipCheckOpen;
-                PromptController.Instance.ShowFloatTextPrompt("已开启跳过功能开启检测");
+                PromptController.Instance.ShowFloatTextPrompt("锟窖匡拷锟斤拷锟斤拷锟斤拷锟斤拷锟杰匡拷锟斤拷锟斤拷锟�");
             }
         }
 
@@ -145,7 +161,7 @@ namespace GFGGame
         {
             string gm = string.Format("SetArenaRank|{0}|{1}", _ui.m_ComBtn.m_txtArenaGrade.text,
                 _ui.m_ComBtn.m_txtArenaRank.text);
-            bool result = await GMController.SendGMCommand(gm, "修改成功");
+            bool result = await GMController.SendGMCommand(gm, "锟睫改成癸拷");
             if (result)
             {
                 ArenaDataManager.Instance.Grade = int.Parse(_ui.m_ComBtn.m_txtArenaGrade.text);
@@ -156,17 +172,17 @@ namespace GFGGame
 
         private void OnClickBtnStart()
         {
-            GMController.SendGMCommand("League|StartQuestion", "开始答题").Coroutine();
+            GMController.SendGMCommand("League|StartQuestion", "锟斤拷始锟斤拷锟斤拷").Coroutine();
         }
 
         private void OnClickBtnEnd()
         {
-            GMController.SendGMCommand("League|EndQuestion", "结束答题").Coroutine();
+            GMController.SendGMCommand("League|EndQuestion", "锟斤拷锟斤拷锟斤拷锟斤拷").Coroutine();
         }
 
         private void OnClickBtnActiveEnd()
         {
-            GMController.SendGMCommand("League|CloseQuestion", "活动结束").Coroutine();
+            GMController.SendGMCommand("League|CloseQuestion", "锟筋动锟斤拷锟斤拷").Coroutine();
         }
 
         private async void OnClickBtnLeagueSkill()
@@ -194,12 +210,12 @@ namespace GFGGame
                 long hasCount = ItemDataManager.GetItemNum(skillCfg.consumeArr[0][0]);
                 if (hasCount < needCount)
                 {
-                    PromptController.Instance.ShowFloatTextPrompt("消耗不足");
+                    PromptController.Instance.ShowFloatTextPrompt("锟斤拷锟侥诧拷锟斤拷");
                     break;
                 }
                 await SkillSProxy.ReqActiveSkill(SkillType.LeagueSkill, skillId);
             }
-            PromptController.Instance.ShowFloatTextPrompt("学习结束");
+            PromptController.Instance.ShowFloatTextPrompt("学习锟斤拷锟斤拷");
         }
 
         private async void OnClickBtnAll()
@@ -225,51 +241,51 @@ namespace GFGGame
             string[] infos = Regex.Split(content, " ");
             if (infos.Length < 2)
             {
-                PromptController.Instance.ShowFloatTextPrompt("请按照指定格式输入物品信息", MessageType.ERR);
+                PromptController.Instance.ShowFloatTextPrompt("锟诫按锟斤拷指锟斤拷锟斤拷式锟斤拷锟斤拷锟斤拷品锟斤拷息", MessageType.ERR);
                 return;
             }
             switch (infos[0])
             {
                 case "log":
-                    if (infos[1] == "1") //开启日志按
+                    if (infos[1] == "1") //锟斤拷锟斤拷锟斤拷志锟斤拷
                     {
                         LogController.Instance.SetBtnLogVisable(true);
                     }
-                    else if (infos[1] == "0") //关闭日志按
+                    else if (infos[1] == "0") //锟截憋拷锟斤拷志锟斤拷
                     {
                         LogController.Instance.SetBtnLogVisable(false);
                     }
                     else
                     {
-                        PromptController.Instance.ShowFloatTextPrompt(string.Format("log指令没有{0}这个状态", infos[1]));
+                        PromptController.Instance.ShowFloatTextPrompt(string.Format("log指锟斤拷没锟斤拷{0}锟斤拷锟阶刺�", infos[1]));
                     }
                     break;
                 case "cjstime":
                     if (infos[1].Length != 10)
                     {
-                        PromptController.Instance.ShowFloatTextPrompt("请输入以秒为单位的正确的时间戳");
+                        PromptController.Instance.ShowFloatTextPrompt("锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷为锟斤拷位锟斤拷锟斤拷确锟斤拷时锟斤拷锟�");
                         return;
                     }
                     LuckyBoxDataManager.Instance.startTime = int.Parse(infos[1]);
-                    PromptController.Instance.ShowFloatTextPrompt("设置成功");
+                    PromptController.Instance.ShowFloatTextPrompt("锟斤拷锟矫成癸拷");
 
                     break;
                 case "cjetime":
                     if (infos[1].Length != 10)
                     {
-                        PromptController.Instance.ShowFloatTextPrompt("请输入以秒为单位的正确的时间戳");
+                        PromptController.Instance.ShowFloatTextPrompt("锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷为锟斤拷位锟斤拷锟斤拷确锟斤拷时锟斤拷锟�");
                         return;
                     }
                     LuckyBoxDataManager.Instance.endTime = int.Parse(infos[1]);
-                    PromptController.Instance.ShowFloatTextPrompt("设置成功");
+                    PromptController.Instance.ShowFloatTextPrompt("锟斤拷锟矫成癸拷");
                     break;
                 default:
-                    GMController.SendGMCommand(content, "设置成功").Coroutine();
+                    GMController.SendGMCommand(content, "锟斤拷锟矫成癸拷").Coroutine();
                     break;
             }
         }
 
-        //设置计数
+        //锟斤拷锟矫硷拷锟斤拷
         private void OnClickBtnSetCount(EventContext context)
         {
             var roleNumType = _ui.m_RoleNumType.text;
@@ -279,7 +295,7 @@ namespace GFGGame
             GMController.SendGMCommand($"setNum {roleNumType} {num}", "").Coroutine();
         }
 
-        //添加计数值
+        //锟斤拷蛹锟斤拷锟街�
         private void OnClickBtnAddCount(EventContext context)
         {
             var roleNumType = _ui.m_AddRoleNumType.text;

二进制
GameClient/Assets/ResIn/UI/RoleInfo/RoleInfo_fui.bytes