@@ -59,6 +59,7 @@ void GetMostCommonQueryPorts( CUtlVector<uint16> &ports )
5959// -----------------------------------------------------------------------------
6060CServerBrowserDialog::CServerBrowserDialog (vgui::Panel *parent) : Frame(parent, " CServerBrowserDialog" )
6161{
62+ SetProportional ( NeedProportional () );
6263 s_InternetDlg = this ;
6364
6465 m_szGameName[0 ] = 0 ;
@@ -67,19 +68,25 @@ CServerBrowserDialog::CServerBrowserDialog(vgui::Panel *parent) : Frame(parent,
6768 m_pFilterData = NULL ;
6869 m_pFavorites = NULL ;
6970 m_pHistory = NULL ;
71+ m_pLanGames = NULL ;
7072
7173 LoadUserData ();
7274
7375 m_pInternetGames = new CInternetGames (this );
76+ /*
7477 m_pFavorites = new CFavoriteGames(this);
7578 m_pHistory = new CHistoryGames(this);
76-
77- // TODO(nillerusr): implement spectate games without steam
78- // m_pSpectateGames = new CSpectateGames(this);
79+ m_pSpectateGames = new CSpectateGames(this);
7980 m_pLanGames = new CLanGames(this);
81+ */
82+
83+ int w = 640 ; int h = 384 ;
8084
81- SetMinimumSize ( 640 , 384 );
82- SetSize ( 640 , 384 );
85+ w = IsProportional () ? vgui::scheme ()->GetProportionalScaledValue (w) : w;
86+ h = IsProportional () ? vgui::scheme ()->GetProportionalScaledValue (h) : h;
87+
88+ SetMinimumSize ( w, h );
89+ SetSize ( w, h );
8390
8491 m_pGameList = m_pInternetGames;
8592
@@ -89,10 +96,10 @@ CServerBrowserDialog::CServerBrowserDialog(vgui::Panel *parent) : Frame(parent,
8996 m_pTabPanel = new PropertySheet (this , " GameTabs" );
9097 m_pTabPanel->SetTabWidth (72 );
9198 m_pTabPanel->AddPage (m_pInternetGames, " #ServerBrowser_InternetTab" );
92- m_pTabPanel->AddPage (m_pFavorites, " #ServerBrowser_FavoritesTab" );
93- m_pTabPanel->AddPage (m_pHistory, " #ServerBrowser_HistoryTab" );
99+ // m_pTabPanel->AddPage(m_pFavorites, "#ServerBrowser_FavoritesTab");
100+ // m_pTabPanel->AddPage(m_pHistory, "#ServerBrowser_HistoryTab");
94101 // m_pTabPanel->AddPage(m_pSpectateGames, "#ServerBrowser_SpectateTab");
95- m_pTabPanel->AddPage (m_pLanGames, " #ServerBrowser_LanTab" );
102+ // m_pTabPanel->AddPage(m_pLanGames, "#ServerBrowser_LanTab");
96103
97104 m_pTabPanel->AddActionSignalTarget (this );
98105
@@ -109,7 +116,7 @@ CServerBrowserDialog::CServerBrowserDialog(vgui::Panel *parent) : Frame(parent,
109116 {
110117 m_pTabPanel->SetActivePage(m_pSpectateGames);
111118 }
112- else */
119+ else
113120 if (!Q_stricmp(gameList, "favorites"))
114121 {
115122 m_pTabPanel->SetActivePage(m_pFavorites);
@@ -122,7 +129,7 @@ CServerBrowserDialog::CServerBrowserDialog(vgui::Panel *parent) : Frame(parent,
122129 {
123130 m_pTabPanel->SetActivePage(m_pLanGames);
124131 }
125- else
132+ else*/
126133 {
127134 m_pTabPanel->SetActivePage (m_pInternetGames);
128135 }
@@ -160,7 +167,7 @@ void CServerBrowserDialog::Initialize()
160167// -----------------------------------------------------------------------------
161168// Purpose: returns a server in the list
162169// -----------------------------------------------------------------------------
163- gameserveritem_t *CServerBrowserDialog::GetServer ( unsigned int serverID )
170+ newgameserver_t *CServerBrowserDialog::GetServer ( unsigned int serverID )
164171{
165172 if (m_pGameList)
166173 return m_pGameList->GetServer ( serverID );
@@ -257,7 +264,7 @@ void CServerBrowserDialog::SaveUserData()
257264 {
258265 m_pSavedData->SetString("GameList", "spectate");
259266 }
260- else */
267+ else
261268 if (m_pGameList == m_pFavorites)
262269 {
263270 m_pSavedData->SetString("GameList", "favorites");
@@ -270,7 +277,7 @@ void CServerBrowserDialog::SaveUserData()
270277 {
271278 m_pSavedData->SetString("GameList", "history");
272279 }
273- else
280+ else*/
274281 {
275282 m_pSavedData->SetString (" GameList" , " internet" );
276283 }
@@ -363,9 +370,9 @@ CServerBrowserDialog *CServerBrowserDialog::GetInstance()
363370// -----------------------------------------------------------------------------
364371// Purpose: Adds a server to the list of favorites
365372// -----------------------------------------------------------------------------
366- void CServerBrowserDialog::AddServerToFavorites (gameserveritem_t &server)
373+ void CServerBrowserDialog::AddServerToFavorites (newgameserver_t &server)
367374{
368- if ( steamapicontext->SteamMatchmaking () )
375+ /* if ( steamapicontext->SteamMatchmaking() )
369376 {
370377 steamapicontext->SteamMatchmaking()->AddFavoriteGame(
371378 server.m_nAppID,
@@ -374,7 +381,7 @@ void CServerBrowserDialog::AddServerToFavorites(gameserveritem_t &server)
374381 server.m_NetAdr.GetQueryPort(),
375382 k_unFavoriteFlagFavorite,
376383 time( NULL ) );
377- }
384+ }*/
378385}
379386
380387// -----------------------------------------------------------------------------
@@ -527,10 +534,10 @@ void CServerBrowserDialog::OnActiveGameName( KeyValues *pKV )
527534void CServerBrowserDialog::ReloadFilterSettings ()
528535{
529536 m_pInternetGames->LoadFilterSettings ();
530- // m_pSpectateGames->LoadFilterSettings();
537+ /* m_pSpectateGames->LoadFilterSettings();
531538 m_pFavorites->LoadFilterSettings();
532539 m_pLanGames->LoadFilterSettings();
533- m_pHistory->LoadFilterSettings ();
540+ m_pHistory->LoadFilterSettings();*/
534541}
535542
536543// -----------------------------------------------------------------------------
@@ -572,7 +579,7 @@ void CServerBrowserDialog::OnConnectToGame( KeyValues *pMessageValues )
572579 }
573580
574581 // forward to favorites
575- m_pFavorites->OnConnectToGame ();
582+ // m_pFavorites->OnConnectToGame();
576583
577584 m_bCurrentlyConnected = true ;
578585
@@ -582,7 +589,7 @@ void CServerBrowserDialog::OnConnectToGame( KeyValues *pMessageValues )
582589 {
583590 iQuickListBitField |= ( 1 << 1 );
584591 }
585- /* if ( m_pSpectateGames && m_pSpectateGames->IsQuickListButtonChecked() )
592+ /* if ( m_pSpectateGames && m_pSpectateGames->IsQuickListButtonChecked() )
586593 {
587594 iQuickListBitField |= ( 1 << 2 );
588595 }*/
@@ -625,7 +632,7 @@ void CServerBrowserDialog::OnDisconnectFromGame( void )
625632 memset ( &m_CurrentConnection, 0 , sizeof (gameserveritem_t ) );
626633
627634 // forward to favorites
628- m_pFavorites->OnDisconnectFromGame ();
635+ // m_pFavorites->OnDisconnectFromGame();
629636}
630637
631638// -----------------------------------------------------------------------------
@@ -634,10 +641,10 @@ void CServerBrowserDialog::OnDisconnectFromGame( void )
634641void CServerBrowserDialog::OnLoadingStarted ( void )
635642{
636643 m_pInternetGames->OnLoadingStarted ();
637- // m_pSpectateGames->OnLoadingStarted();
644+ /* m_pSpectateGames->OnLoadingStarted();
638645 m_pFavorites->OnLoadingStarted();
639646 m_pLanGames->OnLoadingStarted();
640- m_pHistory->OnLoadingStarted ();
647+ m_pHistory->OnLoadingStarted();*/
641648}
642649
643650// -----------------------------------------------------------------------------
0 commit comments