diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/econ/item_rental_ui.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/econ/item_rental_ui.h')
| -rw-r--r-- | game/client/econ/item_rental_ui.h | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/game/client/econ/item_rental_ui.h b/game/client/econ/item_rental_ui.h new file mode 100644 index 0000000..e610381 --- /dev/null +++ b/game/client/econ/item_rental_ui.h @@ -0,0 +1,66 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef ITEM_RENTAL_UI_H +#define ITEM_RENTAL_UI_H +#ifdef _WIN32 +#pragma once +#endif + +#include "econ_ui.h" +#include "vgui/ISurface.h" +#include "econ_controls.h" +#include "gc_clientsystem.h" +#include "tool_items/tool_items.h" +#include "store/store_panel.h" +#include "vgui_controls/PropertySheet.h" +#include "confirm_dialog.h" +#include "econ_notifications.h" + +class CEconPreviewNotification : public CEconNotification +{ +public: + CEconPreviewNotification( uint64 ulSteamID, uint32 iItemDef ); + + virtual EType NotificationType() { return eType_Trigger; } + + virtual void Trigger() {} + + int GetItemDefIndex() + { + return m_pItemDef->GetDefinitionIndex(); + } + +public: + const CEconItemDefinition *m_pItemDef; +}; + +class CEconPreviewExpiredNotification : public CEconPreviewNotification +{ +public: + CEconPreviewExpiredNotification( uint64 ulSteamID, uint32 iItemDef ) : CEconPreviewNotification( ulSteamID, iItemDef ) {} + + virtual EType NotificationType() { return eType_Trigger; } + + virtual void Trigger(); +}; + +class CEconPreviewItemBoughtNotification : public CEconPreviewNotification +{ +public: + CEconPreviewItemBoughtNotification( uint64 ulSteamID, uint32 iItemDef ) : CEconPreviewNotification( ulSteamID, iItemDef ) {} + + virtual EType NotificationType() { return eType_Trigger; } + + virtual void Trigger() + { + EconUI()->OpenEconUI( ECONUI_BACKPACK ); + MarkForDeletion(); + } +}; + +#endif // ITEM_RENTAL_UI_H |