• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ ZIDLResource类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ZIDLResource的典型用法代码示例。如果您正苦于以下问题:C++ ZIDLResource类的具体用法?C++ ZIDLResource怎么用?C++ ZIDLResource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了ZIDLResource类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:MagistrAVSH,项目名称:node3d,代码行数:27,代码来源:ZGameClient_Clan.cpp


示例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);
	}

}
开发者ID:MagistrAVSH,项目名称:node3d,代码行数:29,代码来源:ZGameClient_Clan.cpp


示例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);
		}
	}
}
开发者ID:MagistrAVSH,项目名称:node3d,代码行数:34,代码来源:ZGameClient_Ladder.cpp


示例4: IsWaitingRepliersAgreement

/// 동의을 기다리고 있는지의 여부 - ui로 체크한다.
bool IsWaitingRepliersAgreement()
{
	ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();
	MWidget* pWidget = pResource->FindWidget("ProposalAgreementWait");
	if(pWidget!=NULL)
	{
		return pWidget->IsVisible();
	}
	return false;
}
开发者ID:MagistrAVSH,项目名称:node3d,代码行数:11,代码来源:ZGameClient_Ladder.cpp


示例5: IsWaitingClanJoiningAgree

/// 클랜가입 동의을 기다리고 있는지의 여부
bool IsWaitingClanJoiningAgree()
{
	ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();
	MWidget* pWidget = pResource->FindWidget("ClanJoinerAgreementWait");
	if(pWidget!=NULL)
	{
		return pWidget->IsVisible();
	}
	return false;
}
开发者ID:MagistrAVSH,项目名称:node3d,代码行数:11,代码来源:ZGameClient_Clan.cpp


示例6: RemoveAllMenuItem

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됨
}
开发者ID:Kallontz,项目名称:gunz-the-tps-mmorpg,代码行数:11,代码来源:ZItemMenu.cpp


示例7: 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);
}
开发者ID:Kallontz,项目名称:gunz-the-tps-mmorpg,代码行数:59,代码来源:ZMonsterBookInterface.cpp


示例8: 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);
		}
	}
}
开发者ID:MagistrAVSH,项目名称:node3d,代码行数:21,代码来源:ZGameClient_Clan.cpp


示例9: 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);
}
开发者ID:Kallontz,项目名称:gunz-the-tps-mmorpg,代码行数:46,代码来源:ZMonsterBookInterface.cpp


示例10: ZGetGameClient

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);
		}
	}
}
开发者ID:Asunaya,项目名称:RefinedGunz,代码行数:22,代码来源:ZRoomListBox.cpp


示例11: GetIDLResource

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;
}
开发者ID:kooksGame,项目名称:life-marvelous,代码行数:23,代码来源:ZShopEquipInterface.cpp


示例12: 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);
}
开发者ID:Asunaya,项目名称:RefinedGunz,代码行数:36,代码来源:ZCountDown.cpp


示例13: sprintf

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);
	}
}
开发者ID:MagistrAVSH,项目名称:node3d,代码行数:80,代码来源:ZGameClient_Ladder.cpp


示例14: switch

