summaryrefslogtreecommitdiff
path: root/game/client/tf/vgui/tf_match_join_handlers.h
blob: efe0153d33b82f57c4b58526f35b49194f8e86d5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================//

#ifndef TF_MATCH_JOIN_HANDLERS_H
#define TF_MATCH_JOIN_HANDLERS_H
#ifdef _WIN32
#pragma once
#endif

#include <vgui_controls/EditablePanel.h>
#include "tf_controls.h"

class IMatchJoiningHandler
{
public:
	IMatchJoiningHandler();
	virtual ~IMatchJoiningHandler();

	virtual void MatchFound() = 0;

protected:

	void JoinMatch();
};

class CTFImmediateAutoJoinHandler : public IMatchJoiningHandler
{
public:
	CTFImmediateAutoJoinHandler();
	virtual void MatchFound() OVERRIDE;

private:

	float m_flNextAutoJoinTime;
};

class CTFRejoinConfirmDialog;
class CTFMatchMakingPopupPrompJoinHandler : public IMatchJoiningHandler
{
public:
	CTFMatchMakingPopupPrompJoinHandler();

	virtual void MatchFound() OVERRIDE;

	static void OnJoinLobbyInProgressCallback( bool bConfirmed, void *pContext );
private:

	void UpdatePromptState();

	static CTFRejoinConfirmDialog* m_pRejoinPrompt;
	float m_flNextRejoinThinkTime;
};

#endif // TF_MATCH_JOIN_HANDLERS_H