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


C++ FontManager::Draw方法代码示例

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


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

示例1: Render

void CGameOverState::Render( void )
{
	CSGD_Direct3D* pD3D = CSGD_Direct3D::GetInstance();
	FontManager* pFont = CGame::GetInstance()->GetFont();

	pD3D->Clear(WHITE);

	if(m_bWin)
	{
		if(m_nLevel_Finished == 4)
		{
			CSGD_TextureManager::GetInstance()->Draw(m_nWindBGid, 0, 0);
			pFont->Draw( ARNOVA , FINAL_LEVEL_WIN, 55, 250,
				1.3f, 1.3f, WHITE);
		}
		else
		{
			CSGD_TextureManager::GetInstance()->Draw(m_nWindBGid, 0, 0);
			pFont->Draw( ARNOVA , GAME_WIN, 55, 250,
				1.3f, 1.3f, WHITE);
		}
	}
	else
	{
		CSGD_TextureManager::GetInstance()->Draw(m_nLoseBGid, 0,0);
		pFont->Draw( ARNOVA , GAME_LOSE, 240, 100,
			1.5f,1.5f, WHITE);
	}

	pFont->Draw( ARNOVA , STATE_EXIT, 55, 500);


	CSGD_TextureManager::GetInstance()->Draw(m_nCursorImg, m_nCursorX, m_nCursorY);
}
开发者ID:kendellm,项目名称:Trials-of-Mastery,代码行数:34,代码来源:GameOverState.cpp

示例2: Render

void CPopUp_SPGain::Render()
{
	CCamera* Game_Camera = CCamera::GetInstance();
	FontManager* pFont = CGame::GetInstance()->GetFont();
	CSGD_TextureManager* pTM = CSGD_TextureManager::GetInstance();
	int x = int(GetPosX() - Game_Camera->GetPosX());
	int y = int(GetPosY() - Game_Camera->GetPosY());

	CPopUp::Render();
	AnimationManager::GetInstance()->Render(  (float)(x + 75), (float)(y + 101), 
		CEntity::IsFlipped(), *GetAnimInfo(), m_dwRenderColor);

	pFont->Draw(
				  CHINESE_TAKEAWAY, L"Attack the enemy \n to build your special meter",
				  x+48, y+44, 0.4f, 0.4f, BLACK
			   );

}
开发者ID:kendellm,项目名称:Trials-of-Mastery,代码行数:18,代码来源:PopUp_SPGain.cpp

示例3: Display

void GameInfo::Display( int x, int y )
{
    CSGD_Direct3D* pD3D = CSGD_Direct3D::GetInstance();
    FontManager* pFont = CGame::GetInstance()->GetFont();
    CSGD_TextureManager* pTM = CSGD_TextureManager::GetInstance();

    pTM->Draw( m_nMenuArtid, x, y);

    TOSTRINGSTREAM wss;

    wss.str(L"");
    wss << "Stage 0" << m_nLevel;
    pFont->Draw( CHINESE_TAKEAWAY , wss.str().c_str(), x + 43, y+36, 0.5f,0.5f);

    wss.str(L"");
    wss << "EXP: " << m_nExpPts;
    pFont->Draw( CHINESE_TAKEAWAY , wss.str().c_str(), x + 201, y+36, 0.5f,0.5f);


    wss.str(L"");
    wss << m_nFireSpl;
    pFont->Draw( CHINESE_TAKEAWAY ,  wss.str().c_str(), x + 83, y + 78, 0.5f,0.5f);

    wss.str(L"");
    wss << m_nWindSpl;
    pFont->Draw( CHINESE_TAKEAWAY ,  wss.str().c_str(), x + 160, y + 78, 0.5f,0.5f);

    wss.str(L"");
    wss << m_nIceSpl;
    pFont->Draw( CHINESE_TAKEAWAY ,  wss.str().c_str(), x + 237, y + 78, 0.5f,0.5f);

    wss.str(L"");
    wss << m_nEarthSpl;
    pFont->Draw( CHINESE_TAKEAWAY ,  wss.str().c_str(), x + 304, y + 78,0.5f,0.5f);

}
开发者ID:kendellm,项目名称:Trials-of-Mastery,代码行数:36,代码来源:GameInfo.cpp


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