done ui action

This commit is contained in:
VDH
2026-01-30 11:37:10 +07:00
parent e2e63b83f2
commit 0de2995ab6
11 changed files with 1336 additions and 3238 deletions
File diff suppressed because it is too large Load Diff
@@ -1076,7 +1076,6 @@ namespace BrewMonster
{
try
{
BMLogger.LogError("LoadUserConfigData: Start loading user config data");
using (MemoryStream ms = new MemoryStream(pDataBuf, 0, iDataSize))
using (BinaryReader reader = new BinaryReader(ms))
{
@@ -267,11 +267,6 @@ namespace BrewMonster
{
m_aShortcuts[iSlot] = null;
}
CECSCSkill skill;
if ((skill = pShortcut as CECSCSkill) != null)
{
BMLogger.LogError("SetShortcut: Setting shortcut at slot " + iSlot + $" skill = {skill.GetSkill().GetName()}");
}
m_aShortcuts[iSlot] = pShortcut;
}
@@ -12,11 +12,59 @@ namespace BrewMonster
public class CDlgSkillSubAction : MonoBehaviour
{
[SerializeField] List<ActionInfo> m_aActionInfo = new List<ActionInfo>();
[SerializeField] Transform orderContain;
[SerializeField] AUIImagePicture orderTemplate;
[SerializeField] AUIImagePicture actionTemplate;
[SerializeField] Transform actionContain;
private void Awake()
{
if (orderContain == null)
{
BMLogger.LogError("CDlgSkillSubAction: orderContain is not assigned!");
return;
}
;
if (actionContain == null)
{
BMLogger.LogError("CDlgSkillSubAction: actionContain is not assigned!");
return;
}
Init();
}
private void OnEnable()
{
OnShowDialog();
}
public void Init()
{
int[] objCount = { 8, 2, 2, 27 };
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < objCount[i]; j++)
{
var orderTP = Instantiate(orderTemplate, orderContain);
orderTP.gameObject.SetActive(true);
m_aActionInfo.Add(new ActionInfo
{
image = orderTP,
pLabel = orderTP.GetComponentInChildren<TextMeshProUGUI>()
});
}
}
for (int j = 0; j < 27; j++)
{
var actionTP = Instantiate(actionTemplate, actionContain);
actionTP.gameObject.SetActive(true);
m_aActionInfo.Add(new ActionInfo
{
image = actionTP,
pLabel = actionTP.GetComponentInChildren<TextMeshProUGUI>()
});
}
}
public void OnShowDialog()
{
AUIImagePicture pImage;
@@ -26,10 +74,10 @@ namespace BrewMonster
var gameUIMan = CECUIManager.Instance.GetInGameUIMan();
CECGameRun pGameRun = CECGameRun.Instance;
int[] objCount = { 9, 3, 3, 30 };
int[] objCount = { 8, 2, 2, 27 };
CECShortcutSet[] a_pSC =
{
pGameRun.GetGenCmdShortcuts(),
pGameRun.GetGenCmdShortcuts(),
pGameRun.GetTeamCmdShortcuts(),
pGameRun.GetTradeCmdShortcuts(),
pGameRun.GetPoseCmdShortcuts()
@@ -56,17 +104,18 @@ namespace BrewMonster
}
else
{
/* pImage->Show(false);
pLabel->Show(false);*/
/* pImage->Show(false);
pLabel->Show(false);*/
}
count++;
}
}
}
[Serializable]
public struct ActionInfo
{
public AUIImagePicture image;
public TextMeshProUGUI pLabel;
}
[Serializable]
public struct ActionInfo
{
public AUIImagePicture image;
public TextMeshProUGUI pLabel;
}
}
}
@@ -25,6 +25,7 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
if (skillbutton == null)
{
Debug.LogError("Skill Button is not assigned in AUIImagePicture");
return;
}
skillbutton.onClick.AddListener(Execute);
}
@@ -25,7 +25,7 @@ namespace BrewMonster.UI
private Dictionary<byte, (string, Sprite[])> m_IconMap;
private const string SKILL_ICONLIST_NAME = "iconlist_skill_multisprite";
private const string ACTION_ICONLIST_NAME = "iconlist_action_multisprite";
private const string ACTION_ICONLIST_NAME = "ActionIcon/iconlist_action_multisprite";
public static bool TALKPROC_IS_TERMINAL(uint id)
{
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:80d98663fdebe84a0752357c66954e1834c6d78f1e61ca61df0122a35b5116c7
size 200524021
oid sha256:abc415d54498bffa808447fe8b575721ead4686710d5536494ffdb8863894a56
size 200604471
-1
View File
@@ -276,7 +276,6 @@ public partial class CECGameRun
/// <returns>True if loaded successfully / 加载成功返回true</returns>
public bool LoadConfigsFromServer(byte[] pDataBuf, int iDataSize)
{
BMLogger.LogError("LoadConfigsFromServer ");
const uint USERCFG_VERSION = 3;
if (pDataBuf == null || iDataSize == 0)
+50 -50
View File
@@ -59,65 +59,65 @@ namespace BrewMonster
public static readonly string[] l_aIconFiles =
{
"打坐.dds",
"走跑转换.dds",
"普通攻击.dds",
"寻找目标.dds",
"协助攻击.dds",
"打坐",
"走跑转换",
"普通攻击",
"寻找目标",
"协助攻击",
"邀请加入.dds",
"脱离队伍.dds",
"踢出队伍.dds",
"寻找队伍.dds",
"交易命令.dds",
"邀请加入",
"脱离队伍",
"踢出队伍",
"寻找队伍",
"交易命令",
"摆摊卖.dds",
"摆摊买.dds",
"邀请加入.dds",
"飞行.dds",
"招手.dds", // RES_ICON_CMD_EXP_WAVE,
"摆摊卖",
"摆摊买",
"邀请加入",
"飞行",
"招手", // RES_ICON_CMD_EXP_WAVE,
"点头.dds", // RES_ICON_CMD_EXP_NOD,
"摇头.dds", // RES_ICON_CMD_EXP_SHAKEHEAD,
"耸肩膀.dds", // RES_ICON_CMD_EXP_SHRUG,
"大笑.dds", // RES_ICON_CMD_EXP_LAUGH,
"生气.dds", // RES_ICON_CMD_EXP_ANGRY,
"点头", // RES_ICON_CMD_EXP_NOD,
"摇头", // RES_ICON_CMD_EXP_SHAKEHEAD,
"耸肩膀", // RES_ICON_CMD_EXP_SHRUG,
"大笑", // RES_ICON_CMD_EXP_LAUGH,
"生气", // RES_ICON_CMD_EXP_ANGRY,
"晕倒.dds", // RES_ICON_CMD_EXP_STUN,
"沮丧.dds", // RES_ICON_CMD_EXP_DEPRESSED,
"飞吻.dds", // RES_ICON_CMD_EXP_KISSHAND,
"害羞.dds", // RES_ICON_CMD_EXP_SHY,
"抱拳.dds", // RES_ICON_CMD_EXP_SALUTE,
"晕倒", // RES_ICON_CMD_EXP_STUN,
"沮丧", // RES_ICON_CMD_EXP_DEPRESSED,
"飞吻", // RES_ICON_CMD_EXP_KISSHAND,
"害羞", // RES_ICON_CMD_EXP_SHY,
"抱拳", // RES_ICON_CMD_EXP_SALUTE,
"坐下.dds", // RES_ICON_CMD_EXP_SITDOWN,
"冲锋.dds", // RES_ICON_CMD_EXP_ASSAULT,
"思考.dds", // RES_ICON_CMD_EXP_THINK,
"挑衅.dds", // RES_ICON_CMD_EXP_DEFIANCE,
"胜利.dds", // RES_ICON_CMD_EXP_VICTORY,
"坐下", // RES_ICON_CMD_EXP_SITDOWN,
"冲锋", // RES_ICON_CMD_EXP_ASSAULT,
"思考", // RES_ICON_CMD_EXP_THINK,
"挑衅", // RES_ICON_CMD_EXP_DEFIANCE,
"胜利", // RES_ICON_CMD_EXP_VICTORY,
"伸懒腰.dds", // RES_ICON_CMD_EXP_GAPE
"亲吻.dds", // RES_ICON_CMD_EXP_KISS
"战斗.dds", // RES_ICON_CMD_EXP_FIGHT,
"攻击1.dds", // RES_ICON_CMD_EXP_ATTACK1,
"攻击2.dds", // RES_ICON_CMD_EXP_ATTACK2,
"伸懒腰", // RES_ICON_CMD_EXP_GAPE
"亲吻", // RES_ICON_CMD_EXP_KISS
"战斗", // RES_ICON_CMD_EXP_FIGHT,
"攻击1", // RES_ICON_CMD_EXP_ATTACK1,
"攻击2", // RES_ICON_CMD_EXP_ATTACK2,
"攻击3.dds", // RES_ICON_CMD_EXP_ATTACK3,
"攻击4.dds", // RES_ICON_CMD_EXP_ATTACK4,
"防御.dds", // RES_ICON_CMD_EXP_DEFENCE,
"摔倒.dds", // RES_ICON_CMD_EXP_FALL,
"倒地.dds", // RES_ICON_CMD_EXP_FALLONGROUND,
"攻击3", // RES_ICON_CMD_EXP_ATTACK3,
"攻击4", // RES_ICON_CMD_EXP_ATTACK4,
"防御", // RES_ICON_CMD_EXP_DEFENCE,
"摔倒", // RES_ICON_CMD_EXP_FALL,
"倒地", // RES_ICON_CMD_EXP_FALLONGROUND,
"张望.dds", // RES_ICON_CMD_EXP_LOOKAROUND,
"舞蹈1.dds", // RES_ICON_CMD_EXP_DANCE,
"舞蹈2.dds", // RES_ICON_CMD_EXP_FASHIONWEAPON
"拾取.dds", // RES_ICON_CMD_PICKUP
"挖掘.dds", // RES_ICON_CMD_GATHER
"加速飞行.dds", // RES_ICON_CMD_RUSHFLY
"张望", // RES_ICON_CMD_EXP_LOOKAROUND,
"舞蹈1", // RES_ICON_CMD_EXP_DANCE,
"舞蹈2", // RES_ICON_CMD_EXP_FASHIONWEAPON
"拾取", // RES_ICON_CMD_PICKUP
"挖掘", // RES_ICON_CMD_GATHER
"加速飞行", // RES_ICON_CMD_RUSHFLY
"相依相偎的动作.dds", // RES_ICON_CMD_BINDBUDDY
"亲亲密密的动作.dds", // RES_ICON_CMD_TWOKISS
"跳跃的动作1.dds", // RES_ICON_CMD_JUMPTRICK,
"跳跃的动作2.dds", // RES_ICON_CMD_RUNTRICK,
"相依相偎的动作", // RES_ICON_CMD_BINDBUDDY
"亲亲密密的动作", // RES_ICON_CMD_TWOKISS
"跳跃的动作1", // RES_ICON_CMD_JUMPTRICK,
"跳跃的动作2", // RES_ICON_CMD_RUNTRICK,
};
public static string res_GFXFile(int n)
{
File diff suppressed because one or more lines are too long