void WidgetEnableShow(const char* szWidget, bool bEnable, bool bShow)
{
	MWidget* pWidget = GetIDLResource()->FindWidget( szWidget);
	if (pWidget)
	{
		pWidget->Enable(bEnable);
		pWidget->Show(bShow);
	}
}
// 이렇게 된 곳도 있는데 이건 왜 숨기기만 하는지 모르겠다 -_-;
void WidgetHideDisable(const char* szWidget)
{
	MWidget* pWidget = GetIDLResource()->FindWidget( szWidget);
	if ( pWidget)
	{
		pWidget->Show( false);
		pWidget->Enable( false);
		//pWidget->Show( true);
	}
}
Esempio n. 3
0
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);
		}
	}
}