diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/cstrike/VGUI/cstrikebuyequipmenu.cpp | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/cstrike/VGUI/cstrikebuyequipmenu.cpp')
| -rw-r--r-- | game/client/cstrike/VGUI/cstrikebuyequipmenu.cpp | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/game/client/cstrike/VGUI/cstrikebuyequipmenu.cpp b/game/client/cstrike/VGUI/cstrikebuyequipmenu.cpp new file mode 100644 index 0000000..ed8f013 --- /dev/null +++ b/game/client/cstrike/VGUI/cstrikebuyequipmenu.cpp @@ -0,0 +1,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 ); +} + |