summaryrefslogtreecommitdiff
path: root/game/client/tf/vgui/item_slot_panel.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/tf/vgui/item_slot_panel.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/tf/vgui/item_slot_panel.h')
-rw-r--r--game/client/tf/vgui/item_slot_panel.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/game/client/tf/vgui/item_slot_panel.h b/game/client/tf/vgui/item_slot_panel.h
new file mode 100644
index 0000000..357ce87
--- /dev/null
+++ b/game/client/tf/vgui/item_slot_panel.h
@@ -0,0 +1,54 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+#ifndef ITEM_SLOT_PANEL_H
+#define ITEM_SLOT_PANEL_H
+#include "base_loadout_panel.h"
+
+class CItemCriteriaSelectionPanel;
+
+//-----------------------------------------------------------------------------
+// A loadout screen that handles modifying the loadout of a specific item
+//-----------------------------------------------------------------------------
+class CItemSlotPanel : public CBaseLoadoutPanel
+{
+ DECLARE_CLASS_SIMPLE( CItemSlotPanel, CBaseLoadoutPanel );
+public:
+ CItemSlotPanel( vgui::Panel *parent );
+ ~CItemSlotPanel();
+
+ virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
+ virtual void PerformLayout( void );
+
+ virtual void AddNewItemPanel( int iPanelIndex ) OVERRIDE;
+ virtual void UpdateModelPanels( void ) OVERRIDE;
+ virtual int GetNumItemPanels( void ) OVERRIDE;
+ virtual void OnShowPanel( bool bVisible, bool bReturningFromArmory ) OVERRIDE;
+
+ MESSAGE_FUNC_PTR( OnItemPanelMouseReleased, "ItemPanelMouseReleased", panel );
+ MESSAGE_FUNC_PARAMS( OnSelectionReturned, "SelectionReturned", data );
+ MESSAGE_FUNC( OnCancelSelection, "CancelSelection" );
+ virtual void OnCommand( const char *command );
+
+ void SetItem( CEconItem* pItem );
+
+private:
+ CEconItem *m_pItem;
+
+ struct ItemSlot_t
+ {
+ CAttribute_ItemSlotCriteria m_slotCriteriaAttribute;
+ itemid_t m_ulOriginalID;
+ bool m_bHasSlot;
+ };
+ CUtlVector< ItemSlot_t > m_itemSlots;
+
+ int m_iCurrentSlotIndex;
+ CItemSelectionCriteria m_selectionCriteria;
+ CItemCriteriaSelectionPanel *m_pSelectionPanel;
+};
+
+#endif // ITEM_SLOT_PANEL_H