Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef FAVORITEGAMES_H
  8. #define FAVORITEGAMES_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. //-----------------------------------------------------------------------------
  13. // Purpose: Favorite games list
  14. //-----------------------------------------------------------------------------
  15. class CFavoriteGames : public CBaseGamesPage
  16. {
  17. DECLARE_CLASS_SIMPLE( CFavoriteGames, CBaseGamesPage );
  18. public:
  19. CFavoriteGames(vgui::Panel *parent);
  20. ~CFavoriteGames();
  21. // favorites list, loads/saves into keyvalues
  22. void LoadFavoritesList();
  23. // IGameList handlers
  24. // returns true if the game list supports the specified ui elements
  25. virtual bool SupportsItem(InterfaceItem_e item);
  26. // called when the current refresh list is complete
  27. virtual void RefreshComplete( HServerListRequest hReq, EMatchMakingServerResponse response );
  28. // passed from main server browser window instead of messages
  29. void OnConnectToGame();
  30. void OnDisconnectFromGame( void );
  31. void SetRefreshOnReload() { m_bRefreshOnListReload = true; }
  32. private:
  33. // context menu message handlers
  34. MESSAGE_FUNC_INT( OnOpenContextMenu, "OpenContextMenu", itemID );
  35. MESSAGE_FUNC( OnRemoveFromFavorites, "RemoveFromFavorites" );
  36. MESSAGE_FUNC( OnAddServerByName, "AddServerByName" );
  37. void OnAddCurrentServer( void );
  38. void OnCommand(const char *command);
  39. bool m_bRefreshOnListReload;
  40. };
  41. #endif // FAVORITEGAMES_H