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


C++ CLTGUICtrl::GetParam1方法代码示例

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


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

示例1: OnRButtonUp

LTBOOL	CFolderWeaponControls::OnRButtonUp(int x, int y)
{
	// Get the control that the click was on
	int nControlIndex=0;
	if (GetControlUnderPoint(x, y, &nControlIndex))
	{
		CLTGUICtrl* pCtrl = GetControl(nControlIndex);
		if (pCtrl && pCtrl->GetParam1())
		{
			CLTGUIColumnTextCtrl *pColumn=(CLTGUIColumnTextCtrl *)pCtrl;
			int nAct = pCtrl->GetParam1()-1;
			m_nActions[nAct] = GetPreviousCommand(m_nActions[nAct]);

			int nWeaponId = g_pWeaponMgr->GetWeaponId(m_nActions[nAct]);
			WEAPON *pWeapon = g_pWeaponMgr->GetWeapon(nWeaponId);
			if (pWeapon)
				pColumn->SetString(1,pWeapon->nNameId);
			else
				pColumn->SetString(1,IDS_CONTROL_UNASSIGNED);
			UpdateSelection();
			return LTTRUE;
		}
	}
	return CBaseFolder::OnRButtonUp(x, y);
}
开发者ID:germanocaldeira,项目名称:no-one-lives-forever,代码行数:25,代码来源:FolderWeaponControls.cpp

示例2: UpdateSelection

void CFolderWeaponControls::UpdateSelection()
{
	CLTGUICtrl *pCtrl = GetSelectedControl();
	if (!pCtrl) return;

	int nComm = pCtrl->GetParam1();
	if (!nComm) return;

	uint8 nWeaponId = g_pWeaponMgr->GetWeaponId(m_nActions[nComm-1]);
	
	if (nWeaponId != nLastId)
	{
		WEAPON* pWeapon = g_pWeaponMgr->GetWeapon(nWeaponId);
		if (pWeapon)
		{

			SAFE_STRCPY(m_szModel, pWeapon->szInterfaceModel);
			SAFE_STRCPY(m_szSkin, pWeapon->szInterfaceSkin);
			VEC_COPY(m_vOffset, pWeapon->vInterfaceOffset);
			m_fScale = pWeapon->fInterfaceScale;
			CreateModelSFX();
		}
		nLastId = nWeaponId;
	}

}
开发者ID:germanocaldeira,项目名称:no-one-lives-forever,代码行数:26,代码来源:FolderWeaponControls.cpp

示例3: UpdateSelection

LTBOOL CFolderIntel::UpdateSelection()
{
	LTBOOL bChanged = CBaseSelectionFolder::UpdateSelection();
	if (bChanged)
	{
		CLTGUICtrl *pCtrl = GetControl(m_nLastListItem);
		if (!pCtrl) return LTFALSE;
		int nIndex = pCtrl->GetParam1();
		if (!nIndex) return LTFALSE;



		IntelItem *pItem = m_intelArray[nIndex-1];
		HSTRING hStr = g_pLTClient->FormatString(pItem->nID);
		m_pDescription->SetString(hStr);
        g_pLTClient->FreeString(hStr);

		CScaleFX* pScaleFX = g_pFXButeMgr->GetScaleFX(pItem->nType);
		SAFE_STRCPY(m_szModel, pScaleFX->szFile);
		SAFE_STRCPY(m_szSkin, pScaleFX->szSkin);
		m_vScale = pScaleFX->vInitialScale;
		m_bChromakey = pScaleFX->bChromakey;
		
		if (pScaleFX->fDirOffset > 0.0f)
		{
			LTFLOAT fScaleMult = (100.0f/pScaleFX->fDirOffset);
			VEC_MULSCALAR(m_vScale, m_vScale, fScaleMult);
		}
		CreateModelSFX();

	}
	return bChanged;	

}
开发者ID:Arc0re,项目名称:lithtech,代码行数:34,代码来源:FolderIntel.cpp

示例4: OnRight

LTBOOL	CFolderWeaponControls::OnRight()
{
	CLTGUICtrl *pCtrl = GetSelectedControl();
	if (pCtrl && pCtrl->GetParam1())
	{
		CLTGUIColumnTextCtrl *pColumn=(CLTGUIColumnTextCtrl *)pCtrl;
		int nAct = pCtrl->GetParam1()-1;
		m_nActions[nAct] = GetNextCommand(m_nActions[nAct]);

		int nWeaponId = g_pWeaponMgr->GetWeaponId(m_nActions[nAct]);
		WEAPON *pWeapon = g_pWeaponMgr->GetWeapon(nWeaponId);
		if (pWeapon)
			pColumn->SetString(1,pWeapon->nNameId);
		else
			pColumn->SetString(1,IDS_CONTROL_UNASSIGNED);
		return LTTRUE;
	}
	return CBaseFolder::OnRight();
}
开发者ID:germanocaldeira,项目名称:no-one-lives-forever,代码行数:19,代码来源:FolderWeaponControls.cpp

示例5: HandleKeyDown

// Handle a keypress
LTBOOL CScreenConfigure::HandleKeyDown(int key, int rep)
{

    LTBOOL handled = LTFALSE;

	switch (key)
	{
	case VK_DELETE:
		{
			// Unassign the key
			if (!m_bWaitingForKey && !m_fInputPauseTimeLeft)
			{

				CLTGUICtrl *pCtrl = m_pList[m_nType]->GetSelectedControl();
				int nCommand = pCtrl->GetParam1();
				CBindingData* pData = m_pProfile->FindBinding(nCommand);

				UnBind( pData->nDeviceObjectId[0], NULL, DEVICETYPE_KEYBOARD);
				UnBind( 0, pData->strTriggerName[1], DEVICETYPE_MOUSE);

				if (g_pGameClientShell->HasGamepad())
					UnBind( 0, pData->strTriggerName[2], DEVICETYPE_GAMEPAD);
				else if (g_pGameClientShell->HasJoystick())
					UnBind(0, pData->strTriggerName[2], DEVICETYPE_JOYSTICK);
				else
					UnBind(0, pData->strTriggerName[2], DEVICETYPE_UNKNOWN);

				SetControlText(pCtrl);

				handled = LTTRUE;
			}
			break;
		}
	}
	// Check to see if the base class is handling this key
	if (m_bWaitingForKey || m_fInputPauseTimeLeft)
		return handled;

	if (!handled)
	{
		handled = CBaseScreen::HandleKeyDown(key, rep);
	}

	// Handled the key
	return handled;
}
开发者ID:rickyharis39,项目名称:nolf2,代码行数:47,代码来源:ScreenConfigure.cpp


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