diff options
Diffstat (limited to 'game/client/tf/vgui/item_slot_panel.h')
| -rw-r--r-- | game/client/tf/vgui/item_slot_panel.h | 54 |
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 |