summaryrefslogtreecommitdiff
path: root/gameui/BackgroundMenuButton.cpp
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 /gameui/BackgroundMenuButton.cpp
downloadarchived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.tar.xz
archived-source-engine-2018-hl2-src-3bf9df6b2785fa6d951086978a3e66f49427166a.zip
Diffstat (limited to 'gameui/BackgroundMenuButton.cpp')
-rw-r--r--gameui/BackgroundMenuButton.cpp72
1 files changed, 72 insertions, 0 deletions
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 <KeyValues.h>
+#include <vgui/IImage.h>
+#include <vgui/IScheme.h>
+#include <vgui_controls/Menu.h>
+#include <vgui_controls/MenuItem.h>
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include <tier0/memdbgon.h>
+
+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");
+ */
+}