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.

47 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #include "matsys_controls/assetpicker.h"
  7. using namespace vgui;
  8. //-----------------------------------------------------------------------------
  9. //
  10. // Asset Picker with no preview
  11. //
  12. //-----------------------------------------------------------------------------
  13. //-----------------------------------------------------------------------------
  14. // Purpose: Constructor
  15. //-----------------------------------------------------------------------------
  16. CAssetPicker::CAssetPicker( vgui::Panel *pParent, const char *pAssetType,
  17. const char *pExt, const char *pSubDir, const char *pTextType ) :
  18. BaseClass( pParent, pAssetType, pExt, pSubDir, pTextType )
  19. {
  20. CreateStandardControls( this );
  21. LoadControlSettingsAndUserConfig( "resource/assetpicker.res" );
  22. }
  23. //-----------------------------------------------------------------------------
  24. //
  25. // Purpose: Modal picker frame
  26. //
  27. //-----------------------------------------------------------------------------
  28. CAssetPickerFrame::CAssetPickerFrame( vgui::Panel *pParent, const char *pTitle,
  29. const char *pAssetType, const char *pExt, const char *pSubDir, const char *pTextType ) :
  30. BaseClass( pParent )
  31. {
  32. SetAssetPicker( new CAssetPicker( this, pAssetType, pExt, pSubDir, pTextType ) );
  33. LoadControlSettingsAndUserConfig( "resource/assetpickerframe.res" );
  34. SetTitle( pTitle, false );
  35. }