本文整理汇总了C++中CDrawPort::FlushBtnRenderingQueue方法的典型用法代码示例。如果您正苦于以下问题:C++ CDrawPort::FlushBtnRenderingQueue方法的具体用法?C++ CDrawPort::FlushBtnRenderingQueue怎么用?C++ CDrawPort::FlushBtnRenderingQueue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDrawPort
的用法示例。
在下文中一共展示了CDrawPort::FlushBtnRenderingQueue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Render
// ----------------------------------------------------------------------------
// Name : Render()
// Desc :
// ----------------------------------------------------------------------------
void CUICompound::Render()
{
CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();
// Set texture
pDrawPort->InitTextureData( m_ptdBaseTexture );
// Add render regions
int nX, nY, i;
// Background
// Top
nX = m_nPosX + m_nWidth;
nY = m_nPosY + 26;
pDrawPort->AddTexture( m_nPosX, m_nPosY, nX, nY,
m_rtTop.U0, m_rtTop.V0, m_rtTop.U1, m_rtTop.V1,
0xFFFFFFFF );
// Middle 1
pDrawPort->AddTexture( m_nPosX, nY, nX, nY + m_nTextRegionHeight,
m_rtMiddle1.U0, m_rtMiddle1.V0, m_rtMiddle1.U1, m_rtMiddle1.V1,
0xFFFFFFFF );
// Middle 2
nY += m_nTextRegionHeight;
pDrawPort->AddTexture( m_nPosX, nY, nX, m_nPosY + m_nHeight - 7,
m_rtMiddle2.U0, m_rtMiddle2.V0, m_rtMiddle2.U1, m_rtMiddle2.V1,
0xFFFFFFFF );
// Bottom
nY = m_nPosY + m_nHeight - 7;
pDrawPort->AddTexture( m_nPosX, nY, nX, m_nPosY + m_nHeight,
m_rtBottom.U0, m_rtBottom.V0, m_rtBottom.U1, m_rtBottom.V1,
0xFFFFFFFF );
for ( i = 0; i < COMPOUND_ITEM_SLOT_COUNT; i++ )
{
// Slot item region
pDrawPort->AddTexture( m_nPosX + m_rcItemSlot[i].Left, m_nPosY + m_rcItemSlot[i].Top,
m_nPosX + m_rcItemSlot[i].Right, m_nPosY + m_rcItemSlot[i].Bottom,
m_rtItemSlot.U0, m_rtItemSlot.V0, m_rtItemSlot.U1, m_rtItemSlot.V1,
0xFFFFFFFF );
}
// Close button
m_btnClose.Render();
// OK button
m_btnOK.Render();
// Cancel button
m_btnCancel.Render();
// Render all elements
pDrawPort->FlushRenderingQueue();
// Item
for( i = 0; i < COMPOUND_ITEM_SLOT_COUNT; i++ )
{
if (m_pIconSlot[i]->IsEmpty() == false)
{
m_pIconSlot[i]->Render(pDrawPort);
pDrawPort->FlushBtnRenderingQueue( UBET_ITEM );
}
}
// Text in
pDrawPort->PutTextEx( _S( 723, "힘의 상자" ), m_nPosX + COMPOUND_TITLE_TEXT_OFFSETX,
m_nPosY + COMPOUND_TITLE_TEXT_OFFSETY, 0xFFFFFFFF );
nX = m_nPosX + COMPOUND_DESC_TEXT_SX;
nY = m_nPosY + COMPOUND_DESC_TEXT_SY;
for( int iDesc = 0; iDesc < m_nStringCount; iDesc++ )
{
pDrawPort->PutTextEx( m_strDesc[iDesc], nX , nY, 0xC5C5C5FF );
nY += _pUIFontTexMgr->GetLineHeight();
}
// Flush all render text queue
pDrawPort->EndTextEx();
}
示例2: 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 );
}
}
}
示例3: RenderMasterStone
// ----------------------------------------------------------------------------
// Name : !!RenderMasterStone()
// Desc :
// ----------------------------------------------------------------------------
void CUIMixNew::RenderMasterStone()
{
CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();
// Set mix texture
pDrawPort->InitTextureData( m_ptdBaseTexture );
// Add render regions
int nX, nY ,i;
// Background
// Top
nX = m_nPosX + m_nWidth;
nY = m_nPosY + 26;
pDrawPort->AddTexture( m_nPosX, m_nPosY, nX, nY,
m_rtTop.U0, m_rtTop.V0, m_rtTop.U1, m_rtTop.V1,
0xFFFFFFFF );
// Middle 1
pDrawPort->AddTexture( m_nPosX, nY, nX, nY + m_nTextRegionHeight,
m_rtMiddle1.U0, m_rtMiddle1.V0, m_rtMiddle1.U1, m_rtMiddle1.V1,
0xFFFFFFFF );
// Middle 2
pDrawPort->AddTexture( m_nPosX+ 10, nY + 65 , nX-10,nY + m_nTextRegionHeight - 35,
m_rtMiddle2.U0, m_rtMiddle2.V0, m_rtMiddle2.U1, m_rtMiddle2.V1,
0xFFFFFFFF );
// Bottom
nY = m_nPosY + m_nHeight - 7;
pDrawPort->AddTexture( m_nPosX, nY, nX, m_nPosY + m_nHeight,
m_rtBottom.U0, m_rtBottom.V0, m_rtBottom.U1, m_rtBottom.V1,
0xFFFFFFFF );
for ( i = 0; i < MIXNEW_ITEM_SLOT_COUNT; i++ )
{
// Slot item region
pDrawPort->AddTexture( m_nPosX + m_rcItemSlot[i].Left, m_nPosY + m_rcItemSlot[i].Top,
m_nPosX + m_rcItemSlot[i].Right, m_nPosY + m_rcItemSlot[i].Bottom,
m_rtItemSlot.U0, m_rtItemSlot.V0, m_rtItemSlot.U1, m_rtItemSlot.V1,
0xFFFFFFFF );
}
// Close button
m_btnClose.Render();
// OK button
m_btnOK.SetText(_S(5434,"업그레이드"));
m_btnOK.Render();
// Cancel button
m_btnCancel.Render();
// Render all elements
pDrawPort->FlushRenderingQueue();
// Item
for ( i = 0; i < MIXNEW_ITEM_SLOT_COUNT; i++ )
{
if (m_pIconsSlot[i]->IsEmpty() == false)
{
m_pIconsSlot[i]->Render(pDrawPort);
pDrawPort->FlushBtnRenderingQueue( UBET_ITEM );
}
}
// Text in title
pDrawPort->PutTextEx( _S( 5433, "마스터 스톤" ), m_nPosX + MIXNEW_TITLE_TEXT_OFFSETX,
m_nPosY + MIXNEW_TITLE_TEXT_OFFSETY, 0xFFFFFFFF );
nX = m_nPosX + MIXNEW_DESC_TEXT_SX;
nY = m_nPosY + MIXNEW_DESC_TEXT_SY + 20;
COLOR tv_col;
for( int iDesc = 0; iDesc < m_nStringCount; iDesc++ )
{
if(iDesc == 6) tv_col = 0xC87238FF;
else tv_col = 0xC5C5C5FF;
pDrawPort->PutTextEx( m_strMixDesc[iDesc], nX , nY, tv_col );
nY += _pUIFontTexMgr->GetLineHeight();
}
m_strItemSlot[0] = _S( 5433, "마스터 스톤");
m_strItemSlot[1] = _S( 2736, "장비 아이템");
int tv_size = _pUIFontTexMgr->GetFontSpacing() + _pUIFontTexMgr->GetFontWidth();
pDrawPort->PutTextEx( m_strItemSlot[0],
m_nPosX + 62 - m_strItemSlot[0].Length()* tv_size/2 , m_nPosY + MIXNEW_ITEM_SLOT_SIZE*2 + 5, 0x929090FF );
pDrawPort->PutTextEx( m_strItemSlot[1],
m_nPosX + 152 - m_strItemSlot[1].Length()* tv_size/2 , m_nPosY + MIXNEW_ITEM_SLOT_SIZE*2 +5, 0x929090FF );
// Flush all render text queue
pDrawPort->EndTextEx();
}
示例4: RenderRemissionBtns
// ----------------------------------------------------------------------------
// Name : RenderRemissionBtns()
// Desc :
// ----------------------------------------------------------------------------
void CUIRemission::RenderRemissionBtns()
{
int nX = REMISSION_SLOT_SX, nY = REMISSION_SLOT_SY;
int iRow, iRowS, iRowE;
// Remission remission button
iRowS = m_sbRemissionIcon.GetScrollPos();
iRowE = iRowS + REMISSION_SLOT_ROW;
if ( m_vectorbtnRemissions.size() < iRowE )
{
iRowE = m_vectorbtnRemissions.size();
}
for( iRow = iRowS; iRow < iRowE; iRow++, nY += REMISSION_SLOT_OFFSETY )
{
m_vectorbtnRemissions[iRow].SetPos( nX, nY );
if( m_vectorbtnRemissions[iRow].IsEmpty() )
continue;
m_vectorbtnRemissions[iRow].Render();
}
CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();
// Render all button elements
pDrawPort->FlushBtnRenderingQueue( UBET_REMISSION );
if( m_nSelRemissionID >= 0 )
{
// Set remission learn texture
pDrawPort->InitTextureData( m_ptdBaseTexture );
m_vectorbtnRemissions[m_nSelRemissionID].GetAbsPos( nX, nY );
pDrawPort->AddTexture( nX, nY, nX + BTN_SIZE, nY + BTN_SIZE,
m_rtSelOutline.U0, m_rtSelOutline.V0,
m_rtSelOutline.U1, m_rtSelOutline.V1,
0xFFFFFFFF );
// Render all elements
pDrawPort->FlushRenderingQueue();
}
nY = REMISSION_NAME_SY;
iRowS = m_sbRemissionIcon.GetScrollPos();
iRowE = iRowS + REMISSION_SLOT_ROW;
if ( m_vectorbtnRemissions.size() < iRowE )
{
iRowE = m_vectorbtnRemissions.size();
}
for( iRow = iRowS; iRow < iRowE; iRow++, nY += REMISSION_SLOT_OFFSETY )
{
if( m_vectorbtnRemissions[iRow].IsEmpty() )
continue;
const SBYTE sbRemissionType = m_vectorbtnRemissions[iRow].GetRemissionType();
if(sbRemissionType == REMISSION_NONE)
continue;
switch(sbRemissionType)
{
case REMISSION_HP:
m_strShortDesc.PrintF( _S( 616, "육체의 면죄부" ) );
pDrawPort->PutTextExCX( m_strShortDesc, m_nPosX + REMISSION_NAME_CX, m_nPosY + nY, 0xFFC672FF);
break;
case REMISSION_MP:
m_strShortDesc.PrintF( _S( 617, "영혼의 면죄부" ) );
pDrawPort->PutTextExCX( m_strShortDesc, m_nPosX + REMISSION_NAME_CX, m_nPosY + nY, 0xFFC672FF);
break;
case REMISSION_ITEM:
{
m_strShortDesc.PrintF( _S( 618, "장비의 면죄부" ) );
pDrawPort->PutTextExCX( m_strShortDesc, m_nPosX + REMISSION_NAME_CX, m_nPosY + nY, 0xFFC672FF);
m_strShortDesc.PrintF( "%s", _pNetwork->GetItemName( m_vectorbtnRemissions[iRow].GetItemIndex() ));
pDrawPort->PutTextExCX( m_strShortDesc, m_nPosX + REMISSION_NAME_CX, m_nPosY + nY + 17, 0xBDA99FFF);
}
break;
}
}
}
示例5: Render
// ------------------------------------------------------------------------------
// Name : Render
// Desc :
// ------------------------------------------------------------------------------
void CUIPetItemMix::Render()
{
CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();
// Set skill learn texture
pDrawPort->InitTextureData( m_ptdBaseTexture );
// Add render regions -----------------------------------------------------------------------------------------------
// Background up
pDrawPort->AddTexture( m_nPosX, m_nPosY, m_nPosX + m_nWidth, m_nPosY + PROCESS_TOP_HEIGHT,
m_rtBackgroundTop.U0, m_rtBackgroundTop.V0, m_rtBackgroundTop.U1, m_rtBackgroundTop.V1,
0xFFFFFFFF );
// Background down
pDrawPort->AddTexture( m_nPosX, m_nPosY+PROCESS_TOP_HEIGHT, m_nPosX + m_nWidth, m_nPosY + m_nHeight,
m_rtBackgroundBtm.U0, m_rtBackgroundBtm.V0, m_rtBackgroundBtm.U1, m_rtBackgroundBtm.V1,
0xFFFFFFFF );
// Render Title Text
pDrawPort->PutTextEx( _S( 2459, "제작" ) , m_nPosX + PROCESS_TITLE_TEXT_OFFSETX,
m_nPosY + PROCESS_TITLE_TEXT_OFFSETY );
// Render Process Type
if( m_nPetType == DRAGON_WEAPON )
pDrawPort->PutTextExCX( _S( 2460, "드래곤 웨폰 제작" ), m_nPosX + 106, m_nPosY + 35, COLOR_TITLE );
else if( m_nPetType == KNIGHT_AMOR )
pDrawPort->PutTextExCX( _S( 2461, "나이트 메어 방어구 제작" ), m_nPosX + 106, m_nPosY + 35, COLOR_TITLE );
// Process Item Scroll bar
m_sbProcessItem.Render();
// List box of Need Item Desc
m_lbPreconditionDesc.Render();
// Close button
m_btnClose.Render();
// Process button ( A, B )
if( m_nPetType == DRAGON_WEAPON )
m_btnOK[0].Render();
else if( m_nPetType == KNIGHT_AMOR )
{
m_btnOK[1].Render();
m_btnOK[2].Render();
}
// Cancel button
m_btnCancel.Render();
pDrawPort->FlushRenderingQueue();
// Render Process Item
CTString m_strShortDesc;
int nX = SLEARN_SLOT_SX;
int nY = SLEARN_SLOT_SY;
int iEnd = m_sbProcessItem.GetScrollPos() + PRODUCT_SLOT_ROW;
if( iEnd > m_vecIcons.size() )
iEnd = m_vecIcons.size();
for ( int i = m_sbProcessItem.GetScrollPos(); i < iEnd; i++ )
{
if( !m_vecIcons[i]->IsEmpty() )
{
// render Item
m_vecIcons[i]->SetPos ( nX, nY );
m_vecIcons[i]->Render(pDrawPort);
// render Item desc
CItemData* pItemData = _pNetwork->GetItemData ( m_vecIcons[i]->getIndex() );
const char* szItemName = _pNetwork->GetItemName ( m_vecIcons[i]->getIndex() );
pDrawPort->PutTextExCX( CTString ( szItemName ), m_nPosX + 122, m_nPosY + nY + 8, 0xC3C3C3ff );
nY += SLEARN_SLOT_OFFSETY;
}
}
pDrawPort->FlushBtnRenderingQueue( UBET_ITEM );
// Flush all render text queue
pDrawPort->EndTextEx();
pDrawPort->InitTextureData( m_ptdBaseTexture );
nX = SLEARN_SLOT_SX;
nY = SLEARN_SLOT_SY;
// render sel outline
if ( m_nSelectProcessItem != -1 )
{
int BoxX, BoxY;
int nOffset = m_nSelectProcessItem - m_sbProcessItem.GetScrollPos();
//.........这里部分代码省略.........