From 3bf9df6b2785fa6d951086978a3e66f49427166a Mon Sep 17 00:00:00 2001 From: FluorescentCIAAfricanAmerican <0934gj3049fk@protonmail.com> Date: Wed, 22 Apr 2020 12:56:21 -0400 Subject: 1 --- gameui/BackgroundMenuButton.cpp | 72 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 gameui/BackgroundMenuButton.cpp (limited to 'gameui/BackgroundMenuButton.cpp') diff --git a/gameui/BackgroundMenuButton.cpp b/gameui/BackgroundMenuButton.cpp new file mode 100644 index 0000000..f67f487 --- /dev/null +++ b/gameui/BackgroundMenuButton.cpp @@ -0,0 +1,72 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#include "BackgroundMenuButton.h" + +#include +#include +#include +#include +#include + +// memdbgon must be the last include file in a .cpp file!!! +#include + +using namespace vgui; + +//----------------------------------------------------------------------------- +// Purpose: Constructor +//----------------------------------------------------------------------------- +CBackgroundMenuButton::CBackgroundMenuButton(vgui::Panel *parent, const char *name) : BaseClass(parent, name, "") +{ + m_pImage = NULL; + m_pMouseOverImage = NULL; +} + +//----------------------------------------------------------------------------- +// Purpose: Destructor +//----------------------------------------------------------------------------- +CBackgroundMenuButton::~CBackgroundMenuButton() +{ +} + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +void CBackgroundMenuButton::OnCommand(const char *command) +{ + BaseClass::OnCommand(command); +} + +//----------------------------------------------------------------------------- +// Purpose: Makes the button transparent +//----------------------------------------------------------------------------- +void CBackgroundMenuButton::ApplySchemeSettings(IScheme *pScheme) +{ + BaseClass::ApplySchemeSettings(pScheme); + + // hack some colors in + SetFgColor(Color(255, 255, 255, 255)); + SetBgColor(Color(0, 0, 0, 0)); + SetDefaultColor(Color(255, 255, 255, 255), Color(0, 0, 0, 0)); + SetArmedColor(Color(255, 255, 0, 255), Color(0, 0, 0, 0)); + SetDepressedColor(Color(255, 255, 0, 255), Color(0, 0, 0, 0)); + SetContentAlignment(Label::a_west); + SetBorder(NULL); + SetDefaultBorder(NULL); + SetDepressedBorder(NULL); + SetKeyFocusBorder(NULL); + SetTextInset(0, 0); + SetAlpha(0); + + /* + // sounds disabled for this button (since it's so big now) + SetArmedSound("UI/buttonrollover.wav"); + SetDepressedSound("UI/buttonclick.wav"); + SetReleasedSound("UI/buttonclickrelease.wav"); + */ +} -- cgit v1.2.3