summaryrefslogtreecommitdiff
path: root/serverbrowser/LanGames.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/LanGames.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'serverbrowser/LanGames.h')
-rw-r--r--serverbrowser/LanGames.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/serverbrowser/LanGames.h b/serverbrowser/LanGames.h
new file mode 100644
index 0000000..f1e3afa
--- /dev/null
+++ b/serverbrowser/LanGames.h
@@ -0,0 +1,81 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================
+
+#ifndef LANGAMES_H
+#define LANGAMES_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+class CLanBroadcastMsgHandler;
+
+//-----------------------------------------------------------------------------
+// Purpose: Favorite games list
+//-----------------------------------------------------------------------------
+class CLanGames : public CBaseGamesPage
+{
+ DECLARE_CLASS_SIMPLE( CLanGames, CBaseGamesPage );
+
+public:
+ CLanGames(vgui::Panel *parent, bool bAutoRefresh=true, const char *pCustomResFilename=NULL);
+ ~CLanGames();
+
+ // property page handlers
+ virtual void OnPageShow();
+
+ // IGameList handlers
+ // returns true if the game list supports the specified ui elements
+ virtual bool SupportsItem(InterfaceItem_e item);
+
+ // Control which button are visible.
+ void ManualShowButtons( bool bShowConnect, bool bShowRefreshAll, bool bShowFilter );
+
+ // If you pass NULL for pSpecificAddresses, it will broadcast on certain points.
+ // If you pass a non-null value, then it will send info queries directly to those ports.
+ void InternalGetNewServerList( CUtlVector<netadr_t> *pSpecificAddresses );
+
+ virtual void StartRefresh();
+
+ // stops current refresh/GetNewServerList()
+ virtual void StopRefresh();
+
+
+ // IServerRefreshResponse handlers
+ // called when a server response has timed out
+ virtual void ServerFailedToRespond( HServerListRequest hReq, int iServer );
+
+ // called when the current refresh list is complete
+ virtual void RefreshComplete( HServerListRequest hReq, EMatchMakingServerResponse response );
+
+ // Tell the game list what to put in there when there are no games found.
+ virtual void SetEmptyListText();
+
+private:
+ // vgui message handlers
+ virtual void OnTick();
+
+ // lan timeout checking
+ virtual void CheckRetryRequest();
+
+ // context menu message handlers
+ MESSAGE_FUNC_INT( OnOpenContextMenu, "OpenContextMenu", itemID );
+
+ // number of servers refreshed
+ int m_iServerRefreshCount;
+
+ // true if we're broadcasting for servers
+ bool m_bRequesting;
+
+ // time at which we last broadcasted
+ double m_fRequestTime;
+
+ bool m_bAutoRefresh;
+};
+
+
+
+#endif // LANGAMES_H