Modified source engine (2017) developed by valve and leaked in 2020. Not for commercial purporses
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.
 
 
 
 
 
 

54 lines
1.6 KiB

//========= 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