summaryrefslogtreecommitdiff
path: root/gameui/vcontrolslistpanel.h
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/vcontrolslistpanel.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'gameui/vcontrolslistpanel.h')
-rw-r--r--gameui/vcontrolslistpanel.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/gameui/vcontrolslistpanel.h b/gameui/vcontrolslistpanel.h
new file mode 100644
index 0000000..d468fa4
--- /dev/null
+++ b/gameui/vcontrolslistpanel.h
@@ -0,0 +1,54 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+#if !defined( VCONTROLSLISTPANEL_H )
+#define VCONTROLSLISTPANEL_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <vgui_controls/SectionedListPanel.h>
+
+//-----------------------------------------------------------------------------
+// Purpose: Special list subclass to handle drawing of trap mode prompt on top of
+// lists client area
+//-----------------------------------------------------------------------------
+class VControlsListPanel : public vgui::SectionedListPanel
+{
+public:
+ // Construction
+ VControlsListPanel( vgui::Panel *parent, const char *listName );
+ virtual ~VControlsListPanel();
+
+ // Start/end capturing
+ virtual void StartCaptureMode(vgui::HCursor hCursor = NULL);
+ virtual void EndCaptureMode(vgui::HCursor hCursor = NULL);
+ virtual bool IsCapturing();
+
+ // Set which item should be associated with the prompt
+ virtual void SetItemOfInterest(int itemID);
+ virtual int GetItemOfInterest();
+
+ virtual void OnMousePressed(vgui::MouseCode code);
+ virtual void OnMouseDoublePressed(vgui::MouseCode code);
+
+private:
+ void ApplySchemeSettings(vgui::IScheme *pScheme );
+
+ // Are we showing the prompt?
+ bool m_bCaptureMode;
+ // If so, where?
+ int m_nClickRow;
+ // Font to use for showing the prompt
+ vgui::HFont m_hFont;
+ // panel used to edit
+ class CInlineEditPanel *m_pInlineEditPanel;
+ int m_iMouseX, m_iMouseY;
+
+ typedef vgui::SectionedListPanel BaseClass;
+};
+
+#endif // VCONTROLSLISTPANEL_H \ No newline at end of file