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 /game/server/NavUI/SelectionTool.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/server/NavUI/SelectionTool.h')
| -rw-r--r-- | game/server/NavUI/SelectionTool.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/game/server/NavUI/SelectionTool.h b/game/server/NavUI/SelectionTool.h new file mode 100644 index 0000000..d5af70f --- /dev/null +++ b/game/server/NavUI/SelectionTool.h @@ -0,0 +1,48 @@ +//-------------------------------------------------------------------------------------------------------- +//========= Copyright Valve Corporation, All rights reserved. ============// + +#ifndef SELECTIONTOOL_H +#define SELECTIONTOOL_H + +#ifdef SERVER_USES_VGUI + +#include "NavUI.h" +#include "nav.h" + + +//-------------------------------------------------------------------------------------------------------- +class SelectionToolPanel : public CNavUIToolPanel +{ + DECLARE_CLASS_SIMPLE( SelectionToolPanel, CNavUIToolPanel ); + +public: + SelectionToolPanel( vgui::Panel *parent, const char *toolName ); + + virtual void Init( void ); + virtual void Shutdown( void ); + virtual void PerformLayout( void ); + virtual void OnCommand( const char *command ); + + virtual void StartLeftClickAction( const char *actionName ); + virtual void FinishLeftClickAction( const char *actionName ); + virtual void StartRightClickAction( const char *actionName ); + virtual void OnCursorMoved( int x, int y ); + + virtual bool IsFloodSelectable( CNavArea *area ); + +protected: + void FloodSelect( void ); + CNavArea *m_floodStartArea; + + enum DragSelectType + { + DRAG_NONE, + DRAG_SELECT, + DRAG_UNSELECT + }; + DragSelectType m_dragType; +}; + +#endif // SERVER_USES_VGUI + +#endif // SELECTIONTOOL_H |