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.

66 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef ITEM_RENTAL_UI_H
  8. #define ITEM_RENTAL_UI_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "econ_ui.h"
  13. #include "vgui/ISurface.h"
  14. #include "econ_controls.h"
  15. #include "gc_clientsystem.h"
  16. #include "tool_items/tool_items.h"
  17. #include "store/store_panel.h"
  18. #include "vgui_controls/PropertySheet.h"
  19. #include "confirm_dialog.h"
  20. #include "econ_notifications.h"
  21. class CEconPreviewNotification : public CEconNotification
  22. {
  23. public:
  24. CEconPreviewNotification( uint64 ulSteamID, uint32 iItemDef );
  25. virtual EType NotificationType() { return eType_Trigger; }
  26. virtual void Trigger() {}
  27. int GetItemDefIndex()
  28. {
  29. return m_pItemDef->GetDefinitionIndex();
  30. }
  31. public:
  32. const CEconItemDefinition *m_pItemDef;
  33. };
  34. class CEconPreviewExpiredNotification : public CEconPreviewNotification
  35. {
  36. public:
  37. CEconPreviewExpiredNotification( uint64 ulSteamID, uint32 iItemDef ) : CEconPreviewNotification( ulSteamID, iItemDef ) {}
  38. virtual EType NotificationType() { return eType_Trigger; }
  39. virtual void Trigger();
  40. };
  41. class CEconPreviewItemBoughtNotification : public CEconPreviewNotification
  42. {
  43. public:
  44. CEconPreviewItemBoughtNotification( uint64 ulSteamID, uint32 iItemDef ) : CEconPreviewNotification( ulSteamID, iItemDef ) {}
  45. virtual EType NotificationType() { return eType_Trigger; }
  46. virtual void Trigger()
  47. {
  48. EconUI()->OpenEconUI( ECONUI_BACKPACK );
  49. MarkForDeletion();
  50. }
  51. };
  52. #endif // ITEM_RENTAL_UI_H