本文整理汇总了C++中ZIDLResource::FindWidget方法的典型用法代码示例。如果您正苦于以下问题:C++ ZIDLResource::FindWidget方法的具体用法?C++ ZIDLResource::FindWidget怎么用?C++ ZIDLResource::FindWidget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZIDLResource
的用法示例。
在下文中一共展示了ZIDLResource::FindWidget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetProperClanListOutput
ZPlayerListBox* GetProperClanListOutput()
{
ZIDLResource* pIDLResource = ZApplication::GetGameInterface()->GetIDLResource();
GunzState nState = ZApplication::GetGameInterface()->GetState();
switch(nState) {
case GUNZ_LOBBY:
{
ZPlayerListBox* pList = (ZPlayerListBox*)pIDLResource->FindWidget("LobbyChannelPlayerList");
if (pList && pList->GetMode() == ZPlayerListBox::PLAYERLISTMODE_CHANNEL_CLAN)
return pList;
else
return NULL;
}
break;
case GUNZ_STAGE:
{
ZPlayerListBox* pList = (ZPlayerListBox*)pIDLResource->FindWidget("StagePlayerList_");
if (pList && pList->GetMode() == ZPlayerListBox::PLAYERLISTMODE_STAGE_CLAN)
return pList;
else
return NULL;
}
break;
};
return NULL;
}
示例2: OnClanAskJoinAgreement
void ZGameClient::OnClanAskJoinAgreement(const char* szClanName, MUID& uidClanAdmin, const char* szClanAdmin)
{
// 받을수 없는 상황이면 무시
if(!ZGetGameInterface()->IsReadyToPropose()) return;
m_uidRequestPlayer = uidClanAdmin;
ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();
MTextArea* pTextEdit = (MTextArea*)pResource->FindWidget("ClanJoinerAgreementConfirm_Textarea");
if (pTextEdit)
{
char szTemp[256];
// ZTransMsg(szTemp, MSG_CLAN_JOINER_AGREEMENT_LABEL, 1, szClanName);
ZTransMsg(szTemp, MSG_CLAN_JOINER_AGREEMENT_LABEL, 1, szClanName);
pTextEdit->SetText(szTemp);
}
MWidget* pWidget = pResource->FindWidget("ClanJoinerAgreementConfirm");
if(pWidget!=NULL)
{
static ZCOUNTDOWN countDown = {30,"ClanJoinerAgreementConfirm_Remain",
"ClanJoinerAgreementConfirm",OnClanAskJoinAgreement_OnExpire};
countDown.nSeconds=30; // static 이므로 재설정
ZApplication::GetTimer()->SetTimerEvent(0, &OnTimer_CountDown, &countDown, true);
pWidget->Show(true, true);
}
}
示例3: ShowProposalWaitFrame
void ShowProposalWaitFrame(bool bVisible, const char* szTitle, const char* szMessage)
{
ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();
MWidget* pWidget = pResource->FindWidget("ProposalAgreementWait");
if(pWidget!=NULL)
{
if (bVisible)
{
pWidget->SetText(szTitle);
MTextArea* pTextArea = (MTextArea*)pResource->FindWidget("ProposalAgreementWait_Textarea");
if (pTextArea)
{
pTextArea->SetText(szMessage);
}
static ZCOUNTDOWN countDown = {PROPOSAL_AGREEMENT_TIMEOUT_SEC,
"ProposalAgreementWait_Remain",
"ProposalAgreementWait",
ShowProposalWaitFrame_OnExpire};
countDown.nSeconds=PROPOSAL_AGREEMENT_TIMEOUT_SEC; // static 이므로 재설정
ZApplication::GetTimer()->SetTimerEvent(0, &OnTimer_CountDown, &countDown, true);
pWidget->Show(true, true);
}
else
{
pWidget->Show(false);
}
}
}
示例4: OnDestroy
/***********************************************************************
OnDestroy : public
desc : 몬스터 도감 감추기
arg : none
ret : none
************************************************************************/
void ZMonsterBookInterface::OnDestroy( void)
{
// Get resource pointer
ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();
// 몬스터 도감 감추기
CCWidget* pWidget = pResource->FindWidget( "MonsterBook");
if ( pWidget)
pWidget->Show( false);
// 배경 책 이미지를 메모리로부터 삭제한다
if ( m_pBookBgImg != NULL)
{
// 배경 책 이미지를 보여주는 위젯의 비트맵 이미지 포인터를 리셋한다
CCPicture* pPicture = (CCPicture*)pResource->FindWidget( "MonsterBook_BookBG");
if ( pPicture)
pPicture->SetBitmap( NULL);
delete m_pBookBgImg;
m_pBookBgImg = NULL;
}
// 해당 몬스터의 일러스트 이미지 삭제
if ( m_pIllustImg)
{
CCPicture* pPicture = (CCPicture*)pResource->FindWidget( "MonsterBook_MonsterIllust");
if ( pPicture)
pPicture->SetBitmap( NULL);
delete m_pIllustImg;
m_pIllustImg = NULL;
}
// 몬스터 도감 페이지 정보 리스트 삭제
if ( !m_mapMonsterBookPage.empty())
{
for ( ZMonsterBookPageItr itr = m_mapMonsterBookPage.begin(); itr != m_mapMonsterBookPage.end(); itr++)
delete (*itr).second;
m_mapMonsterBookPage.clear();
}
// 로비 UI 보이기
pWidget = pResource->FindWidget( "Lobby");
if ( pWidget)
pWidget->Show( true);
}
示例5: IsWaitingRepliersAgreement
/// 동의을 기다리고 있는지의 여부 - ui로 체크한다.
bool IsWaitingRepliersAgreement()
{
ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();
MWidget* pWidget = pResource->FindWidget("ProposalAgreementWait");
if(pWidget!=NULL)
{
return pWidget->IsVisible();
}
return false;
}
示例6: IsWaitingClanJoiningAgree
/// 클랜가입 동의을 기다리고 있는지의 여부
bool IsWaitingClanJoiningAgree()
{
ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();
MWidget* pWidget = pResource->FindWidget("ClanJoinerAgreementWait");
if(pWidget!=NULL)
{
return pWidget->IsVisible();
}
return false;
}
示例7: SetupMenu
void ZItemMenu::SetupMenu()
{
RemoveAllMenuItem();
ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();
ZShopEquipListbox* pItemListBox = (ZShopEquipListbox*)pResource->FindWidget("EquipmentList");
ZItemMenuItem* pMenuItem = new ZItemMenuItem(ZCMD_ITEMMENU_BRINGBACK_ACCOUNTITEM, ZMsg( MSG_MENUITEM_SENTTOBANK));
pMenuItem->SetSize(GetFont()->GetWidth(pMenuItem->GetText())+5, GetFont()->GetHeight());
AddMenuItem(pMenuItem); // Add하면서 MenuItem Resize됨
}
示例8: OnCreate
/***********************************************************************
OnCreate : public
desc : 몬스터 도감 보이기
arg : none
ret : none
************************************************************************/
void ZMonsterBookInterface::OnCreate( void)
{
// Get resource pointer
ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();
// 변수 초기화
m_nTotalPageNum = 0;
m_nCurrentPageNum = 0;
// 퀘스트에 필요한 정보 로딩
LoadMonsterBookInfo();
// 로비 UI 감추기
CCWidget* pWidget = pResource->FindWidget( "Lobby");
if ( pWidget)
pWidget->Show( false);
// 페이지를 그린다
DrawPage();
// 몬스터 도감 보이기
pWidget = pResource->FindWidget( "MonsterBook");
if ( pWidget)
pWidget->Show( true);
// 스트립 이미지 애니메이션
CCPicture* pPicture = (CCPicture*)pResource->FindWidget( "MonsterBook_StripBottom");
if( pPicture)
pPicture->SetAnimation( 0, 1000.0f);
pPicture = (CCPicture*)pResource->FindWidget( "MonsterBook_StripTop");
if( pPicture)
pPicture->SetAnimation( 1, 1000.0f);
}
示例9: IsEquipmentFrameListOpened
bool ZShopEquipInterface::IsEquipmentFrameListOpened( const char* szName)
{
ZIDLResource* pResource = GetIDLResource();
char szTemp[256];
MPicture* pPicture;
strcpy( szTemp, szName);
if (GetArmorWeaponTabIndex() == 0)
{
strcat( szTemp, "_ArmorBGListFrameOpen");
pPicture = (MPicture*)pResource->FindWidget( szTemp);
if (pPicture)
return pPicture->IsVisible();
}
else if (GetArmorWeaponTabIndex() == 1)
{
strcat( szTemp, "_WeaponBGListFrameOpen");
pPicture = (MPicture*)pResource->FindWidget( szTemp);
if (pPicture)
return pPicture->IsVisible();
}
return false;
}
示例10: SetCountdown
void SetCountdown(const ZCOUNTDOWN& Countdown)
{
auto Callback = [Countdown = Countdown]() mutable
{
ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();
MWidget* pTargetWidget = pResource->FindWidget(Countdown.szTargetWidget);
if (!pTargetWidget || !pTargetWidget->IsVisible()) return true;
if (Countdown.nSeconds > 0) {
if (Countdown.szLabelWidget != NULL)
{
ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();
MWidget* pWidget = pResource->FindWidget(Countdown.szLabelWidget);
if (pWidget)
{
char buffer[256];
sprintf_safe(buffer, "%d", Countdown.nSeconds);
pWidget->SetText(buffer);
}
}
Countdown.nSeconds--;
return false;
}
pTargetWidget->Show(false);
if (Countdown.pCallBack)
Countdown.pCallBack();
return true;
};
ZApplication::GetTimer()->SetTimerEvent(1000, Callback);
}
示例11: ShowClanSponsorAgreeWaitFrame
void ShowClanSponsorAgreeWaitFrame(bool bVisible)
{
ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();
MWidget* pWidget = pResource->FindWidget("ClanSponsorAgreementWait");
if(pWidget!=NULL)
{
if (bVisible)
{
static ZCOUNTDOWN countDown = {30,"ClanSponsorAgreementWait_Remain",
"ClanSponsorAgreementWait",ShowClanSponsorAgreeWaitFrame_OnExpire};
countDown.nSeconds=30; // static 이므로 재설정
ZApplication::GetTimer()->SetTimerEvent(0, &OnTimer_CountDown, &countDown, true);
pWidget->Show(true, true);
}
else
{
pWidget->Show(false);
}
}
}
示例12: RequestSelPrivateStageJoin
void ZRoomListBox::RequestSelPrivateStageJoin()
{
MUID uidChar = ZGetGameClient()->GetPlayerUID();
ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();
MUID uidStageUID = GetSelectedPrivateStageUID();
if (uidStageUID == MUID(0,0)) uidStageUID = GetSelRoomUID();
if (uidStageUID != MUID(0,0))
{
MEdit* pPassEdit = (MEdit*)pResource->FindWidget("PrivateStagePassword");
if (pPassEdit!=NULL)
{
char szPassword[256];
strcpy_safe(szPassword, pPassEdit->GetText());
ZPostRequestPrivateStageJoin(uidChar, uidStageUID, szPassword);
ZApplication::GetGameInterface()->EnableLobbyInterface(false);
}
}
}
示例13: OnAskAgreement
void ZGameClient::OnAskAgreement(const MUID& uidProposer, void* pMemberNamesBlob,
const MMatchProposalMode nProposalMode, const int nRequestID)
{
// 응답할 수 없는 상황이면 바로 거절한다.
if ((IsWaitingRepliersAgreement()) || (!ZGetGameInterface()->IsReadyToPropose()))
{
char szCharName[MATCHOBJECT_NAME_LENGTH];
sprintf(szCharName, ZGetMyInfo()->GetCharName());
ZPostReplyAgreement(uidProposer, GetPlayerUID(), szCharName, nProposalMode, nRequestID, false);
return;
}
char szMemberNames[MAX_REPLIER][256]; // 0 번째는 제안자
int nMemberCount = MGetBlobArrayCount(pMemberNamesBlob);
if (nMemberCount < 1) return;
for (int i = 0; i < nMemberCount; i++)
{
MTD_ReplierNode* pReplierNode = (MTD_ReplierNode*)MGetBlobArrayElement(pMemberNamesBlob, i);
strcpy(szMemberNames[i], pReplierNode->szName);
}
m_nProposalMode = nProposalMode;
m_nRequestID = nRequestID;
m_uidRequestPlayer = uidProposer;
ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();
MTextArea* pTextEdit = (MTextArea*)pResource->FindWidget("ProposalAgreementConfirm_Textarea");
if (pTextEdit)
{
// 여기서 각각의 상황에 맞는 대사를 넣어줘야한다.
char szTemp[256] = "";
char szMembers[256] = " (";
for (int i = 0; i < nMemberCount; i++)
{
strcat(szMembers, szMemberNames[i]);
if (i != nMemberCount-1) strcat(szMembers, ", ");
}
strcat(szMembers, ")");
switch (nProposalMode)
{
case MPROPOSAL_LADDER_INVITE:
{
// ZTransMsg(szTemp, MSG_LADDER_REPLIER_AGREEMENT_LABEL, 1, szMemberNames[0]);
ZTransMsg(szTemp, MSG_LADDER_REPLIER_AGREEMENT_LABEL, 1, szMemberNames[0]);
strcat(szTemp, szMembers);
}
break;
case MPROPOSAL_CLAN_INVITE:
{
// ZTransMsg(szTemp, MSG_CLANBATTLE_REPLIER_AGREEMENT_LABEL, 1, szMemberNames[0]);
ZTransMsg(szTemp, MSG_CLANBATTLE_REPLIER_AGREEMENT_LABEL, 1, szMemberNames[0]);
strcat(szTemp, szMembers);
}
break;
};
pTextEdit->SetText(szTemp);
}
MWidget* pWidget = pResource->FindWidget("ProposalAgreementConfirm");
if(pWidget!=NULL)
{
static ZCOUNTDOWN countDown = {PROPOSAL_AGREEMENT_TIMEOUT_SEC,
"ProposalAgreementConfirm_Remain",
"ProposalAgreementConfirm",
OnAskReplierAgreement_OnExpire};
countDown.nSeconds=PROPOSAL_AGREEMENT_TIMEOUT_SEC; // static 이므로 재설정
ZApplication::GetTimer()->SetTimerEvent(0, &OnTimer_CountDown, &countDown, true);
pWidget->Show(true, true);
}
}
示例14: SelectShopTab
void ZShopEquipInterface::SelectShopTab(int nTabIndex)
{
if (nTabIndex == -1)
nTabIndex = m_nShopTabNum;
ZIDLResource* pResource = GetIDLResource();
// 프리미엄 샵 - 설정되는 국가대로 하나씩 지워나간다
#ifndef _DEBUG
#if defined(LOCALE_BRAZIL) || defined(LOCALE_INDIA) || defined(LOCALE_US) || defined(LOCALE_JAPAN) || defined(LOCALE_KOREA) || defined(LOCALE_NHNUSA)
{
if ( nTabIndex == 2)
return;
}
#endif
#endif
MWidget* pWidget = pResource->FindWidget("AllEquipmentList");
if (pWidget != NULL) pWidget->Show(nTabIndex==0 ? true : false);
pWidget = pResource->FindWidget("MyAllEquipmentList");
if (pWidget != NULL) pWidget->Show(nTabIndex==1 ? true : false);
pWidget = pResource->FindWidget("CashEquipmentList");
if (pWidget != NULL) pWidget->Show(nTabIndex==2 ? true : false);
// Set filter
MComboBox* pComboBox = (MComboBox*)pResource->FindWidget( "Shop_AllEquipmentFilter");
if(pComboBox) {
int sel = pComboBox->GetSelIndex();
ZMyItemList* pil = ZGetMyInfo()->GetItemList();
if ( pil) {
pil->m_ListFilter = sel;
pil->Serialize();
}
}
// 버튼 설정
MButton* pButton = (MButton*)pResource->FindWidget( "BuyConfirmCaller");
if ( pButton)
{
pButton->Show( false);
pButton->Enable( false);
}
pButton = (MButton*)pResource->FindWidget( "SellConfirmCaller");
if ( pButton)
{
pButton->Show( false);
pButton->Enable( false);
}
if ( nTabIndex == 0)
{
pButton = (MButton*)pResource->FindWidget( "BuyConfirmCaller");
if ( pButton) pButton->Show( true);
}
else if ( nTabIndex == 1)
{
pButton = (MButton*)pResource->FindWidget( "SellConfirmCaller");
if ( pButton)
pButton->Show( true);
}
/* 수년전 만들다만 프리미엄 탭(캐쉬템) 코드임. 제거 예정
else if ( nTabIndex == 2)
{
pButton = (MButton*)pResource->FindWidget( "BuyCashConfirmCaller");
if ( pButton)
pButton->Show( true);
}
*/
pButton = (MButton*)pResource->FindWidget("AllEquipmentListCaller");
if (pButton != NULL)
pButton->Show(nTabIndex!=0 ? true : false);
pButton = (MButton*)pResource->FindWidget("MyAllEquipmentListCaller");
if (pButton != NULL)
pButton->Show(nTabIndex!=1 ? true : false);
pButton = (MButton*)pResource->FindWidget("CashEquipmentListCaller");
if (pButton != NULL)
pButton->Show(nTabIndex!=2 ? true : false);
// 구입, 판매 라벨
MPicture* pPicture;
MBitmap* pBitmap;
pPicture = (MPicture*)pResource->FindWidget("Shop_FrameTabLabel1");
if ( pPicture)
pPicture->Show(nTabIndex==0 ? true : false);
pPicture = (MPicture*)pResource->FindWidget("Shop_FrameTabLabel2");
if ( pPicture)
pPicture->Show(nTabIndex==1 ? true : false);
pPicture = (MPicture*)pResource->FindWidget("Shop_FrameTabLabel3");
if ( pPicture)
pPicture->Show(nTabIndex==2 ? true : false);
// 프레임 탭
pPicture = (MPicture*)pResource->FindWidget("Shop_TabLabel");
if ( pPicture)
//.........这里部分代码省略.........
示例15: OnClanStandbyClanList
void ZGameClient::OnClanStandbyClanList(int nPrevStageCount, int nNextStageCount, void* pBlob)
{
int nCount = MGetBlobArrayCount(pBlob);
ZIDLResource* pRes = ZApplication::GetGameInterface()->GetIDLResource();
ZClanListBox* pListBox = (ZClanListBox*)pRes->FindWidget("Lobby_ClanList");
if (!pListBox) return;
pListBox->ClearAll();
vector< int > vecClanID;
for(int i=0; i<nCount; i++)
{
MTD_StandbyClanList* pNode = (MTD_StandbyClanList*)MGetBlobArrayElement(pBlob, i);
_ASSERT(i<4);
pListBox->SetInfo(i,pNode->nCLID,pNode->szClanName,pNode->nPlayers);
//ProcessEmblem(pNode->nCLID, pNode->nEmblemChecksum);
// Emblem // 클랜 URL이 없으면 Vector에 쌓는다
if (m_EmblemMgr.CheckEmblem(pNode->nCLID, pNode->nEmblemChecksum)) {
// Begin Draw
}
else /*if (pNode->nEmblemChecksum != 0)*/ {
vecClanID.push_back( pNode->nCLID );
}
}
//// Emblem // 클랜 URL이 없는 vector를 서버에 보낸다.
if(vecClanID.size() > 0)
{
void* pBlob = MMakeBlobArray(sizeof(int), (int)vecClanID.size()); /// nOneBlobSize만큼 nBlobCount갯수만큼 배열한 블럭 만들기
int nCount = 0;
for(vector<int>::iterator it = vecClanID.begin(); it != vecClanID.end(); it++, nCount++)
{
int *nClanID = (int*)MGetBlobArrayElement(pBlob, nCount);
*nClanID = *it;
}
ZPostRequestEmblemURL(pBlob);
MEraseBlobArray(pBlob);
vecClanID.clear();
}
ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();
MWidget* pBtn = pResource->FindWidget("StageBeforeBtn");
if (nPrevStageCount != -1)
{
if (nPrevStageCount == 0)
{
if (pBtn) pBtn->Enable(false);
}
else
{
if (pBtn) pBtn->Enable(true);
}
}
pBtn = pResource->FindWidget("StageAfterBtn");
if (nNextStageCount != -1)
{
if (nNextStageCount == 0)
{
if (pBtn) pBtn->Enable(false);
}
else
{
if (pBtn) pBtn->Enable(true);
}
}
}