int CFolderJoin::AddPlayerCtrl(CGameSpyPlayer* pPlr)
{
	CLTGUIFont *pFont = GetSmallFont();
    CGroupCtrl *pGroup = CreateGroup(nPlayerGroupWidth,pFont->GetHeight(),LTNULL);
    LTIntPt pos(0,0);
    pGroup->SetParam1((uint32)pPlr);

	char sTemp[128] = "";
	strcpy(sTemp, pPlr->GetName());
    CStaticTextCtrl *pCtrl = CreateStaticTextItem(sTemp,LTNULL,LTNULL,nNameWidth,pFont->GetHeight(),LTTRUE,pFont);
    pGroup->AddControl(pCtrl,pos,LTTRUE);
	pos.x += nNameWidth+nGap;

	sprintf(sTemp, "%i", pPlr->GetFrags());
    pCtrl = CreateStaticTextItem(sTemp,LTNULL,LTNULL,nScoreWidth,pFont->GetHeight(),LTTRUE,pFont);
    pGroup->AddControl(pCtrl,pos,LTTRUE);
	pos.x += nScoreWidth+nGap;

	if (pPlr->GetPing() >= 9999) strcpy(sTemp, "???");
	else sprintf(sTemp,"%d",pPlr->GetPing());
    pCtrl = CreateStaticTextItem(sTemp,LTNULL,LTNULL,nPingWidth,pFont->GetHeight(),LTTRUE,pFont);
    pGroup->AddControl(pCtrl,pos,LTTRUE);

	pGroup->Enable(LTFALSE);
	return m_pPlayerList->AddControl(pGroup);

}
int CFolderJoin::AddOptionCtrl(int nID, char *pszValue)
{
	CLTGUIFont *pFont = GetSmallFont();
    CGroupCtrl *pGroup = CreateGroup(nOptionGroupWidth,pFont->GetHeight(),LTNULL);
    LTIntPt pos(0,0);

    CStaticTextCtrl *pCtrl = CreateStaticTextItem(nID,LTNULL,LTNULL,nOptionWidth,pFont->GetHeight(),LTTRUE,pFont);
    pGroup->AddControl(pCtrl,pos,LTTRUE);
	pos.x += nOptionWidth+nGap;

    pCtrl = CreateStaticTextItem(pszValue,LTNULL,LTNULL,(nOptionGroupWidth-pos.x),pFont->GetHeight(),LTTRUE,pFont);
    pGroup->AddControl(pCtrl,pos,LTTRUE);

	return m_pOptionList->AddControl(pGroup);
}
Пример #3
0
void CInterfaceTimer::Draw(HSURFACE hScreen)
{
	if (!hScreen) return;

	// Get the screen size

    uint32 nWidth = 0;
    uint32 nHeight = 0;
    g_pLTClient->GetSurfaceDims(hScreen, &nWidth, &nHeight);

	// Update/Draw the timer if there is anytime left...

	if (m_fTime > 0.0f)
	{
		int x = nWidth/2;
		int y = 40;

		// Draw the string to the surface...

		int nMinutes = int(m_fTime) / 60;
		int nSeconds = m_fTime > 60.0 ? int(m_fTime) % 60 : int(m_fTime);

		char aBuffer[50];
		char aMinutes[20];
		char aSeconds[20];
		BuildTimeString(aMinutes, nMinutes);
		BuildTimeString(aSeconds, nSeconds);

		sprintf(aBuffer, "%s:%s", aMinutes, aSeconds);
        HSTRING hStr = g_pLTClient->CreateString(aBuffer);

		CLTGUIFont* pFont = g_pInterfaceResMgr->GetTitleFont();
        LTIntPt size = pFont->GetTextExtents(hStr);
		pFont->Draw(hStr, hScreen, x - (size.x/2)+2, y - (size.y/2)+2, LTF_JUSTIFY_LEFT,kBlack);
		pFont->Draw(hStr, hScreen, x - (size.x/2), y - (size.y/2), LTF_JUSTIFY_LEFT,kWhite);

        g_pLTClient->FreeString(hStr);
	}

	if (!m_bPause)
		m_fTime -= g_pGameClientShell->GetFrameTime();
}
int CFolderJoin::AddServerCtrl(CGameSpyServer* pGame)
{
	CLTGUIFont *pFont = GetSmallFont();
    CGroupCtrl *pGroup = CreateGroup(nServerGroupWidth,pFont->GetHeight(),LTNULL);
    LTIntPt pos(0,0);
    pGroup->SetParam1((uint32)pGame->GetHandle());

	char sTemp[128] = "";
	sprintf(sTemp,"%s",pGame->GetName());
    CStaticTextCtrl *pCtrl = CreateStaticTextItem(sTemp,CMD_SELECT_SERVER,LTNULL,nGameWidth,pFont->GetHeight(),LTFALSE,pFont);
    pGroup->AddControl(pCtrl,pos,LTTRUE);
	pos.x += nGameWidth+nGap;

	sprintf(sTemp,"%d/%d",pGame->GetNumPlayers(), pGame->GetMaxPlayers());
    pCtrl = CreateStaticTextItem(sTemp,LTNULL,LTNULL,nPlayerWidth,pFont->GetHeight(),LTFALSE,pFont);
    pGroup->AddControl(pCtrl,pos,LTTRUE);
	pos.x += nPlayerWidth+nGap;

	if (pGame->GetPing() >= 9999) strcpy(sTemp, "???");
	else sprintf(sTemp,"%d",pGame->GetPing());
    pCtrl = CreateStaticTextItem(sTemp,LTNULL,LTNULL,nPingWidth,pFont->GetHeight(),LTFALSE,pFont);
    pGroup->AddControl(pCtrl,pos,LTTRUE);
	pos.x += nPingWidth+nGap;

	sprintf(sTemp,"%s",pGame->GetGameType());
    pCtrl = CreateStaticTextItem(sTemp,LTNULL,LTNULL,nTypeWidth,pFont->GetHeight(),LTFALSE,pFont);
    pGroup->AddControl(pCtrl,pos,LTTRUE);
	pos.x += nTypeWidth+nGap;

	sprintf(sTemp,"%s",pGame->GetMap());
    pCtrl = CreateStaticTextItem(sTemp,LTNULL,LTNULL,nMapWidth,pFont->GetHeight(),LTFALSE,pFont);
    pGroup->AddControl(pCtrl,pos,LTTRUE);

	return m_pServerList->AddControl(pGroup);
}
void CClientInfoMgr::Draw (LTBOOL bDrawSingleFragCount, LTBOOL bDrawAllFragCounts, HSURFACE hDestSurf)
{
	if (!m_pClients || (!bDrawSingleFragCount && !bDrawAllFragCounts)) return;

	// make sure we're in a network game
	if (g_pGameClientShell->GetGameType() == SINGLE) return;

	HSURFACE hScreen = hDestSurf;
	if (!hScreen)
		hScreen = g_pLTClient->GetScreenSurface();
	if (!hScreen)
		return;

    uint32 nScreenWidth = 0;
    uint32 nScreenHeight = 0;
	g_pLTClient->GetSurfaceDims (hScreen, &nScreenWidth, &nScreenHeight);

	CLTGUIFont *pFont = g_pInterfaceResMgr->GetMsgForeFont();

	// should we draw our frag count?
	if (bDrawSingleFragCount)
	{
		
		if (m_hTeamScore)
		{
			pFont->Draw(m_hTeamScore,hScreen,nScreenWidth-m_TeamPos.x+1,m_TeamPos.y+1,LTF_JUSTIFY_LEFT);	
			pFont->Draw(m_hTeamScore,hScreen,nScreenWidth-m_TeamPos.x,m_TeamPos.y,LTF_JUSTIFY_LEFT,m_hTeamColor);	
		}
		if (m_hOppScore)
		{
			pFont->Draw(m_hOppScore,hScreen,nScreenWidth-m_OppPos.x+1,m_OppPos.y+1,LTF_JUSTIFY_LEFT);	
			pFont->Draw(m_hOppScore,hScreen,nScreenWidth-m_OppPos.x,m_OppPos.y,LTF_JUSTIFY_LEFT,m_hOppColor);	
		}
		if (m_hFragString)
		{
			pFont->Draw(m_hFragString,hScreen,nScreenWidth-m_FragPos.x+1,m_FragPos.y+1,LTF_JUSTIFY_LEFT);	
			pFont->Draw(m_hFragString,hScreen,nScreenWidth-m_FragPos.x,m_FragPos.y,LTF_JUSTIFY_LEFT,m_hTeamColor);	
		}
	}

	// should we draw all the frag counts?

	if (bDrawAllFragCounts)
	{
		int nHeight[2] = {0,0};
		int nClients = 0;
		int nTeams[2] = {0,0};
		int nLineHeight = pFont->GetHeight() + VERT_SPACING;

		int nMaxHeight = nScreenHeight - 16;

		CLIENT_INFO* pClient = m_pClients;
		while (pClient)
		{
			if (pClient->team == 2)
			{
				nHeight[1] += nLineHeight;
				nTeams[1]++;
			}
			else
			{
				nHeight[0] += nLineHeight;
				nTeams[0]++;
			}
			++nClients;
			pClient = pClient->pNext;
		}

		int nTotalHeight = Max(nHeight[0],nHeight[1]);
		if (nTotalHeight > nMaxHeight)
			nTotalHeight = nMaxHeight;

		int nY = ((int)nScreenHeight - nTotalHeight) / 2;
		if (nY < 0) nY = 0;
		int nY2 = nY;

		int nX  = 64;
		int nX2 = 32 + (int)nScreenWidth / 2;
		int nTab = ((int)nScreenWidth / 2) - 32;
		int nTab2 = (int)nScreenWidth - 64;

		
		if (g_pGameClientShell->GetGameType() == COOPERATIVE_ASSAULT)
		{
			LTRect rcBanner(nX-8,nY-8,nTab+8,nY+nTotalHeight);
			if (m_Teams[0].hBanner)
				g_pLTClient->ScaleSurfaceToSurface(hScreen, m_Teams[0].hBanner, &rcBanner, LTNULL);

			rcBanner = LTRect(nX2-8,nY-8,nTab2+8,nY+nTotalHeight);
			if (m_Teams[1].hBanner)
				g_pLTClient->ScaleSurfaceToSurface(hScreen, m_Teams[1].hBanner, &rcBanner, LTNULL);
		}

        LTBOOL filled[2] = {LTFALSE, LTFALSE};
		
		pClient = m_pClients;
		while (pClient)
		{
			char str[64];
			sprintf(str,"%d (%d)",pClient->nFrags,(uint32)pClient->m_Ping);
			LTBOOL bIsLocal = (pClient->nID == m_nLocalID);
			HLTCOLOR hColor = kWhite;
			if (bIsLocal)
			{
				hColor = SETRGB(255,255,0);
			}
			
			if (pClient->team == 2)
			{
				if (!filled[1])
				{
					// Ok.. draw.
					pFont->Draw(pClient->hstrName,hScreen,nX2+1,nY2+1,LTF_JUSTIFY_LEFT);	
					pFont->Draw(pClient->hstrName,hScreen,nX2,nY2,LTF_JUSTIFY_LEFT,hColor);
					pFont->Draw(str,hScreen,nTab2+1,nY2+1,LTF_JUSTIFY_RIGHT);	
					pFont->Draw(str,hScreen,nTab2,nY2,LTF_JUSTIFY_RIGHT,hColor);


					nY2 += nLineHeight;
					if (nY2 + nLineHeight > (int)nMaxHeight)
					{
                        filled[1] = LTTRUE;
					}

				}
			}
			else if (!filled[0])
			{
				// Ok.. draw.
				pFont->Draw(pClient->hstrName,hScreen,nX+1,nY+1,LTF_JUSTIFY_LEFT);	
				pFont->Draw(str,hScreen,nTab+1,nY+1,LTF_JUSTIFY_RIGHT);	
				pFont->Draw(pClient->hstrName,hScreen,nX,nY,LTF_JUSTIFY_LEFT,hColor);
				pFont->Draw(str,hScreen,nTab,nY,LTF_JUSTIFY_RIGHT,hColor);

				nY += nLineHeight;
				if (nY + nLineHeight > (int)nMaxHeight)
				{
                    filled[0] = LTTRUE;
				}

			}

			pClient = pClient->pNext;

		}
	}
}
// Build the folder
LTBOOL CFolderHostLevels::Build()
{
	if (!g_vtNetGameType.IsInitted())
	{
        g_vtNetGameType.Init(g_pLTClient,"NetGameType",LTNULL,(float)m_nGameType);
	}

	rcAvailRect = g_pLayoutMgr->GetFolderCustomRect((eFolderID)m_nFolderID,"AvailLevelsRect");
	rcSelRect = g_pLayoutMgr->GetFolderCustomRect((eFolderID)m_nFolderID,"SelLevelsRect");
	rcCommandRect = g_pLayoutMgr->GetFolderCustomRect((eFolderID)m_nFolderID,"CommandRect");
	nIndent = g_pLayoutMgr->GetFolderCustomInt((eFolderID)m_nFolderID,"TextIndent");
	nArrowWidth = g_pLayoutMgr->GetFolderCustomInt((eFolderID)m_nFolderID,"ArrowWidth");

	CreateTitle(IDS_TITLE_HOST_LEVELS);

	//Add Avail Levels List
    LTIntPt pos(rcAvailRect.left + nIndent,rcAvailRect.top);
	CLTGUIFont *pFont = GetLargeFont();
	nBarHeight = pFont->GetHeight();

    CStaticTextCtrl *pCtrl = CreateStaticTextItem(IDS_HOST_AVAIL_LEVELS, LTNULL, LTNULL,0,0, LTTRUE, pFont);
    AddFixedControl(pCtrl,pos,LTFALSE);
    pCtrl->Enable(LTFALSE);

	pFont = GetSmallFont();
	pos.x = rcAvailRect.left + nIndent;
	pos.y = rcAvailRect.top + nBarHeight;
	int nListHeight = (rcAvailRect.bottom - rcAvailRect.top) - nBarHeight;
	int nListWidth = (rcAvailRect.right - rcAvailRect.left) - nArrowWidth;

	m_pAvailLevels = debug_new(CListCtrl);
    m_pAvailLevels->Create(nListHeight, LTTRUE, nListWidth);
	m_pAvailLevels->SetParam1(nListWidth);
	m_pAvailLevels->SetItemSpacing(0);
    m_pAvailLevels->EnableMouseMoveSelect(LTTRUE);
	m_pAvailLevels->SetHelpID(IDS_HELP_AVAIL_LEVELS);
    AddFixedControl(m_pAvailLevels,pos,LTTRUE);

	//Add Selected Levels List
    pos = LTIntPt(rcSelRect.left + nIndent,rcSelRect.top);
	pFont = GetLargeFont();

    pCtrl = CreateStaticTextItem(IDS_HOST_SELECTED_LEVELS, LTNULL, LTNULL,0,0,LTTRUE, pFont);
    AddFixedControl(pCtrl,pos,LTFALSE);
    pCtrl->Enable(LTFALSE);

	pFont = GetSmallFont();
	pos.x = rcSelRect.left + nIndent;
	pos.y = rcSelRect.top + nBarHeight;
	nListHeight = (rcSelRect.bottom - rcSelRect.top) - nBarHeight;
	nListWidth = (rcSelRect.right - rcSelRect.left) - nArrowWidth;

	m_pSelLevels = debug_new(CListCtrl);
    m_pSelLevels->Create(nListHeight, LTTRUE, nListWidth);
	m_pSelLevels->SetParam1(nListWidth);
	m_pSelLevels->SetItemSpacing(0);
    m_pSelLevels->EnableMouseMoveSelect(LTTRUE);
	m_pSelLevels->SetHelpID(IDS_HELP_SEL_LEVELS);
    AddFixedControl(m_pSelLevels,pos,LTTRUE);

	//Add Commands
    pos = LTIntPt(rcCommandRect.left + nIndent,rcCommandRect.top);
	nListWidth = rcCommandRect.right - rcCommandRect.left;
	pFont = GetLargeFont();


	m_pAddAll = CreateStaticTextItem(IDS_HOST_ADD_ALL, CMD_ADD_ALL, IDS_HELP_ADD_ALL, nListWidth);
    AddFixedControl(m_pAddAll,pos,LTTRUE);
	pos.y += (m_nItemSpacing + pFont->GetHeight());

	m_pAddLevel = CreateStaticTextItem(IDS_HOST_ADD_LEVEL, CMD_ADD_LEVEL, IDS_HELP_ADD_LEVEL, nListWidth);
    AddFixedControl(m_pAddLevel,pos,LTTRUE);
	pos.y += (m_nItemSpacing + pFont->GetHeight());

	m_pRemoveLevel = CreateStaticTextItem(IDS_HOST_REMOVE_LEVEL, CMD_REMOVE_LEVEL, IDS_HELP_REM_LEVEL, nListWidth);
    AddFixedControl(m_pRemoveLevel,pos,LTTRUE);
	pos.y += (m_nItemSpacing + pFont->GetHeight());

	m_pRemoveAll = CreateStaticTextItem(IDS_HOST_REMOVE_ALL, CMD_REMOVE_ALL, IDS_HELP_REM_ALL, nListWidth);
    AddFixedControl(m_pRemoveAll,pos,LTTRUE);
	pos.y += (m_nItemSpacing + pFont->GetHeight());



 	// Make sure to call the base class
	if (!CBaseFolder::Build()) return LTFALSE;

	UseBack(LTTRUE,LTTRUE);

	return LTTRUE;

}
// Build the folder
LTBOOL CFolderJoin::Build()
{
	rcServerRect = g_pLayoutMgr->GetFolderCustomRect((eFolderID)m_nFolderID,"ServerRect");
	rcPlayerRect = g_pLayoutMgr->GetFolderCustomRect((eFolderID)m_nFolderID,"PlayerRect");
	rcOptionRect = g_pLayoutMgr->GetFolderCustomRect((eFolderID)m_nFolderID,"OptionRect");
	rcStatusRect = g_pLayoutMgr->GetFolderCustomRect((eFolderID)m_nFolderID,"StatusRect");
	rcCommandRect = g_pLayoutMgr->GetFolderCustomRect((eFolderID)m_nFolderID,"CommandRect");

	nGap = g_pLayoutMgr->GetFolderCustomInt((eFolderID)m_nFolderID,"ColumnGap");
	nIndent = g_pLayoutMgr->GetFolderCustomInt((eFolderID)m_nFolderID,"TextIndent");

	nGameWidth = g_pLayoutMgr->GetFolderCustomInt((eFolderID)m_nFolderID,"GameWidth");
	nPlayerWidth = g_pLayoutMgr->GetFolderCustomInt((eFolderID)m_nFolderID,"PlayerWidth");
	nPingWidth = g_pLayoutMgr->GetFolderCustomInt((eFolderID)m_nFolderID,"PingWidth");
	nTypeWidth = g_pLayoutMgr->GetFolderCustomInt((eFolderID)m_nFolderID,"TypeWidth");
	nMapWidth = g_pLayoutMgr->GetFolderCustomInt((eFolderID)m_nFolderID,"MapWidth");
	nNameWidth = g_pLayoutMgr->GetFolderCustomInt((eFolderID)m_nFolderID,"NameWidth");
	nScoreWidth = g_pLayoutMgr->GetFolderCustomInt((eFolderID)m_nFolderID,"ScoreWidth");
	nOptionWidth = g_pLayoutMgr->GetFolderCustomInt((eFolderID)m_nFolderID,"OptionWidth");

	nArrowWidth = g_pLayoutMgr->GetFolderCustomInt((eFolderID)m_nFolderID,"ArrowWidth");

	CreateTitle(IDS_TITLE_JOIN);

	//Add Server Header
    LTIntPt pos(rcServerRect.left + nIndent,rcServerRect.top);
	CLTGUIFont *pFont = GetMediumFont();
	nBarHeight = pFont->GetHeight();


	CStaticTextCtrl *pCtrl = CreateStaticTextItem(IDS_SERVER_NAME,CMD_SORT_SERV_NAME,IDS_HELP_SERVER_NAME,nGameWidth,pFont->GetHeight(),LTFALSE,pFont);
    AddFixedControl(pCtrl,pos,LTTRUE);
	pServerNameCtrl = pCtrl;
	pos.x += nGameWidth+nGap;

	pCtrl = CreateStaticTextItem(IDS_SERVER_PLAYERS,CMD_SORT_SERV_PLAYERS,IDS_HELP_SERVER_PLAYERS,nPlayerWidth,pFont->GetHeight(),LTFALSE,pFont);
    AddFixedControl(pCtrl,pos,LTTRUE);
	pServerPlayersCtrl = pCtrl;
	pos.x += nPlayerWidth+nGap;

	pCtrl = CreateStaticTextItem(IDS_SERVER_PING,CMD_SORT_SERV_PING,IDS_HELP_SERVER_PING,nPingWidth,pFont->GetHeight(),LTFALSE,pFont);
    AddFixedControl(pCtrl,pos,LTTRUE);
	pServerPingCtrl = pCtrl;
	pos.x += nPingWidth+nGap;

	pFont = GetMediumFont();
    pCtrl = CreateStaticTextItem(IDS_SERVER_GAME,CMD_SORT_SERV_GAME,LTNULL,nTypeWidth,pFont->GetHeight(),LTFALSE,pFont);
    AddFixedControl(pCtrl,pos,LTFALSE);
	pServerGameCtrl = pCtrl;
	pos.x += nTypeWidth+nGap;

    pCtrl = CreateStaticTextItem(IDS_SERVER_MAP,CMD_SORT_SERV_MAP,LTNULL,nMapWidth,pFont->GetHeight(),LTFALSE,pFont);
	pServerMapCtrl = pCtrl;
    AddFixedControl(pCtrl,pos,LTFALSE);

	//Add Server List
	pos.x = rcServerRect.left + nIndent;
	pos.y = rcServerRect.top + nBarHeight;
	int nListHeight = (rcServerRect.bottom - rcServerRect.top) - nBarHeight;
	nListHeight += 19;	// [blg] tweak

	nServerGroupWidth = (rcServerRect.right - rcServerRect.left) - nArrowWidth;
	m_pServerList = debug_new(CListCtrl);
    m_pServerList->Create(nListHeight, LTTRUE, nServerGroupWidth);
	m_pServerList->SetItemSpacing(0);
    m_pServerList->EnableMouseClickSelect(LTTRUE);
    AddFixedControl(m_pServerList,pos,LTTRUE);

	//Add Player Header
	pFont = GetMediumFont();
    pos = LTIntPt(rcPlayerRect.left + nIndent,rcPlayerRect.top);

	pCtrl = CreateStaticTextItem(IDS_JOIN_PLAYER_NAME,CMD_SORT_PLYR_NAME,IDS_HELP_SORT_PLYR_NAME,nNameWidth,pFont->GetHeight(),LTFALSE,pFont);
    AddFixedControl(pCtrl,pos,LTTRUE);
	pPlayerNameCtrl = pCtrl;
	pos.x += nNameWidth+nGap;

	pCtrl = CreateStaticTextItem(IDS_JOIN_PLAYER_SCORE,CMD_SORT_PLYR_SCORE,IDS_HELP_SORT_PLYR_SCORE,nScoreWidth,pFont->GetHeight(),LTFALSE,pFont);
    AddFixedControl(pCtrl,pos,LTTRUE);
	pPlayerFragCtrl = pCtrl;
	pos.x += nScoreWidth+nGap;

	pCtrl = CreateStaticTextItem(IDS_SERVER_PING,CMD_SORT_PLYR_PING,IDS_HELP_SORT_PLYR_PING,nPingWidth,pFont->GetHeight(),LTFALSE,pFont);
	pPlayerPingCtrl = pCtrl;
    AddFixedControl(pCtrl,pos,LTTRUE);

	//Add PlayerList Here
	pos.x = rcPlayerRect.left + nIndent;
	pos.y = rcPlayerRect.top + nBarHeight;
	nListHeight = (rcPlayerRect.bottom - rcPlayerRect.top) - nBarHeight;
	nListHeight += 24;	// [blg] tweak
	nPlayerGroupWidth = (rcPlayerRect.right - rcPlayerRect.left) - nArrowWidth;
	m_pPlayerList = debug_new(CListCtrl);
    m_pPlayerList->Create(nListHeight, LTTRUE, nPlayerGroupWidth);
	m_pPlayerList->SetItemSpacing(0);
//    m_pPlayerList->Enable(LTFALSE);
    AddFixedControl(m_pPlayerList,pos,LTTRUE);


	//Add Commands
	pFont = GetMediumFont();
	pos.x = rcCommandRect.left;
	pos.y = rcCommandRect.top;
	m_pRefresh = CreateTextItem(IDS_SERVER_REFRESH,CMD_REFRESH_SERVERS,IDS_HELP_REFRESH,LTFALSE,pFont);
    AddFixedControl(m_pRefresh,pos,LTTRUE);
	pos.y += pFont->GetHeight();

	// [blg] re-ping is not support in the GameSpy SDK
	//m_pRePing = CreateTextItem(IDS_SERVER_REPING,CMD_REPING_SERVERS,IDS_HELP_REPING,LTFALSE,pFont);
    //AddFixedControl(m_pRePing,pos,LTTRUE);
	//pos.y += pFont->GetHeight();

	m_pVersionFilter = CreateTextItem(IDS_ALL_VERSIONS,CMD_VERSION_FILTER,IDS_HELP_VERSION_FILTER,LTFALSE,pFont,&m_nVersionFilter);
	m_pVersionFilter->AddString(IDS_CURRENT_VERSION);
    AddFixedControl(m_pVersionFilter,pos,LTTRUE);
	pos.y += pFont->GetHeight();

	m_pGameFilter = CreateTextItem(anGameFilterID[0],CMD_GAME_FILTER,IDS_HELP_GAME_FILTER,LTFALSE,pFont,&m_nGameFilter);
	m_pGameFilter->AddString(anGameFilterID[1]);
	m_pGameFilter->AddString(anGameFilterID[2]);
    AddFixedControl(m_pGameFilter,pos,LTTRUE);
	pos.y += pFont->GetHeight();

	m_pPopFilter = CreateTextItem(anPopFilterID[0],CMD_POP_FILTER,IDS_HELP_POP_FILTER,LTFALSE,pFont,&m_nPopFilter);
	m_pPopFilter->AddString(anPopFilterID[1]);
	m_pPopFilter->AddString(anPopFilterID[2]);
	m_pPopFilter->AddString(anPopFilterID[3]);
    AddFixedControl(m_pPopFilter,pos,LTTRUE);
	pos.y += pFont->GetHeight();

	m_pJoin = CreateTextItem(IDS_JOIN_GAME,CMD_JOIN,IDS_HELP_JOIN_GAME,LTFALSE,pFont);
    m_pJoin->Enable(LTFALSE);
    AddFixedControl(m_pJoin,pos,LTFALSE);
	pos.y += pFont->GetHeight();


	//Add Option Header
	pFont = GetMediumFont();
    pos = LTIntPt(rcOptionRect.left + nIndent,rcOptionRect.top);

    pCtrl = CreateStaticTextItem(IDS_OPTION_NAME,LTNULL,LTNULL,nNameWidth,pFont->GetHeight(),LTTRUE,pFont);
    pCtrl->Enable(LTFALSE);
    AddFixedControl(pCtrl,pos,LTFALSE);
	pos.x += nOptionWidth+nGap;

    pCtrl = CreateStaticTextItem(IDS_OPTION_VALUE,LTNULL,LTNULL,nScoreWidth,pFont->GetHeight(),LTTRUE,pFont);
    pCtrl->Enable(LTFALSE);
    AddFixedControl(pCtrl,pos,LTFALSE);

	//Add OptionList Here
	pos.x = rcOptionRect.left + nIndent;
	pos.y = rcOptionRect.top + nBarHeight;
	nListHeight = (rcOptionRect.bottom - rcOptionRect.top) - nBarHeight;
	nOptionGroupWidth = (rcOptionRect.right - rcOptionRect.left) - nArrowWidth;
	m_pOptionList = debug_new(CListCtrl);
    m_pOptionList->Create(nListHeight, LTTRUE, nOptionGroupWidth);
	m_pOptionList->SetItemSpacing(0);
//    m_pOptionList->Enable(LTFALSE);
    AddFixedControl(m_pOptionList,pos,LTFALSE);

	rcStatusRect.top = rcStatusRect.bottom - nBarHeight;

    bFrameDelay = LTTRUE;

	// Make sure to call the base class
	return CBaseFolder::Build();
}