当前位置: 首页>>代码示例>>C++>>正文


C++ CAction::GetTexRow方法代码示例

本文整理汇总了C++中CAction::GetTexRow方法的典型用法代码示例。如果您正苦于以下问题:C++ CAction::GetTexRow方法的具体用法?C++ CAction::GetTexRow怎么用?C++ CAction::GetTexRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CAction的用法示例。


在下文中一共展示了CAction::GetTexRow方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SetImageByType

void CUIImageBox::SetImageByType(eImageType type, int index, int nSyndiType /* = 0 */)
{
	FLOAT fTexWidth;
	FLOAT fTexHeight;
	int nTexRow, nTexCol;
	int nTextureID;
	
	switch(type)
	{
	case IT_EXP://hardcoding	
		{
			nTextureID = 1;
			nTexRow = 15;
			nTexCol = 5;
			m_eUBType = UBET_ITEM;
		} break;
	case IT_SP:	// [090617: selo] SP 이미지 추가 하드코딩
		{
			// only russia sp icon [9/9/2010 rumist]
#if defined (G_RUSSIA)
			nTextureID = 12;
			nTexRow = 0;
			nTexCol = 2;
			m_eUBType = UBET_ITEM;
#else
			nTextureID = 9;
			nTexRow = 12;
			nTexCol = 11;
			m_eUBType = UBET_ITEM;
#endif			
		} break;
	case IT_MONEY:
	case IT_ITEM:
		{
			if(IT_MONEY == type) index = 19;//hardcoding
			CItemData*	pItemData = _pNetwork->GetItemData( index );
			nTextureID = pItemData->GetIconTexID();
			nTexRow = pItemData->GetIconTexRow();
			nTexCol = pItemData->GetIconTexCol();
			m_eUBType = UBET_ITEM;
		} break;
	case IT_SKILL:
		{
			CSkill	&rSkillData = _pNetwork->GetSkillData( index );
			nTextureID = rSkillData.GetIconTexID();
			nTexRow = rSkillData.GetIconTexRow();
			nTexCol = rSkillData.GetIconTexCol();
			m_eUBType = UBET_SKILL;
		} break;
	case IT_SSKILL:// Special Skill
		{
			CSpecialSkill* pSSkillData = CSpecialSkill::getData(index);
			if (pSSkillData == NULL)
				return;
			nTextureID = pSSkillData->GetIconTexID();
			nTexRow = pSSkillData->GetIconTexRow();
			nTexCol = pSSkillData->GetIconTexCol();
			m_eUBType = UBET_SKILL;
		} break;
	case IT_ACTION:
		{
			CAction* pActionData = CAction::getData(index);
			if (pActionData == NULL)
				return;
			nTextureID = pActionData->GetTexID();
			nTexRow = pActionData->GetTexRow();
			nTexCol = pActionData->GetTexCol();
			m_eUBType = UBET_ACTION;
		} break;
	case IT_RVR_POINT:
		{
			nTextureID = 19;
			nTexRow = 2;
			nTexCol = 3;
			m_eUBType = UBET_ITEM;

			// 딜라문 npc면
			if (nSyndiType == 2)	
				nTexCol = 4;
		} break;
	case IT_CORPS:
		{
			InitCorpsImageBox();
			SetImageForCorps( type, index );
			return;
		} break;

	case IT_AFFINITY: // 친화도 개편2 이미지 박스에 친화도 추가 [2/6/2013 Ranma]
		{
			CAffinityData*	rAffinityData = _pNetwork->GetAffinityData();
					
			nTextureID = rAffinityData->GetAffinityDataByIndex(index)->nIconTextureID;
			nTexRow = rAffinityData->GetAffinityDataByIndex(index)->nIconTextureRow;
			nTexCol = rAffinityData->GetAffinityDataByIndex(index)->nIconTextureCol;
			m_eUBType = UBET_SKILL;
		} break;

	case IT_AFFINITY_MONSTER: // 친화도 개편2 이미지 박스에 친화도 추가 [2/6/2013 Ranma]
		{
			CAffinityData* pTempAffinityData = _pNetwork->GetAffinityData();
//.........这里部分代码省略.........
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:101,代码来源:UIImageBox.cpp


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