Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.0 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "mousemessageforwardingpanel.h"
  7. #include "keyvalues.h"
  8. // memdbgon must be the last include file in a .cpp file!!!
  9. #include "tier0/memdbgon.h"
  10. using namespace vgui;
  11. CMouseMessageForwardingPanel::CMouseMessageForwardingPanel( Panel *parent, const char *name ) : BaseClass( parent, name )
  12. {
  13. // don't draw an
  14. SetPaintEnabled(false);
  15. SetPaintBackgroundEnabled(false);
  16. SetPaintBorderEnabled(false);
  17. }
  18. void CMouseMessageForwardingPanel::PerformLayout()
  19. {
  20. // fill out the whole area
  21. int w, t;
  22. GetParent()->GetSize(w, t);
  23. SetBounds(0, 0, w, t);
  24. }
  25. void CMouseMessageForwardingPanel::OnMousePressed( vgui::MouseCode code )
  26. {
  27. CallParentFunction( new KeyValues("MousePressed", "code", code) );
  28. }
  29. void CMouseMessageForwardingPanel::OnMouseDoublePressed( vgui::MouseCode code )
  30. {
  31. CallParentFunction( new KeyValues("MouseDoublePressed", "code", code) );
  32. }