summaryrefslogtreecommitdiff
path: root/serverbrowser/FavoriteGames.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /serverbrowser/FavoriteGames.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'serverbrowser/FavoriteGames.h')
-rw-r--r--serverbrowser/FavoriteGames.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/serverbrowser/FavoriteGames.h b/serverbrowser/FavoriteGames.h
new file mode 100644
index 0000000..8355005
--- /dev/null
+++ b/serverbrowser/FavoriteGames.h
@@ -0,0 +1,55 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================
+
+#ifndef FAVORITEGAMES_H
+#define FAVORITEGAMES_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+//-----------------------------------------------------------------------------
+// Purpose: Favorite games list
+//-----------------------------------------------------------------------------
+class CFavoriteGames : public CBaseGamesPage
+{
+ DECLARE_CLASS_SIMPLE( CFavoriteGames, CBaseGamesPage );
+
+public:
+ CFavoriteGames(vgui::Panel *parent);
+ ~CFavoriteGames();
+
+ // favorites list, loads/saves into keyvalues
+ void LoadFavoritesList();
+
+ // IGameList handlers
+ // returns true if the game list supports the specified ui elements
+ virtual bool SupportsItem(InterfaceItem_e item);
+
+ // called when the current refresh list is complete
+ virtual void RefreshComplete( HServerListRequest hReq, EMatchMakingServerResponse response );
+
+ // passed from main server browser window instead of messages
+ void OnConnectToGame();
+ void OnDisconnectFromGame( void );
+
+ void SetRefreshOnReload() { m_bRefreshOnListReload = true; }
+
+private:
+ // context menu message handlers
+ MESSAGE_FUNC_INT( OnOpenContextMenu, "OpenContextMenu", itemID );
+ MESSAGE_FUNC( OnRemoveFromFavorites, "RemoveFromFavorites" );
+ MESSAGE_FUNC( OnAddServerByName, "AddServerByName" );
+
+ void OnAddCurrentServer( void );
+
+ void OnCommand(const char *command);
+
+ bool m_bRefreshOnListReload;
+};
+
+
+#endif // FAVORITEGAMES_H