void ZGameClient::OnReplyAgreement(const MUID& uidProposer, 
		                const MUID& uidChar, 
						const char* szReplierName, 
						const MMatchProposalMode nProposalMode,
					    const int nRequestID, 
						const bool bAgreement)
{
	if (!IsWaitingRepliersAgreement())
	{
		m_AgreementBuilder.CancelProposal();
		return;
	}

	ZNetAgreementBuilder::_BuildReplyResult nResult;
	nResult = m_AgreementBuilder.BuildReply(szReplierName, nProposalMode, nRequestID, bAgreement);

	if (nResult == ZNetAgreementBuilder::BRR_ALL_AGREED)	// 모두 동의했을경우
	{
		switch (nProposalMode)
		{
		case MPROPOSAL_LADDER_INVITE:
			{
				char szMember[MAX_LADDER_TEAM_MEMBER][MATCHOBJECT_NAME_LENGTH];
				char* ppMember[MAX_LADDER_TEAM_MEMBER];

				for(int i=0; i<MAX_LADDER_TEAM_MEMBER; i++) {
					ppMember[i] = szMember[i];
				}
				int nCount = m_AgreementBuilder.GetReplierNames(&ppMember[1], MAX_LADDER_TEAM_MEMBER-1);

				// 자신도 넣는다.
				strcpy(szMember[0], ZGetMyInfo()->GetCharName());
				nCount++;

				// 여기서 실제로 요청
				ZPostLadderRequestChallenge(ppMember, nCount, 0);
			}
			break;
		case MPROPOSAL_CLAN_INVITE:
			{
				char szMember[MAX_CLANBATTLE_TEAM_MEMBER][MATCHOBJECT_NAME_LENGTH];
				char* ppMember[MAX_CLANBATTLE_TEAM_MEMBER];

				for(int i=0; i<MAX_CLANBATTLE_TEAM_MEMBER; i++) {
					ppMember[i] = szMember[i];
				}
				int nCount = m_AgreementBuilder.GetReplierNames(&ppMember[1], MAX_CLANBATTLE_TEAM_MEMBER-1);

				// 자신도 넣는다.
				strcpy(szMember[0], ZGetMyInfo()->GetCharName());
				nCount++;

				// Balance 옵션
				int nBalancedMatching = 0;
				ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();
				MButton* pButton = (MButton*)pResource->FindWidget("BalancedMatchingCheckBox");
				if ((pButton) && (pButton->GetCheck()))
				{
					nBalancedMatching = 1;
				}

				// 여기서 실제로 요청
				ZPostLadderRequestChallenge(ppMember, nCount, nBalancedMatching);
			}
			break;
		};

		ShowProposalWaitFrame(false);
		return;
	}
	else if (nResult == ZNetAgreementBuilder::BRR_DISAGREED)	// 거절했을 경우
	{
		ShowProposalWaitFrame(false);

		char temp[256] = "";
		char szRejecter[64] = "";

		// 거절한 사람 반환, 거절한 사람이 없을 경우는 그냥 마지막에 대답한 사람으로 정한다.
		if (!m_AgreementBuilder.GetRejecter(szRejecter)) strcpy(szRejecter, szReplierName);

		ZTransMsg(temp, MSG_LADDER_REPLIER_AGREEMENT_REJECT, 1, szRejecter);
		ZApplication::GetGameInterface()->ShowMessage(temp, NULL, MSG_LADDER_REPLIER_AGREEMENT_REJECT);
	}
}
开发者ID:MagistrAVSH,项目名称:node3d,代码行数:84,代码来源:ZGameClient_Ladder.cpp


示例15: MGetBlobArrayCount

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);
		}
	}
}
开发者ID:MagistrAVSH,项目名称:node3d,代码行数:71,代码来源:ZGameClient_Clan.cpp


示例16: sprintf


