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


C++ CLTGUICtrl::GetHeight方法代码示例

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


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

示例1: Render

LTBOOL CFolderJoin::Render(HSURFACE hDestSurf)
{
	// There's no update pump, so we'll have to do it here...

	if (GetGameSpyClientMgr()->IsInitialized())
	{
		Update(hDestSurf);
	}
	else
	{
		UpdateDummyStatus(hDestSurf);
	}

	int xo = g_pInterfaceResMgr->GetXOffset();
	int yo = g_pInterfaceResMgr->GetYOffset();

	//Draw server bar
	DrawBar(hDestSurf,&rcServerRect);

	if (m_pServerList->GetLastDisplayedIndex() >= 0)
	{
		if (m_pServerList->GetLastDisplayedIndex() != nOldIndex)
		{
			if (m_hServersShown)
			{
				g_pLTClient->FreeString(m_hServersShown);
			}
	//(servers %d-%d)
			m_hServersShown = g_pLTClient->FormatString(IDS_SERVERS_SHOWN,m_pServerList->GetStartIndex()+1,m_pServerList->GetLastDisplayedIndex()+1);
			nOldIndex = m_pServerList->GetLastDisplayedIndex();
		}
		
		GetSmallFont()->Draw(m_hServersShown, hDestSurf, xo+rcServerRect.right-nIndent, yo+rcServerRect.top+nIndent, LTF_JUSTIFY_RIGHT, m_hNonSelectedColor);
	}

    CLTGUICtrl *pSortCtrl = LTNULL;
	switch (m_nServerSort)
	{
	case FSS_SORT_NAME:
		pSortCtrl = pServerNameCtrl;
		break;
	case FSS_SORT_PLAYERS:
		pSortCtrl = pServerPlayersCtrl;
		break;
	case FSS_SORT_PING:
		pSortCtrl = pServerPingCtrl;
		break;
	case FSS_SORT_GAME:
		pSortCtrl = pServerGameCtrl;
		break;
	case FSS_SORT_MAP:
		pSortCtrl = pServerMapCtrl;
		break;
	}
	if (pSortCtrl)
	{
        LTIntPt pos = pSortCtrl->GetPos();
		pos.x += xo;
		pos.y += yo;
        LTRect rect(pos.x, (pos.y + pSortCtrl->GetHeight()) - 5, pos.x + pSortCtrl->GetWidth(), (pos.y + pSortCtrl->GetHeight()) - 3);
        g_pLTClient->FillRect(hDestSurf,&rect,m_hSelectedColor);

	}

	//Draw player bar
	DrawBar(hDestSurf,&rcPlayerRect);

    pSortCtrl = LTNULL;
	switch (m_nPlayerSort)
	{
	case FSS_SORT_NAME:
		pSortCtrl = pPlayerNameCtrl;
		break;
	case FSS_SORT_FRAGS:
		pSortCtrl = pPlayerFragCtrl;
		break;
	case FSS_SORT_PING:
		pSortCtrl = pPlayerPingCtrl;
		break;
	}
	if (pSortCtrl)
	{
        LTIntPt pos = pSortCtrl->GetPos();
		pos.x += xo;
		pos.y += yo;
        LTRect rect(pos.x, (pos.y + pSortCtrl->GetHeight()) - 5, pos.x + pSortCtrl->GetWidth(), (pos.y + pSortCtrl->GetHeight()) - 3);
        g_pLTClient->FillRect(hDestSurf,&rect,m_hSelectedColor);

	}

	//Draw option bar
	DrawBar(hDestSurf,&rcOptionRect);

	//Draw option bar
	DrawBar(hDestSurf,&rcStatusRect);

	if (m_hStatus)
	{

		if (m_nState == FSS_IDLE)
//.........这里部分代码省略.........
开发者ID:germanocaldeira,项目名称:no-one-lives-forever,代码行数:101,代码来源:FolderJoin.cpp


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