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 /gameui/MouseMessageForwardingPanel.cpp | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'gameui/MouseMessageForwardingPanel.cpp')
| -rw-r--r-- | gameui/MouseMessageForwardingPanel.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gameui/MouseMessageForwardingPanel.cpp b/gameui/MouseMessageForwardingPanel.cpp new file mode 100644 index 0000000..b02583d --- /dev/null +++ b/gameui/MouseMessageForwardingPanel.cpp @@ -0,0 +1,39 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#include "MouseMessageForwardingPanel.h" +#include "KeyValues.h" + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" + +using namespace vgui; + +CMouseMessageForwardingPanel::CMouseMessageForwardingPanel( Panel *parent, const char *name ) : BaseClass( parent, name ) +{ + // don't draw an + SetPaintEnabled(false); + SetPaintBackgroundEnabled(false); + SetPaintBorderEnabled(false); +} + +void CMouseMessageForwardingPanel::PerformLayout() +{ + // fill out the whole area + int w, t; + GetParent()->GetSize(w, t); + SetBounds(0, 0, w, t); +} + +void CMouseMessageForwardingPanel::OnMousePressed( vgui::MouseCode code ) +{ + CallParentFunction( new KeyValues("MousePressed", "code", code) ); +} + +void CMouseMessageForwardingPanel::OnMouseDoublePressed( vgui::MouseCode code ) +{ + CallParentFunction( new KeyValues("MouseDoublePressed", "code", code) ); +}
\ No newline at end of file |