//.........这里部分代码省略.........
					break;
				case MERR_DT_CANNOT_CHALLENGE:
					ZApplication::GetGameInterface()->ShowErrorMessage( nResult );
					cclog("Error: failed to challenge a duel tournament game.\n");
					break;
				case MERR_DT_ALREADY_JOIN:
					ZApplication::GetGameInterface()->ShowErrorMessage( nResult );
					cclog("Error: already trying to join a duel tournament game.\n");
					break;
				}
			}
			break;

		case MC_MATCH_DUELTOURNAMENT_PREPARE_MATCH:
			{
				CCUID uidStage = CCUID(0,0);
				int nType;
				pCommand->GetParameter(&uidStage, 0, MPT_UID);
				pCommand->GetParameter(&nType, 1, MPT_INT);
				CCCommandParameter* pParam = pCommand->GetParameter(2);
				void* pBlobPlayerInfo = pParam->GetPointer();

				OnDuelTournamentPrepare((CCDUELTOURNAMENTTYPE)nType, uidStage, pBlobPlayerInfo);
			}
			break;
		case MC_MATCH_DUELTOURNAMENT_LAUNCH_MATCH:
			{
				CCUID uidStage;
				pCommand->GetParameter(&uidStage, 0, MPT_UID);
				char szMapName[128];
				pCommand->GetParameter(szMapName, 1, MPT_STR, sizeof(szMapName) );


				ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();
				CCWidget* pWidget = pResource->FindWidget("DuelTournamentWaitMatchDialog");
				if(pWidget!=NULL)
					pWidget->Show(false);

				OnDuelTournamentLaunch(uidStage, szMapName);
			}
			break;
		case MC_MATCH_DUELTOURNAMENT_NOT_SERVICE_TIME:
			{
				int nOpenStartTime;
				int nOpenEndTime;
				pCommand->GetParameter(&nOpenStartTime,	0, MPT_INT);
				pCommand->GetParameter(&nOpenEndTime,	1, MPT_INT);

				// 듀얼토너먼트 신청이 서비스 시간에 따라 취소 되었음.
				ZApplication::GetGameInterface()->OnDuelTournamentGameUI(false); // 참가 신청 박스 닫아준다.
				const char *strFormat = ZErrStr( MERR_DT_NOT_SERVICE_TIME );
				if(strFormat)
				{
					char text[1024];
					sprintf(text, strFormat, nOpenStartTime, nOpenEndTime);
					ZApplication::GetGameInterface()->ShowErrorMessage(text, MERR_DT_NOT_SERVICE_TIME);
				}
			}
			break;
		case MC_MATCH_DUELTOURNAMENT_CHAR_INFO:
			{
				pCommand->GetParameter(&m_dtCharInfo.tournamentPoint,	0, MPT_INT);
				pCommand->GetParameter(&m_dtCharInfo.wins,				1, MPT_INT);
				pCommand->GetParameter(&m_dtCharInfo.losses,			2, MPT_INT);
				pCommand->GetParameter(&m_dtCharInfo.ranking,			3, MPT_INT);
				//pCommand->GetParameter(&rankingFructuation,	4, MPT_INT);
开发者ID:Kallontz,项目名称:gunz-the-tps-mmorpg,代码行数:67,代码来源:ZGameClient_OnCommand.cpp


示例17: SelectEquipmentFrameList

void ZShopEquipInterface::SelectEquipmentFrameList( const char* szName, bool bOpen)
{
	if (szName == NULL)
	{
		SelectEquipmentFrameList("Shop", bOpen);
		SelectEquipmentFrameList("Equip", bOpen);
		return;
	}

	char szTemp[256];

	ZIDLResource* pResource = GetIDLResource();


	// Frame open/close background image
	MPicture* pPicture;
	strcpy( szTemp, szName);
	strcat( szTemp, "_ArmorBGListFrameOpen");
	pPicture = (MPicture*)pResource->FindWidget( szTemp);
	if(pPicture != NULL) {
		if( bOpen && GetArmorWeaponTabIndex() == 0 )  { pPicture->Show(true); } 
		else										{ pPicture->Show(false);}		
	}

	strcpy( szTemp, szName);
	strcat( szTemp, "_ArmorBGListFrameClose");
	pPicture = (MPicture*)pResource->FindWidget( szTemp);
	if(pPicture != NULL) {
		if( !bOpen && GetArmorWeaponTabIndex() == 0 ) { pPicture->Show(true); } 
		else										{ pPicture->Show(false);}		
	}


	// Frame open/close background image
	strcpy( szTemp, szName);
	strcat( szTemp, "_WeaponBGListFrameOpen");
	pPicture = (MPicture*)pResource->FindWidget( szTemp);
	if(pPicture != NULL) {
		if( bOpen && GetArmorWeaponTabIndex() == 1 )  { pPicture->Show(true); } 
		else										{ pPicture->Show(false);}		
	}

	strcpy( szTemp, szName);
	strcat( szTemp, "_WeaponBGListFrameClose");
	pPicture = (MPicture*)pResource->FindWidget( szTemp);
	if(pPicture != NULL) {
		if( !bOpen && GetArmorWeaponTabIndex() == 1 )  { pPicture->Show(true); } 
		else										 { pPicture->Show(false);}		
	}


	// Frame open/close image
	MButton* pButton;
	strcpy( szTemp, szName);
	strcat( szTemp, "_EquipListFrameCloseButton");
	pButton = (MButton*)pResource->FindWidget( szTemp);
	if ( pButton != NULL) pButton->Show( bOpen);

	strcpy( szTemp, szName);
	strcat( szTemp, "_EquipListFrameOpenButton");
	pButton = (MButton*)pResource->FindWidget( szTemp);
	if ( pButton != NULL) pButton->Show( !bOpen);

	// Resize item slot
	char szWidgetName[ 256];
	sprintf( szWidgetName, "%s_EquipmentSlot_Head", szName);
	MWidget* itemSlot = (MWidget*)pResource->FindWidget( szWidgetName);
	if (itemSlot) {
		MRECT rect = itemSlot->GetRect();

		int nWidth;
		if ( bOpen) nWidth = 220.0f * (float)RGetScreenWidth() / 800.0f;
		else		nWidth = min( rect.w, rect.h);

		for ( int i = 0;  i < MMCIP_END;  i++) {
			itemSlot = (MWidget*)pResource->FindWidget( GetItemSlotName( szName, i));

			if (itemSlot) {
				if(GetArmorWeaponTabIndex() == GetArmorWeaponTabIndexContainItemParts((MMatchCharItemParts)i)) {					
					rect = itemSlot->GetRect();

					itemSlot->SetBounds( rect.x, rect.y, nWidth, rect.h);
					itemSlot->Show(true);
				} 
				else {
					itemSlot->Show(false);
				}
			}
		}
	}

	// 상점과 장비창의 탭 버튼 눌림 상태를 동기화해주자 -_-;
	MBmButton* pTabBtn;
	if (GetArmorWeaponTabIndex() == 0)
	{
		pTabBtn = (MBmButton*)pResource->FindWidget("Shop_ArmorEquipmentTab");
		if (pTabBtn) pTabBtn->SetCheck(true);
		pTabBtn = (MBmButton*)pResource->FindWidget("Equip_ArmorEquipmentTab");
		if (pTabBtn) pTabBtn->SetCheck(true);
	}
//.........这里部分代码省略.........
开发者ID:kooksGame,项目名称:life-marvelous,代码行数:101,代码来源:ZShopEquipInterface.cpp


示例18: DrawPage

/***********************************************************************
  DrawPage : protected
  
  desc : 페이지를 그린다
  arg  : none
  ret  : none
************************************************************************/
void ZMonsterBookInterface::DrawPage( void)
{
	// 페이지 정보를 가져온다
	ZMonsterBookPageItr itr = m_mapMonsterBookPage.find( m_nCurrentPageNum);
	ZMonsterBookPageInfo* pPageInfo;
	if ( itr != m_mapMonsterBookPage.end())
		pPageInfo = (*itr).second;
	else
		pPageInfo = new ZMonsterBookPageInfo;


	// Get resource pointer
	ZIDLResource* pResource = ZApplication::GetGameInterface()->GetIDLResource();


	// 배경 이미지 로딩
	if ( m_pBookBgImg != NULL)
	{
		delete m_pBookBgImg;
		m_pBookBgImg = NULL;
	}

	m_pBookBgImg = new CCBitmapR2;
	if ( m_nCurrentPageNum == 0)
		((CCBitmapR2*)m_pBookBgImg)->Create( "monsterIllust.png", RGetDevice(), "interface/MonsterIllust/book_firstbg.jpg");
	else
		((CCBitmapR2*)m_pBookBgImg)->Create( "monsterIllust.png", RGetDevice(), "interface/MonsterIllust/book_bg.jpg");

	if ( m_pBookBgImg)
	{
		// 읽어온 비트맵 이미지 포인터를 해당 위젯에 넘겨줘서 표시한다
		CCPicture* pPicture = (CCPicture*)pResource->FindWidget( "MonsterBook_BookBG");
		if ( pPicture)
			pPicture->SetBitmap( m_pBookBgImg->GetSourceBitmap());
	}


	// 해당 몬스터의 일러스트 이미지를 업데이트 한다
	if ( m_pIllustImg)
	{
		delete m_pIllustImg;
		m_pIllustImg = NULL;
	}
	CCPicture* pPicture = (CCPicture*)pResource->FindWidget( "MonsterBook_MonsterIllust");
	if ( pPicture)
		pPicture->SetBitmap( NULL);


	m_pIllustImg = new CCBitmapR2;
	char szFileName[ 256];
	sprintf( szFileName, "interface/MonsterIllust/monster_Illust%02d.jpg", pPageInfo->m_nID);
	((CCBitmapR2*)m_pIllustImg)->Create( "monsterIllust.png", RGetDevice(), szFileName);
	if ( m_pIllustImg)
	{
		CCPicture* pPicture = (CCPicture*)pResource->FindWidget( "MonsterBook_MonsterIllust");
		if ( pPicture)
			pPicture->SetBitmap( m_pIllustImg->GetSourceBitmap());
	}


	// 해당 몬스터의 이름을 업데이트 한다
	CCLabel* pLabel = (CCLabel*)pResource->FindWidget( "MonsterBook_MonsterName");
	if (pLabel)
	{
		pLabel->SetText( m_nCurrentPageNum ? pPageInfo->m_strName.data() : "");
		pLabel->Show( true);
	}


	// 해당 몬스터의 등급을 업데이트 한다
	pLabel = (CCLabel*)pResource->FindWidget( "MonsterBook_MonsterGrade");
	if ( pLabel)
	{
		char szGrade[ 64] = { 0, };

		if ( m_nCurrentPageNum)
		{
			sprintf( szGrade, "%s : ", ZMsg(MSG_WORD_GRADE));

			switch ( pPageInfo->m_nGrade)
			{
				case NPC_GRADE_REGULAR :
					strcat( szGrade, ZMsg(MSG_WORD_REGULAR));
					break;

				case NPC_GRADE_LEGENDARY :
					strcat( szGrade, ZMsg(MSG_WORD_LEGENDARY));
					break;

				case NPC_GRADE_BOSS :
					strcat( szGrade, ZMsg(MSG_WORD_BOSS));
					break;

//.........这里部分代码省略.........
开发者ID:Kallontz,项目名称:gunz-the-tps-mmorpg,代码行数:101,代码来源:ZMonsterBookInterface.cpp



注:本文中的ZIDLResource类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ZIntPoint类代码示例发布时间:2022-05-31
下一篇:
C++ ZHTClient类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap