source-engine/serverbrowser/DialogAddServer.h

62 lines
1.6 KiB
C
Raw Permalink Normal View History

2020-04-22 16:56:21 +00:00
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================
#ifndef DIALOGADDSERVER_H
#define DIALOGADDSERVER_H
#ifdef _WIN32
#pragma once
#endif
class CAddServerGameList;
class IGameList;
//-----------------------------------------------------------------------------
// Purpose: Dialog which lets the user add a server by IP address
//-----------------------------------------------------------------------------
class CDialogAddServer : public vgui::Frame //, public ISteamMatchmakingPingResponse
2020-04-22 16:56:21 +00:00
{
DECLARE_CLASS_SIMPLE( CDialogAddServer, vgui::Frame );
friend class CAddServerGameList;
public:
CDialogAddServer(vgui::Panel *parent, IGameList *gameList);
~CDialogAddServer();
void ServerResponded( newgameserver_t &server );
2020-04-22 16:56:21 +00:00
void ServerFailedToRespond();
void ApplySchemeSettings( vgui::IScheme *pScheme );
MESSAGE_FUNC( OnItemSelected, "ItemSelected" );
private:
virtual void OnCommand(const char *command);
void OnOK();
void TestServers();
MESSAGE_FUNC( OnTextChanged, "TextChanged" );
virtual void FinishAddServer( newgameserver_t &pServer );
2020-04-22 16:56:21 +00:00
virtual bool AllowInvalidIPs( void ) { return false; }
protected:
IGameList *m_pGameList;
vgui::Button *m_pTestServersButton;
vgui::Button *m_pAddServerButton;
vgui::Button *m_pAddSelectedServerButton;
vgui::PropertySheet *m_pTabPanel;
vgui::TextEntry *m_pTextEntry;
vgui::ListPanel *m_pDiscoveredGames;
int m_OriginalHeight;
CUtlVector<newgameserver_t> m_Servers;
2020-04-22 16:56:21 +00:00
CUtlVector<HServerQuery> m_Queries;
};
#endif // DIALOGADDSERVER_H