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.

62 lines
1.9 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef CRATE_DETAIL_PANELS_H
  8. #define CRATE_DETAIL_PANELS_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "tf_controls.h"
  13. #include "item_model_panel.h"
  14. #include "econ_item_view.h"
  15. #include <vgui_controls/TextEntry.h>
  16. #include <vgui_controls/ProgressBar.h>
  17. class CInputStringForItemBackpackOverlayDialog : public vgui::EditablePanel, public CGameEventListener
  18. {
  19. DECLARE_CLASS_SIMPLE( CInputStringForItemBackpackOverlayDialog, vgui::EditablePanel );
  20. public:
  21. CInputStringForItemBackpackOverlayDialog( vgui::Panel *pParent, CEconItemView *pItem, CEconItemView *pChosenKey = NULL );
  22. ~CInputStringForItemBackpackOverlayDialog();
  23. virtual void FireGameEvent( IGameEvent *event ) OVERRIDE;
  24. virtual void ApplySchemeSettings( vgui::IScheme *pScheme ) OVERRIDE;
  25. virtual void ApplySettings( KeyValues *inResourceData ) OVERRIDE;
  26. virtual void PerformLayout( void ) OVERRIDE;
  27. virtual void OnCommand( const char *command ) OVERRIDE;
  28. virtual void OnThink() OVERRIDE;
  29. void Show();
  30. protected:
  31. CItemModelPanel *GetPreviewModelPanel() { return m_pPreviewModelPanel; }
  32. CEconItemView m_Item;
  33. private:
  34. void CreateItemPanels();
  35. void FindUsableKey();
  36. vgui::ProgressBar *m_pProgressBar;
  37. CExLabel *m_pRareLootLabel;
  38. CExButton *m_pUseKeyButton;
  39. CExButton *m_pGetKeyButton;
  40. CExButton *m_pShuffleButton;
  41. CItemModelPanel *m_pPreviewModelPanel;
  42. vgui::TextEntry *m_pTextEntry;
  43. CUtlVector< CItemModelPanel* > m_vecContentsPanels;
  44. KeyValues *m_pItemModelPanelKVs;
  45. CItemModelPanelToolTip *m_pMouseOverTooltip;
  46. CItemModelPanel *m_pMouseOverItemPanel;
  47. static float m_sflNextShuffleTime;
  48. bool m_bUpdateRecieved;
  49. CEconItemView m_UseableKey;
  50. };
  51. #endif // CRATE_DETAIL_PANELS_H