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.

53 lines
1.6 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #if !defined( VCONTROLSLISTPANEL_H )
  8. #define VCONTROLSLISTPANEL_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/SectionedListPanel.h>
  13. //-----------------------------------------------------------------------------
  14. // Purpose: Special list subclass to handle drawing of trap mode prompt on top of
  15. // lists client area
  16. //-----------------------------------------------------------------------------
  17. class VControlsListPanel : public vgui::SectionedListPanel
  18. {
  19. public:
  20. // Construction
  21. VControlsListPanel( vgui::Panel *parent, const char *listName );
  22. virtual ~VControlsListPanel();
  23. // Start/end capturing
  24. virtual void StartCaptureMode(vgui::HCursor hCursor = NULL);
  25. virtual void EndCaptureMode(vgui::HCursor hCursor = NULL);
  26. virtual bool IsCapturing();
  27. // Set which item should be associated with the prompt
  28. virtual void SetItemOfInterest(int itemID);
  29. virtual int GetItemOfInterest();
  30. virtual void OnMousePressed(vgui::MouseCode code);
  31. virtual void OnMouseDoublePressed(vgui::MouseCode code);
  32. private:
  33. void ApplySchemeSettings(vgui::IScheme *pScheme );
  34. // Are we showing the prompt?
  35. bool m_bCaptureMode;
  36. // If so, where?
  37. int m_nClickRow;
  38. // Font to use for showing the prompt
  39. vgui::HFont m_hFont;
  40. // panel used to edit
  41. class CInlineEditPanel *m_pInlineEditPanel;
  42. int m_iMouseX, m_iMouseY;
  43. typedef vgui::SectionedListPanel BaseClass;
  44. };
  45. #endif // VCONTROLSLISTPANEL_H