Team Fortress 2 Source Code as on 22/4/2020
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.

48 lines
1.2 KiB

  1. //--------------------------------------------------------------------------------------------------------
  2. //========= Copyright Valve Corporation, All rights reserved. ============//
  3. #ifndef SELECTIONTOOL_H
  4. #define SELECTIONTOOL_H
  5. #ifdef SERVER_USES_VGUI
  6. #include "NavUI.h"
  7. #include "nav.h"
  8. //--------------------------------------------------------------------------------------------------------
  9. class SelectionToolPanel : public CNavUIToolPanel
  10. {
  11. DECLARE_CLASS_SIMPLE( SelectionToolPanel, CNavUIToolPanel );
  12. public:
  13. SelectionToolPanel( vgui::Panel *parent, const char *toolName );
  14. virtual void Init( void );
  15. virtual void Shutdown( void );
  16. virtual void PerformLayout( void );
  17. virtual void OnCommand( const char *command );
  18. virtual void StartLeftClickAction( const char *actionName );
  19. virtual void FinishLeftClickAction( const char *actionName );
  20. virtual void StartRightClickAction( const char *actionName );
  21. virtual void OnCursorMoved( int x, int y );
  22. virtual bool IsFloodSelectable( CNavArea *area );
  23. protected:
  24. void FloodSelect( void );
  25. CNavArea *m_floodStartArea;
  26. enum DragSelectType
  27. {
  28. DRAG_NONE,
  29. DRAG_SELECT,
  30. DRAG_UNSELECT
  31. };
  32. DragSelectType m_dragType;
  33. };
  34. #endif // SERVER_USES_VGUI
  35. #endif // SELECTIONTOOL_H