Files
test/Assets/PerfectWorld/Scripts/Task/UI/EmoteWindow.cs
T
2026-03-06 17:33:14 +07:00

132 lines
5.6 KiB
C#

using BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay;
using BrewMonster.Network;
using UnityEngine;
using UnityEngine.UI;
namespace BrewMonster.UI
{
public class EmoteWindow : AUIDialog
{
public override void Show(bool value)
{
base.Show(value);
// int i, j;
// char szName[40];
// string strFile;
// CECShortcut pSCThis;
// PAUIIMAGEPICTURE pImage;
// PAUILABEL pLabel;
// CECGameRun pGameRun = EC_Game.GetGameRun();
// CECShortcutSet[] a_pSC =
// {
// pGameRun.GetGenCmdShortcuts(),
// pGameRun.GetTeamCmdShortcuts(),
// pGameRun.GetTradeCmdShortcuts(),
// pGameRun.GetPoseCmdShortcuts()
// };
// char *a_pszPrefix[] = { "BscCmd_", "TeamCmd_","TradeCmd_", "FaceCmd_" };
// char *a_pszTxtPrefix[] = { "Txt_BscCmd", "Txt_TeamCmd", "Txt_TradeCmd", "Txt_FaceCmd" };
// int objCount[] = { 9, 3, 3, 30 };
//
// a_LogOutput(1, "[Dat Emote] CDlgSkillSubAction::OnShowDialog");
// a_LogOutput(1, "[Dat Emote] CDlgSkillSubAction::OnShowDialog szName: %s", szName);
//
// for( i = 0; i < sizeof(a_pSC) / sizeof(CECShortcutSet *); i++ )
// {
// for( j = 0; j < objCount[i]; j++ )
// {
// sprintf(szName, "%s%02d", a_pszPrefix[i], j + 1);
// pImage = dynamic_cast<AUIImagePicture*>(GetDlgItem(szName));
//
// sprintf(szName, "%s%02d", a_pszTxtPrefix[i], j + 1);
// pLabel = dynamic_cast<AUILabel*>(GetDlgItem(szName));
//
// if( !pImage ) break;
//
// if (j < a_pSC[i]->GetShortcutNum()) {
// pSCThis = a_pSC[i]->GetShortcut(j);
// pImage->SetDataPtr(pSCThis,"ptr_CECShortcut");
//
// af_GetFileTitle(pSCThis->GetIconFile(), strFile);
// strFile.MakeLower();
// pImage->SetCover(GetGameUIMan()->m_pA2DSpriteIcons[CECGameUIMan::ICONS_ACTION],
// GetGameUIMan()->m_IconMap[CECGameUIMan::ICONS_ACTION][strFile]);
//
// pLabel->SetText(pSCThis->GetDesc());
// } else {
// pImage->Show(false);
// pLabel->Show(false);
// }
// }
// }
// ÔÚÇл»½çÃæ·ç¸ñµÄʱºò£¬´Ëʱ¿ÉÄܸ¸¶Ô»°¿òÖ¸ÕëΪ¿Õ
// if (GetParentDlgControl()) {
// SIZE size;
// size.cx = 326;
// size.cy = 720;
// size.cx = (int)(size.cx * m_pAUIManager->GetWindowScale() + 0.5f);
// size.cy = (int)(size.cy * m_pAUIManager->GetWindowScale() + 0.5f);
//
// if (!m_bSetVScroll) {
// GetParentDlgControl()->SetSubDialogOrgSize(size.cx, size.cy);
// m_bSetVScroll = true;
// }
// }
}
public int slot;
[ContextMenu("Test")]
public void OnDragClick() //PAUIDIALOG pDlgSrc, PAUIOBJECT pObjSrc, PAUIDIALOG pDlgOver, PAUIOBJECT pObjOver
{
// bool bInAutoMode = CECAutoPolicy::GetInstance().IsAutoPolicyEnabled();
// if (strstr(pDlgSrc->GetName(), "Win_Quickbar") ||
// 0 == stricmp(pDlgSrc->GetName(), "Win_SkillSubAction")) // 20140708 ÐµĶ¯×÷½çÃæ
// {
// if (bInAutoMode) return;
//todo: dummy call StartGame
// EC_Game.GetGameRun().StartGame(0, Vector3.zero);
// if (EC_Game.GetGameRun().GetPoseCmdShortcuts() == null)
// {
// EC_Game.GetGameRun().StartGame(0, Vector3.zero);
// }
CECShortcut pSC = EC_Game.GetGameRun().GetPoseCmdShortcuts().GetShortcut(slot);
// if (CDlgAutoHelp::IsAutoHelp() && strstr(pDlgSrc->GetName(), "Win_Quickbar"))
// {
// a_LogOutput(1, "[Dat Emote] Win_Quickbar");
// if (pSC->GetType() == CECShortcut::SCT_SKILL)
// {
// CECSCSkill* pSkillSC = dynamic_cast<CECSCSkill*>(pSC);
// if (pSkillSC && pSkillSC->GetSkill())
// CDlgWikiShortcut::PopSkillWiki(GetGameUIMan(), pSkillSC->GetSkill()->GetSkillID());
//
// }
// else if (pSC->GetType() == CECShortcut::SCT_ITEM)
// {
// CECSCItem* pItemSC = dynamic_cast<CECSCItem*>(pSC);
// CECIvtrItem* pItem = CECIvtrItem::CreateItem(pItemSC->GetItemTID(), 0, 1);
// if (pItem)
// {
// CDlgWikiShortcut::PopItemWiki(GetGameUIMan(), pItem);
// delete pItem;
// }
// }
// else
// {
// GetGameUIMan()->MessageBox("", GetStringFromTable(10754), MB_OK,
// A3DCOLORRGBA(255, 255, 255, 160));
// }
// }
// else
// {
if (pSC != null) // && pObjSrc->GetDataPtr("ptr_CECShortcut") == pSC
{
// a_LogOutput(1, "[Dat Emote] ptr_CECShortcut");
pSC.Execute();
}
// }
// }
}
}
}