本文整理汇总了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);
}
示例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;
}
}
示例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;
}
示例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();
}
示例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;
}