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


C++ CDrawPort类代码示例

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


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

示例1: Render

// ----------------------------------------------------------------------------
// Name : Render()
// Desc :
// ----------------------------------------------------------------------------
void CUIAD::Render()
{
	CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();

	// Set skill learn texture
	pDrawPort->InitTextureData( m_ptdBaseTexture );

	SelectLogo();

	PlayLC(m_eAniType);
	
	// Attach Map window
	extern ENGINE_API INDEX sam_iScreenSizeI;
//	m_rcAD[0].SetRect(sam_iScreenSizeI - 115, 145,sam_iScreenSizeI - 14,197);
	m_rcAD[0].SetRect(sam_iScreenSizeI - 115, 152,sam_iScreenSizeI - 14,205);
	m_rcAD[1].CopyRect( m_rcAD[0] );

	m_rcAD_ani = m_rcAD[0];
	
	pDrawPort->AddTexture( m_rcAD_ani.Left  , m_rcAD_ani.Top  , m_rcAD_ani.Right , m_rcAD_ani.Bottom ,
		m_uvAD[m_selAni].U0, m_uvAD[m_selAni].V0,	m_uvAD[m_selAni].U1, m_uvAD[m_selAni].V1,	0xFFFFFFFF );
	

	// Render all elements
	pDrawPort->FlushRenderingQueue();	
	
	// Flush all render text queue
	pDrawPort->EndTextEx();
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:33,代码来源:UIAD.cpp

示例2: GetAbsPos

// ----------------------------------------------------------------------------
// Name : Render()
// Desc :
// ----------------------------------------------------------------------------
void CUICheckButton::Render()
{
	// Get position
	int	nX, nY;
	GetAbsPos( nX, nY );

	// Add render regions
	int	nUVIndex;
	if( m_bChecked )
		nUVIndex = UCBS_CHECK;
	else
		nUVIndex = UCBS_NONE;

	CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();

	if(m_bValidText)
	{
		if( IsEnabled() )
		{
			pDrawPort->PutTextEx( m_strText, nX + m_nTextSX, nY + m_nTextSY, m_colText[1] );
		}
		else
		{
			pDrawPort->PutTextEx( m_strText, nX + m_nTextSX, nY + m_nTextSY, m_colText[0] );
			nUVIndex += 2;
		}
	}

	pDrawPort->AddTexture( nX, nY, nX + m_nWidth, nY + m_nHeight,
										m_rtUV[nUVIndex].U0, m_rtUV[nUVIndex].V0,
										m_rtUV[nUVIndex].U1, m_rtUV[nUVIndex].V1,
										0xFFFFFFFF );
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:37,代码来源:UICheckButton.cpp

示例3: StringSplit

void StringSplit(std::vector<CTString>& vecOutput, CTString strInput, ULONG ulColumnWidth)
{
	CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();

	ULONG ulWidth = 0;
#if defined(G_RUSSIA)
	ulWidth = UTIL_HELP()->GetNoFixedWidth(_pfdDefaultFont, strInput.str_String);
#else	//	defined(G_RUSSIA)
	ulWidth = pDrawPort->GetTextWidth2(strInput);
#endif	//	defined(G_RUSSIA)
	
	if (ulWidth <= ulColumnWidth)
	{
		strInput.TrimSpacesLeft();
		strInput.TrimSpacesRight();
		vecOutput.push_back(strInput);
		return;
	}
	
	char szTemp[4];
	int len = strInput.Length(), pos = 0;
	ulWidth = 0;
	for (int i = 0, j = 0; i < len; j = 0)
	{
		if (IsDBCSLeadByte(strInput[i]))
			szTemp[j++] = strInput[i++];
		szTemp[j++] = strInput[i++];
		szTemp[j] = 0;
		ULONG ulTempWidth = 0;
#if defined(G_RUSSIA)
		ulTempWidth = UTIL_HELP()->GetNoFixedWidth(_pfdDefaultFont, szTemp);
#else	//	defined(G_RUSSIA)
		ulTempWidth = pDrawPort->GetTextWidth2(szTemp);
#endif	//	defined(G_RUSSIA)
		if (ulWidth + ulTempWidth > ulColumnWidth &&
			!(j == 1 && (szTemp[0] == '.' || szTemp[0] == ',' || szTemp[0] == ' ')))
			break;

		pos = i;
		ulWidth += ulTempWidth;
		if( strInput[pos] == '\n' || strInput[pos] == '\r' )
		{
			pos++;
			break;
		}	
	}
	CTString strLeft, strRight;
	strInput.Split(pos, strLeft, strRight);
	strLeft.TrimSpacesLeft();
	strLeft.TrimSpacesRight();
	vecOutput.push_back(strLeft);

	if (strRight.Length() > 0)
		StringSplit(vecOutput, strRight, ulColumnWidth);
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:55,代码来源:UIListBox.cpp

示例4: PopupRender

void CUIImageBox::PopupRender()
{
	CUIManager* pUIManager = CUIManager::getSingleton();
	CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();

	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;

	int rtRenderRegionMiddle = nX + (m_rtRenderRegion.Left + m_rtRenderRegion.Right) / 2;
	int nRegionHeight = m_rtRenderRegion.Bottom - m_rtRenderRegion.Top;
		
	if ( m_bShowPopup )	
	{
		pDrawPort->InitTextureData( m_ptdPopup );
		
		int nAlineSize	= m_vecString.size();
		int nPopHeight	= 10 - _pUIFontTexMgr->GetLineSpacing() + (nAlineSize+1) * _pUIFontTexMgr->GetLineHeight();
		int nPopX = rtRenderRegionMiddle - (m_nPopWidth/2);
		int nPopY = nY0 - nPopHeight;
	
		if( nPopX < pUIManager->GetMinI() )
		{
			nPopX = pUIManager->GetMinI();
		}
		else if (nPopX + m_nPopWidth > pUIManager->GetMaxI())
		{
			nPopX = pUIManager->GetMaxI() - m_nPopWidth;
		}
		
		if (nPopY < pUIManager->GetMinJ())
		{
			nPopY = nY + nRegionHeight;
		}
		
		m_bxPopupInfo.SetBoxPos(WRect(nPopX-nX, nPopY-nY, nPopX-nX+m_nPopWidth, nPopY-nY+nPopHeight ));
		m_bxPopupInfo.Render(nX,nY);

		std::vector<CTString>::iterator b = m_vecString.begin();
		
		for (int i = 0; b != m_vecString.end(); b++, i++)
		{
			pDrawPort->PutTextEx( *b, nPopX+20, nPopY+6+(i*14), m_colText );
		}
		pDrawPort->FlushRenderingQueue();
		pDrawPort->EndTextEx();		
	}
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:52,代码来源:UIImageBox.cpp

示例5: Render

// ----------------------------------------------------------------------------
// Name : Render()
// Desc :
// ----------------------------------------------------------------------------
void CUISelectResource::Render()
{
	CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();

	// Set skill learn texture
	pDrawPort->InitTextureData( m_ptdBaseTexture );
	
	// Add render regions
	// Background
	int nX = m_nPosX;
	int nY = m_nPosY;
	pDrawPort->AddTexture( nX, m_nPosY, nX + m_nWidth, nY + TITLEBAR_HEIGHT,
		m_rtBackTop.U0, m_rtBackTop.V0, 
		m_rtBackTop.U1, m_rtBackTop.V1,
		0xFFFFFFFF );
	
	nY += TITLEBAR_HEIGHT;	
	pDrawPort->AddTexture( nX, nY, nX + m_nWidth, m_nPosY + m_nHeight - 7,
		m_rtBackMiddle1.U0, m_rtBackMiddle1.V0, 
		m_rtBackMiddle1.U1, m_rtBackMiddle1.V1,
		0xFFFFFFFF );
	
	nY = m_nPosY + m_nHeight - 7;

	pDrawPort->AddTexture( nX, nY, nX + m_nWidth, m_nPosY + m_nHeight,
		m_rtBackBottom.U0, m_rtBackBottom.V0, 
		m_rtBackBottom.U1, m_rtBackBottom.V1,
		0xFFFFFFFF );	

	m_btnClose.Render();

	std::vector<CUIButton>::iterator itend = m_vectorResourceList.end();
	std::vector<CUIButton>::iterator it = m_vectorResourceList.begin();

	for(; it != itend; ++it)
	{
		(*it).Render();
	}

	// Render all elements
	pDrawPort->FlushRenderingQueue();	
	
	CTString strTitle = _S( 1823, "미네랄 선택" );
	
	// Text in skill learn	
	if( m_bSelectType )
	{
		strTitle =_S( 1974,  "생산방법 선택" );
	}
		
	pDrawPort->PutTextEx( strTitle, m_nPosX + SELECTRESOURCE_TITLE_TEXT_OFFSETX,	
		m_nPosY + SELECTRESOURCE_TITLE_TEXT_OFFSETY, 0xFFFFFFFF );
	
	// Flush all render text queue
	pDrawPort->EndTextEx();
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:60,代码来源:UISelectResource.cpp

示例6: Render

void CUIChildQuickSlot::Render()
{
	CUIManager* pUIManager = CUIManager::getSingleton();
	CDrawPort* pDrawPort = pUIManager->GetDrawPort();
	
	///< texture init
	pDrawPort->InitTextureData( m_ptdBaseTexture );
	
	if( *(m_bRotation[m_nCurSlot]) == 1 )
	{
		int	nX = m_nPosX;
		int	nY = m_nPosY;
		// Quick slot base texture
		pDrawPort->AddTexture( nX, nY
			,nX + CHILD_QUICKSLOT_WIDTH, nY + CHILD_QUICKSLOT_HEIGHT
			,m_rtHorzBackground.U0, m_rtHorzBackground.V0
			,m_rtHorzBackground.U1, m_rtHorzBackground.V1
			,0xFFFFFFFF );
		
		// 퀵슬롯 페이지 출력 위치를 수동으로 계산 [12/20/2012 Ranma]
		pDrawPort->PutTextExCX(m_strPageNumber, m_nPosX + 7, m_nPosY + 11 );
		m_btnHorizontal.Render();
		m_btnLock.SetPos(CHILD_QUICKSLOT_WIDTH - QSLOT_OUTSIDE_BTN_SIZE - 1, 19);
		m_btnUnLock.SetPos(CHILD_QUICKSLOT_WIDTH - QSLOT_OUTSIDE_BTN_SIZE - 1, 19);
	}
	else if ( *(m_bRotation[m_nCurSlot]) == 0 )
	{
		int	nX = m_nPosX;
		int	nY = m_nPosY;
		// Quick slot base texture
		pDrawPort->AddTexture( nX, nY
			, nX + CHILD_QUICKSLOT_HEIGHT, nY + CHILD_QUICKSLOT_WIDTH
			, m_rtVerBackground.U0, m_rtVerBackground.V0
			, m_rtVerBackground.U1, m_rtVerBackground.V1
			, 0xFFFFFFFF );
		
		// 퀵슬롯 페이지 출력 위치를 수동으로 계산 [12/20/2012 Ranma]
		pDrawPort->PutTextExCX(m_strPageNumber, m_nPosX + 18, m_nPosY + 2 );
		m_btnVertical.Render();
		m_btnLock.SetPos(1, CHILD_QUICKSLOT_WIDTH - QSLOT_OUTSIDE_BTN_SIZE - 1);
		m_btnUnLock.SetPos(1, CHILD_QUICKSLOT_WIDTH - QSLOT_OUTSIDE_BTN_SIZE - 1);
	}
	
	if(*(m_bLock[m_nCurSlot]))
		m_btnLock.Render();
	else
		m_btnUnLock.Render();
	
	pDrawPort->FlushRenderingQueue();
	
	SlotRender();
	
	// Flush all render text queue
	pDrawPort->EndTextEx();
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:55,代码来源:UIChildQuickSlot.cpp

示例7: DrawText

void CUIListBoxMultiCol::DrawText ( int nCol, int nRow, int nX, int nY, TEXT_ALIGN enAlign, COLOR TextColor )
{
	CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();

	switch( enAlign )
	{
		case TEXT_LEFT:
			pDrawPort->PutTextEx( m_vecString[nCol].vecString[nRow], nX, nY, TextColor );
			break;
		case TEXT_CENTER:
			pDrawPort->PutTextExCX( m_vecString[nCol].vecString[nRow], nX + m_vecRowWidht[nRow]/2, nY, TextColor );
			break;
		case TEXT_RIGHT:
			pDrawPort->PutTextExRX( m_vecString[nCol].vecString[nRow], nX, nY, TextColor );
			break;
		default:
			pDrawPort->PutTextEx( m_vecString[nCol].vecString[nRow], nX, nY, TextColor );
	}
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:19,代码来源:UIListBoxMultiList.cpp

示例8: RenderImage

void CUIHelp::RenderImage(int iListIndex)
{
	// Check invalid
	if(iListIndex<=0) return;
	HELP1 tHelp1 = (*m_pHelp1)[iListIndex];
	if( tHelp1.m_width <= 0 ) return;

	FLOAT fTexWidth	= m_ptdImageTemp->GetPixWidth();
	FLOAT fTexHeight	= m_ptdImageTemp->GetPixHeight();	

	CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();

	pDrawPort->InitTextureData( m_ptdImageTemp );

	// Add render regions
	int	nX, nY;

	m_bSlideImgX = tHelp1.m_width;

	if(tHelp1.m_width > sideImageSize)
	{
		nX = m_nPosX + m_rcRightView.Left + m_bSlideImgX;
		nY = m_nPosY + m_lbReadContent.GetPosY() + (m_lbReadContent.GetCurItemCount(0)*m_lbReadContent.GetLineHeight());
	}
	else
	{
		nX = m_nPosX + m_nWidth + m_bSlideImgX;
		nY = m_nPosY;
	}
	
	// Set UV 
	UIRectUV tUV;
	tUV.SetUV(tHelp1.m_uv_x,tHelp1.m_uv_y,tHelp1.m_uv_x+m_bSlideImgX,tHelp1.m_uv_y+tHelp1.m_height,fTexWidth,fTexHeight);

	pDrawPort->AddTexture(
		nX - m_bSlideImgX, nY, nX , nY + tHelp1.m_height,
		tUV.U0,tUV.V0,tUV.U1,tUV.V1,
		0xFFFFFFFF);
	
	pDrawPort->FlushRenderingQueue();	
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:41,代码来源:UIHelp.cpp

示例9: Credits_Render

// render credits to given drawport
FLOAT Credits_Render(CDrawPort *pdp)
{
  if (!_bCreditsOn) {
    return 0;
  }
  CDrawPort dpWide;
  pdp->MakeWideScreen(&dpWide);

  pdp->Unlock();
  dpWide.Lock();

  FLOAT fTime = GetTime();
  
  pixW = dpWide.GetWidth();
  pixH = dpWide.GetHeight();
  fResolutionScaling = (FLOAT)pixW / 640.0f;
  dpWide.SetFont( _pfdDisplayFont);
  pixLineHeight = floor(20*fResolutionScaling);

  const FLOAT fLinesPerSecond = _fSpeed;
  FLOAT fOffset = fTime*fLinesPerSecond;
  INDEX ctLinesOnScreen = pixH/pixLineHeight;
  INDEX iLine1 = fOffset;

  pixJ = iLine1*pixLineHeight-fOffset*pixLineHeight;
  iLine1-=ctLinesOnScreen;

  INDEX ctLines = _astrCredits.Count();
  BOOL bOver = TRUE;

  for (INDEX i = iLine1; i<iLine1+ctLinesOnScreen+1; i++) {
    CTString *pstr = &strEmpty;
    INDEX iLine = i;
    if (iLine>=0 && iLine<ctLines) {
      pstr = &_astrCredits[iLine];
      bOver = FALSE;
    }
    PrintOneLine(&dpWide, *pstr);
  }

  dpWide.Unlock();
  pdp->Lock();

  if (bOver) {
    return 0;
  } else if (ctLines-iLine1<ctLinesOnScreen) {
    return FLOAT(ctLines-iLine1)/ctLinesOnScreen;
  } else {
    return 1;
  }
}
开发者ID:AdamFlores,项目名称:Serious-Engine,代码行数:52,代码来源:Credits.cpp

示例10: GetAbsPos

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 );
		}
	}
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:77,代码来源:UIImageBox.cpp

示例11: Render

// ----------------------------------------------------------------------------
// Name : Render()
// Desc :
// ----------------------------------------------------------------------------
void CUICreateChar::Render()
{	
	extern INDEX	sam_bWideScreen;
	CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();

	// Set create character textire
	pDrawPort->InitTextureData( m_ptdBaseTexture );
	
	// Character information
	// Top
	pDrawPort->AddTexture( m_rcCharInfo.Left, m_rcCharInfo.Top,
										m_rcCharInfo.Right, m_rcCharInfo.Top + CREATECHAR_INFO_HEIGHT,
										m_rtCharInfoTop.U0, m_rtCharInfoTop.V0,
										m_rtCharInfoTop.U1, m_rtCharInfoTop.V1,
										0xFFFFFFFF );
	// Bottom
	pDrawPort->AddTexture( m_rcCharInfo.Left, m_rcCharInfo.Top + CREATECHAR_INFO_HEIGHT,
										m_rcCharInfo.Right, m_rcCharInfo.Bottom,
										m_rtCharInfoBottom.U0, m_rtCharInfoBottom.V0,
										m_rtCharInfoBottom.U1, m_rtCharInfoBottom.V1,
										0xFFFFFFFF );

	// Character name input box
	m_ebCharName.Render();

	// Job button
	m_btnJobPrev.Render();
	m_btnJobNext.Render();

	// Head button
	m_btnFacePrev.Render();
	m_btnFaceNext.Render();

	// Hair button
	m_btnHairPrev.Render();
	m_btnHairNext.Render();

	// Face button
	//m_btnHeadPrev.Render();
	//m_btnHeadNext.Render();

	// OK button
	m_btnOK.Render();

	// Cancel button
	m_btnCancel.Render();

	// Character control
	/*
	// Zoom in button
	m_btnZoomIn.Render();

	// Zoom out button
	m_btnZoomOut.Render();

	// Rotate to left button
	m_btnRotateToLeft.Render();

	// Rotate to right
	m_btnRotateToRight.Render();
	*/

	// Render all elements
	pDrawPort->FlushRenderingQueue();

	// Render character information
	int	nX = m_rcCharInfo.Left + CREATECHAR_DESC_SX;
	int	nY = m_rcCharInfo.Top + CREATECHAR_DESC_SY;
	for( int iInfo = 0; iInfo < m_nCurInfoLines; iInfo++ )
	{
		pDrawPort->PutTextEx( m_strCharInfo[iInfo], nX, nY, m_colCharInfo[iInfo] );
		nY += _pUIFontTexMgr->GetLineHeight();
	}
	
	// Prepare Rendering Text
	nX = m_rcCharInfo.Left;
	nY = m_rcCharInfo.Top;
	pDrawPort->PutTextEx( _S( 140, "캐릭터 생성" ),
										nX + CREATECHAR_TITLE_OFFSETX, nY + CREATECHAR_TITLE_OFFSETY );
	pDrawPort->PutTextExRX( _S( 71, "이름" ),
											nX + CREATECHAR_NAME_RX, nY + CREATECHAR_NAME_SY );
	pDrawPort->PutTextExRX( _S( 141, "직업" ),
											nX + CREATECHAR_NAME_RX, nY + CREATECHAR_JOB_SY );
	pDrawPort->PutTextExRX( _S( 144, "얼굴" ),		// 얼굴
											nX + CREATECHAR_NAME_RX, nY + CREATECHAR_FACE_SY );
	pDrawPort->PutTextExRX( _S( 143, "헤어" ),		// 헤어
											nX + CREATECHAR_NAME_RX, nY + CREATECHAR_HAIR_SY );
	//pDrawPort->PutTextExRX( _S( 142, "머리" ),		// 머리
	//										nX + CREATECHAR_NAME_RX, nY + CREATECHAR_HEAD_SY );

	// Print Job
	pDrawPort->PutTextExCX( JobInfo().GetName(m_iSelectedJob),
											nX + CREATECHAR_JOB_MAIN_CY, nY + CREATECHAR_JOB_SY );
	// Print Face
	CTString strTemp;
	strTemp.PrintF("%d", m_sbSelectedFace + 1);
//.........这里部分代码省略.........
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:101,代码来源:UICreateChar.cpp

示例12: Render

void CUITrackPopup::Render()
{
	if( !IsVisible() ) return;
	if( m_vecString.size() <= 0 ) return;

	CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();

#if defined G_RUSSIA
	// [2011/05/17 : Sora] 팝업창에서 스트링을 쓰지 않을 경우 글자 길이가 0이되어 팝업창 사이즈가 줄어든다
	if( m_strLongestStringInMenu.Length() > 0 )
	{
		Resize( pDrawPort->GetTextWidth( m_strLongestStringInMenu ) );		
	}
#endif

	// 배경 렌더
	int	nX, nY;
	UIRect m_rcBack;

	GetAbsPos( nX, nY );
	m_rcBack.SetRect( nX, nY, nX + m_nWidth, nY + m_nHeight );

	// Item Back region
	pDrawPort->AddTexture( m_rcBack.Left, m_rcBack.Top,
										m_rcBack.Left + 7, m_rcBack.Top + 7,
										m_rtBackUL.U0, m_rtBackUL.V0, m_rtBackUL.U1, m_rtBackUL.V1,
										0xFFFFFFFF );
	pDrawPort->AddTexture( m_rcBack.Left + 7, m_rcBack.Top,
										m_rcBack.Right - 7, m_rcBack.Top + 7,
										m_rtBackUM.U0, m_rtBackUM.V0, m_rtBackUM.U1, m_rtBackUM.V1,
										0xFFFFFFFF );
	pDrawPort->AddTexture( m_rcBack.Right - 7, m_rcBack.Top,
										m_rcBack.Right, m_rcBack.Top + 7,
										m_rtBackUR.U0, m_rtBackUR.V0, m_rtBackUR.U1, m_rtBackUR.V1,
										0xFFFFFFFF );
	pDrawPort->AddTexture( m_rcBack.Left, m_rcBack.Top + 7,
										m_rcBack.Left + 7, m_rcBack.Bottom - 7,
										m_rtBackML.U0, m_rtBackML.V0, m_rtBackML.U1, m_rtBackML.V1,
										0xFFFFFFFF );
	pDrawPort->AddTexture( m_rcBack.Left + 7, m_rcBack.Top + 7,
										m_rcBack.Right - 7, m_rcBack.Bottom - 7,
										m_rtBackMM.U0, m_rtBackMM.V0, m_rtBackMM.U1, m_rtBackMM.V1,
										0xFFFFFFFF );
	pDrawPort->AddTexture( m_rcBack.Right - 7, m_rcBack.Top + 7,
										m_rcBack.Right, m_rcBack.Bottom - 7,
										m_rtBackMR.U0, m_rtBackMR.V0, m_rtBackMR.U1, m_rtBackMR.V1,
										0xFFFFFFFF );
	pDrawPort->AddTexture( m_rcBack.Left, m_rcBack.Bottom - 7,
										m_rcBack.Left + 7, m_rcBack.Bottom,
										m_rtBackLL.U0, m_rtBackLL.V0, m_rtBackLL.U1, m_rtBackLL.V1,
										0xFFFFFFFF );
	pDrawPort->AddTexture( m_rcBack.Left + 7, m_rcBack.Bottom - 7,
										m_rcBack.Right - 7, m_rcBack.Bottom,
										m_rtBackLM.U0, m_rtBackLM.V0, m_rtBackLM.U1, m_rtBackLM.V1,
										0xFFFFFFFF );
	pDrawPort->AddTexture( m_rcBack.Right - 7, m_rcBack.Bottom - 7,
										m_rcBack.Right, m_rcBack.Bottom,
										m_rtBackLR.U0, m_rtBackLR.V0, m_rtBackLR.U1, m_rtBackLR.V1,
										0xFFFFFFFF );

	// 원래 리스트 박스에 대한 내용 랜더
	CUIListBox::Render();
	
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:64,代码来源:UITrackPopup.cpp

示例13: 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();
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:94,代码来源:UIMixNew.cpp

示例14: SlotNumberRender

void CUIChildQuickSlot::SlotNumberRender()
{
	CUIManager* pUIManager = CUIManager::getSingleton();
	CDrawPort* pDrawPort = pUIManager->GetDrawPort();
	
	///< texture init
	pDrawPort->InitTextureData( m_ptdBaseTexture );
	if( *(m_bRotation[m_nCurSlot]) == 1 )
	{
		int	nX = m_nPosX;
		int	nY = m_nPosY;
		// 슬롯 번호 텍스춰
		nX = m_nPosX + 16;
		nY = m_nPosY + 4;
		switch(m_nID)
		{
		case UI_QUICKSLOT2:
			{
				pDrawPort->AddTexture(nX, nY, nX + 398, nY + 7
					, m_rtHorzSlotNumber.U0, m_rtHorzSlotNumber.V0
					, m_rtHorzSlotNumber.U1, m_rtHorzSlotNumber.V1
					, 0xFFFFFFFF);
				break;
			}
			
		case UI_QUICKSLOT3:
			{
				pDrawPort->AddTexture(nX, nY, nX + 406, nY + 7
					, m_rtHorzSlotNumber.U0, m_rtHorzSlotNumber.V0
					, m_rtHorzSlotNumber.U1, m_rtHorzSlotNumber.V1
					, 0xFFFFFFFF);
				break;
			}
		}
	}
	else if ( *(m_bRotation[m_nCurSlot]) == 0 )
	{
		int	nX = m_nPosX;
		int	nY = m_nPosY;
		// 슬롯 번호 텍스춰
		nX = m_nPosX + 4;
		nY = m_nPosY + 16;
		
		switch(m_nID)
		{
		case UI_QUICKSLOT2:
			{
				pDrawPort->AddTexture(nX, nY, nX + 13, nY + 392
					, m_rtVerSlotNumber.U0, m_rtVerSlotNumber.V0
					, m_rtVerSlotNumber.U1, m_rtVerSlotNumber.V1
					, 0xFFFFFFFF);
				break;
			}
			
		case UI_QUICKSLOT3:
			{
				pDrawPort->AddTexture(nX, nY, nX + 21, nY + 392
					, m_rtVerSlotNumber.U0, m_rtVerSlotNumber.V0
					, m_rtVerSlotNumber.U1, m_rtVerSlotNumber.V1
					, 0xFFFFFFFF);
				break;
			}
		}
	}
	
	pDrawPort->FlushRenderingQueue();
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:67,代码来源:UIChildQuickSlot.cpp

示例15: Render

// ----------------------------------------------------------------------------
// Name : Render()
// Desc :
// ----------------------------------------------------------------------------
void CUISelectServer::Render()
{
#ifdef AUTO_RESTART	// [2012/10/18 : Sora] 재시작시 자동 로그인
	extern BOOL g_bAutoRestart;
	if(g_bAutoRestart)
	{
		CUIManager::getSingleton()->RenderLoading();
		return;
	}
#endif

	CDrawPort* pDrawPort = CUIManager::getSingleton()->GetDrawPort();

	// Set select server texture
	pDrawPort->InitTextureData( m_ptdBaseTexture );

	// Add render regions
	// Background
	int	nY = m_nPosY + NOTICE_SIZE_Y + 29;
	int	nY2 = m_nPosY + m_nHeight - 39;
	pDrawPort->AddTexture( m_nPosX, m_nPosY, m_nPosX + m_nWidth, m_nPosY +28,
		m_rtBackTop.U0, m_rtBackTop.V0, m_rtBackTop.U1, m_rtBackTop.V1,
						0xFFFFFFFF );
	pDrawPort->AddTexture( m_nPosX, m_nPosY +28, m_nPosX + m_nWidth, nY,
		m_rtBackTop1.U0, m_rtBackTop1.V0, m_rtBackTop1.U1, m_rtBackTop1.V1,
						0xFFFFFFFF );
	// 공지 창
	pDrawPort->AddTexture( m_nPosX + 13 , m_nPosY +29, m_nPosX + m_nWidth - 13, nY -3,
						m_rtBackTop2.U0, m_rtBackTop2.V0, m_rtBackTop2.U1, m_rtBackTop2.V1,
						0xFFFFFFFF );
//	pDrawPort->AddTexture( m_nPosX + 18 , m_nPosY +29, m_nPosX + m_nWidth - 18, nY,
//						m_rtBackTop2.U0, m_rtBackTop2.V0, m_rtBackTop2.U1, m_rtBackTop2.V1,
//						0xFFFFFFFF );
	// 서버군, 서버 표시
	pDrawPort->AddTexture( m_nPosX, nY , m_nPosX + m_nWidth, nY + 29,
						m_rtBackMiddle0.U0, m_rtBackMiddle0.V0, m_rtBackMiddle0.U1, m_rtBackMiddle0.V1,
						0xFFFFFFFF );
	pDrawPort->AddTexture( m_nPosX, nY + 29 , m_nPosX + m_nWidth, nY2 ,
						m_rtBackMiddle.U0, m_rtBackMiddle.V0, m_rtBackMiddle.U1, m_rtBackMiddle.V1,
						0xFFFFFFFF );
	pDrawPort->AddTexture( m_nPosX, nY2, m_nPosX + m_nWidth, m_nPosY + m_nHeight,
						m_rtBackBottom.U0, m_rtBackBottom.V0, m_rtBackBottom.U1, m_rtBackBottom.V1,
						0xFFFFFFFF );

	// 추천 서버 이미지
	int count = m_vectorGroupInfo.size();

	for ( int i = 0; i < count; i++)
	{
		UBYTE Type = m_vectorGroupInfo[i].ubServerType;
		int nOrder = m_vectorGroupInfo[i].nOrder;
		FLOAT U0, U1, V0, V1;

		switch (Type)
		{
		case SERVER_TYPE_RECOMEND:
			U0 = m_rtRecommend.U0;
			U1 = m_rtRecommend.U1;
			V0 = m_rtRecommend.V0;
			V1 = m_rtRecommend.V1;
			break;
		case SERVER_TYPE_SPEEDUP:
			U0 = m_rtSpeed.U0;
			U1 = m_rtSpeed.U1;
			V0 = m_rtSpeed.V0;
			V1 = m_rtSpeed.V1;			
			break;
		default:
			continue;
		}
		
		pDrawPort->AddTexture( m_nPosX+RECOMMEND_POS_X , nY+4+(15* nOrder) , m_nPosX +RECOMMEND_POS_X+ 63, nY + 4 + (15*(nOrder+1)),
				U0, V0, U1, V1,	0xFFFFFFFF );	
	}
	
	// Ok button
	m_btnOK.Render();

	// Cancel button
	m_btnCancel.Render();

#ifdef AUTO_RESTART	// [2012/10/18 : Sora] 재시작시 자동 로그인
	m_btnExit.Render();
#endif

	// Server group list box
	m_lbServerGroup.Render();

	// Server list box
	m_lbServer.Render();

	// Render all elements
	pDrawPort->FlushRenderingQueue();

	// text render
	pDrawPort->PutTextEx( _S( 250, "서버 선택" ),
//.........这里部分代码省略.........
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:101,代码来源:UISelectServer.cpp


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