Пример #1
0
void _stdcall NameBoxRank(CGameOBJ* player){
	if(CanShowPVP()) return;

	String rank =  String("%1").arg(player->GetRank());
	SIZE nameSize = getFontTextExtent(GameDATA->m_hFONT[FONT_NORMAL_OUTLINE], player->GetName());
	SIZE rankSize = getFontTextExtent(gSmallOutlineFont, rank);

	RECT rt = { -1 - rankSize.cx, 0, nameSize.cx , nameSize.cy };
	::drawFont(gSmallOutlineFont, true, &rt, D3DCOLOR_ARGB(255, 255, 255, 0), DT_LEFT | DT_VCENTER , rank);
}
Пример #2
0
void CInfo::AddString( const char* pszTxt, DWORD color, HNODE hFont, UINT uFormat )
{
	if( pszTxt == NULL )
	{
		Clear();		
		return;
	}

	SIZE sizeString = getFontTextExtent( hFont, pszTxt );

	m_iHeight += 18;//sizeString.cy + 5;

	if( m_iWidth < sizeString.cx + 5)
		m_iWidth = sizeString.cx + 5;

	if( strlen( pszTxt ) > m_uMaxSizeString )
		m_uMaxSizeString = strlen( pszTxt );


	CTString String;
	String.SetColor( color );
	String.SetString( pszTxt );
	String.SetFormat( uFormat );
	String.SetFont( hFont );
	m_listString.push_back( String );	
	AdjustPosition();
}
Пример #3
0
SIZE CTFontImpl::GetFontTextExtent ( int iFont, const char* pszText )
{
	SIZE size = {0,0};
	if( iFont < 0 || iFont >= MAX_FONT )
		return size;
	if( pszText == NULL )
		return size;
	return getFontTextExtent( g_GameDATA.m_hFONT[ iFont ], pszText );
}
Пример #4
0
void CChatRoomDlg::Draw()
{
	if( !IsVision() ) return;
 	CTDialog::Draw();

	D3DXMATRIX mat;	
	D3DXMatrixTranslation( &mat, (float)m_sPosition.x, (float)m_sPosition.y,0.0f);
	::setTransformSprite( mat );
	//멤버 아이디 그리기


	const char* pszTitle = NULL;
	if(CChatRoom::GetInstance().GetTitle())
	{
		pszTitle = CChatRoom::GetInstance().GetTitle();
		if( pszTitle )
			::drawFont( g_GameDATA.m_hFONT[ FONT_NORMAL ], 
			true, 
			30,
			6,
			g_dwWHITE,  
			pszTitle );		
	}	

	if( m_iTab == TAB_MEMBER && !m_bMinimize)
	{
		std::list< CChatMember >::iterator iter;
		int i = 0;
		for( iter = m_Members.begin(); iter != m_Members.end(); ++iter,++i )
		{
			::drawFont( g_GameDATA.m_hFONT[ FONT_NORMAL ], 
				true, 
				c_ptDrawMemberName[i].x,
				c_ptDrawMemberName[i].y,
				g_dwWHITE,  
				iter->GetName() );		
		}
	}

#ifdef __PRIVATECHAT2
	if( strlen(CChatRoom::GetInstance().GetTitle()) && CChatRoom::GetInstance().GetPassword() )
	{		
		SIZE size = getFontTextExtent( g_GameDATA.m_hFONT[ FONT_NORMAL ], pszTitle );
		int iImageID    = CResourceMgr::GetInstance()->GetImageNID( UI_IMAGE_RES_ID, "CHATROOM_LOCK" );
		g_DrawImpl.Draw( m_sPosition.x+size.cx+4+30, m_sPosition.y+6, UI_IMAGE_RES_ID, iImageID );	
	}
#endif
}