本文整理汇总了C++中CDrawPort::AddBtnTexture方法的典型用法代码示例。如果您正苦于以下问题:C++ CDrawPort::AddBtnTexture方法的具体用法?C++ CDrawPort::AddBtnTexture怎么用?C++ CDrawPort::AddBtnTexture使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDrawPort
的用法示例。
在下文中一共展示了CDrawPort::AddBtnTexture方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Render
void CUIImageBox::Render()
{
// Get position
int nX, nY;
GetAbsPos( nX, nY );
int nX0 = nX + m_rtRenderRegion.Left;
int nX1 = nX + m_rtRenderRegion.Right;
int nY0 = nY + m_rtRenderRegion.Top;
int nY1 = nY + m_rtRenderRegion.Bottom;
float fU0 = m_rtUV.U0 + (m_rtUV.U1 - m_rtUV.U0) * m_rtRenderRegion.Left / float(m_nWidth);
float fU1 = m_rtUV.U0 + (m_rtUV.U1 - m_rtUV.U0) * m_rtRenderRegion.Right / float(m_nWidth);
float fV0 = m_rtUV.V0 + (m_rtUV.V1 - m_rtUV.V0) * m_rtRenderRegion.Top / float(m_nHeight);
float fV1 = m_rtUV.V0 + (m_rtUV.V1 - m_rtUV.V0) * m_rtRenderRegion.Bottom / float(m_nHeight);
CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();
if(m_eImageType == IT_GENERAL)
{
pDrawPort->InitTextureData( m_ptdBaseTexture );
pDrawPort->AddTexture(nX0, nY0, nX1, nY1,
fU0, fV0,
fU1, fV1,
0xFFFFFFFF );
pDrawPort->FlushRenderingQueue();
}
else if (m_eImageType == IT_CORPS)
{
pDrawPort->InitTextureData( m_ptdCorps );
pDrawPort->AddTexture(nX0, nY0, nX1, nY1,
fU0, fV0,
fU1, fV1,
0xFFFFFFFF );
pDrawPort->FlushRenderingQueue();
}
else
{
UIBtnExType bet;
switch(m_eImageType)
{
case IT_EXP:
case IT_MONEY:
case IT_ITEM:
case IT_SP: // [090617: selo] SP 이미지 타입
case IT_RVR_POINT:
bet = UBET_ITEM;
break;
case IT_SKILL:
case IT_SSKILL:
case IT_AFFINITY: // 친화도 개편2 친화도 타입 추가 [2/7/2013 Ranma]
bet = UBET_SKILL;
break;
case IT_ACTION:
bet = UBET_ACTION;
break;
case IT_AFFINITY_MONSTER:
bet = UBET_COMBO;
break;
}
pDrawPort->AddBtnTexture(m_nTextureID, nX0, nY0, nX1, nY1,
fU0, fV0,
fU1, fV1,
0xFFFFFFFF );
pDrawPort->FlushBtnRenderingQueue( bet, PBT_BLEND );
if(m_bHighlight)
{
pDrawPort->AddBtnTexture(m_nTextureID, nX0, nY0, nX1, nY1,
fU0, fV0,
fU1, fV1,
m_colHighlight );
// Render all button elements
pDrawPort->FlushBtnRenderingQueue( bet, PBT_ADD );
}
}
}