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.

61 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef VMTPICKER_H
  7. #define VMTPICKER_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "matsys_controls/baseassetpicker.h"
  12. //-----------------------------------------------------------------------------
  13. // Forward declarations
  14. //-----------------------------------------------------------------------------
  15. class CVMTPreviewPanel;
  16. namespace vgui
  17. {
  18. class Splitter;
  19. }
  20. //-----------------------------------------------------------------------------
  21. // Purpose: Base class for choosing raw assets
  22. //-----------------------------------------------------------------------------
  23. class CVMTPicker : public CBaseAssetPicker
  24. {
  25. DECLARE_CLASS_SIMPLE( CVMTPicker, CBaseAssetPicker );
  26. public:
  27. CVMTPicker( vgui::Panel *pParent, bool bAllowMultiselect = false );
  28. virtual ~CVMTPicker();
  29. private:
  30. // Derived classes have this called when the previewed asset changes
  31. virtual void OnSelectedAssetPicked( const char *pAssetName );
  32. CVMTPreviewPanel *m_pVMTPreview2D;
  33. CVMTPreviewPanel *m_pVMTPreview3D;
  34. vgui::Splitter *m_p2D3DSplitter;
  35. vgui::Splitter *m_pPreviewSplitter;
  36. };
  37. //-----------------------------------------------------------------------------
  38. // Purpose: Modal dialog for asset picker
  39. //-----------------------------------------------------------------------------
  40. class CVMTPickerFrame : public CBaseAssetPickerFrame
  41. {
  42. DECLARE_CLASS_SIMPLE( CVMTPickerFrame, CBaseAssetPickerFrame );
  43. public:
  44. CVMTPickerFrame( vgui::Panel *pParent, const char *pTitle, bool bAllowMultiselect = false );
  45. };
  46. #endif // VMTPICKER_H