blob: ed8f013e7de4138356f28cd56242d9e1e65e6aee (
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#include "cbase.h"
#include "cstrikebuyequipmenu.h"
#include "cs_shareddefs.h"
#include "cstrikebuysubmenu.h"
#include "backgroundpanel.h"
using namespace vgui;
//-----------------------------------------------------------------------------
// Purpose: Constructor for CT Equipment menu
//-----------------------------------------------------------------------------
CCSBuyEquipMenu_CT::CCSBuyEquipMenu_CT(IViewPort *pViewPort) : CBuyMenu( pViewPort )
{
SetTitle( "#Cstrike_Buy_Menu", true);
SetProportional( true );
m_pMainMenu = new CCSBuySubMenu( this, "BuySubMenu" );
m_pMainMenu->LoadControlSettings( "Resource/UI/BuyEquipment_CT.res" );
m_pMainMenu->SetVisible( false );
m_iTeam = TEAM_CT;
CreateBackground( this );
m_backgroundLayoutFinished = false;
}
//-----------------------------------------------------------------------------
// Purpose: Constructor for Terrorist Equipment menu
//-----------------------------------------------------------------------------
CCSBuyEquipMenu_TER::CCSBuyEquipMenu_TER(IViewPort *pViewPort) : CBuyMenu( pViewPort )
{
SetTitle( "#Cstrike_Buy_Menu", true);
SetProportional( true );
m_pMainMenu = new CCSBuySubMenu( this, "BuySubMenu" );
m_pMainMenu->LoadControlSettings( "Resource/UI/BuyEquipment_TER.res" );
m_pMainMenu->SetVisible( false );
m_iTeam = TEAM_TERRORIST;
CreateBackground( this );
m_backgroundLayoutFinished = false;
}
//-----------------------------------------------------------------------------
// Purpose: The CS background is painted by image panels, so we should do nothing
//-----------------------------------------------------------------------------
void CCSBuyEquipMenu_CT::PaintBackground()
{
}
//-----------------------------------------------------------------------------
// Purpose: Scale / center the window
//-----------------------------------------------------------------------------
void CCSBuyEquipMenu_CT::PerformLayout()
{
BaseClass::PerformLayout();
// stretch the window to fullscreen
if ( !m_backgroundLayoutFinished )
LayoutBackgroundPanel( this );
m_backgroundLayoutFinished = true;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CCSBuyEquipMenu_CT::ApplySchemeSettings( vgui::IScheme *pScheme )
{
BaseClass::ApplySchemeSettings( pScheme );
ApplyBackgroundSchemeSettings( this, pScheme );
}
//-----------------------------------------------------------------------------
// Purpose: The CS background is painted by image panels, so we should do nothing
//-----------------------------------------------------------------------------
void CCSBuyEquipMenu_TER::PaintBackground()
{
}
//-----------------------------------------------------------------------------
// Purpose: Scale / center the window
//-----------------------------------------------------------------------------
void CCSBuyEquipMenu_TER::PerformLayout()
{
BaseClass::PerformLayout();
// stretch the window to fullscreen
if ( !m_backgroundLayoutFinished )
LayoutBackgroundPanel( this );
m_backgroundLayoutFinished = true;
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CCSBuyEquipMenu_TER::ApplySchemeSettings( vgui::IScheme *pScheme )
{
BaseClass::ApplySchemeSettings( pScheme );
ApplyBackgroundSchemeSettings( this, pScheme );
}
|