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/replay/vgui/replaybrowserlistpanel.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/replay/vgui/replaybrowserlistpanel.h')
| -rw-r--r-- | game/client/replay/vgui/replaybrowserlistpanel.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/game/client/replay/vgui/replaybrowserlistpanel.h b/game/client/replay/vgui/replaybrowserlistpanel.h new file mode 100644 index 0000000..b30658b --- /dev/null +++ b/game/client/replay/vgui/replaybrowserlistpanel.h @@ -0,0 +1,80 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +//=======================================================================================// + +#ifndef REPLAYBROWSER_LISTPANEL_H +#define REPLAYBROWSER_LISTPANEL_H +#ifdef _WIN32 +#pragma once +#endif + +#include <game/client/iviewport.h> +#include "vgui_controls/PropertyPage.h" +#include "vgui_controls/Button.h" +#include "vgui_controls/PanelListPanel.h" +#include "vgui_controls/EditablePanel.h" +#include "replaybrowseritemmanager.h" +#include "replay/genericclassbased_replay.h" + +using namespace vgui; + +//----------------------------------------------------------------------------- +// Forward declarations +//----------------------------------------------------------------------------- +class CBaseThumbnailCollection; +class CReplayPreviewPanelBase; + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +class CReplayBrowserThumbnail; +class CExLabel; + +class CReplayListPanel : public PanelListPanel +{ + DECLARE_CLASS_SIMPLE( CReplayListPanel, PanelListPanel ); +public: + CReplayListPanel( Panel *pParent, const char *pName ); + ~CReplayListPanel(); + + virtual void ApplySchemeSettings( IScheme *pScheme ); + virtual void PerformLayout(); + + void AddReplayItem( ReplayItemHandle_t hItem ); + void CleanupUIForReplayItem( ReplayItemHandle_t hReplayItem ); + void AddReplaysToList(); + void RemoveCollection( CBaseThumbnailCollection *pCollection ); + + virtual void OnTick(); + + void OnItemPanelEntered( Panel *pPanel ); + void OnItemPanelExited( Panel *pPanel ); + + void SetupBorderArrow( bool bLeft ); + + void ClearPreviewPanel(); + + void ApplyFilter( const wchar_t *pFilterText ); + +protected: + virtual void OnMouseWheeled(int delta); + +private: + const IQueryableReplayItem *FindItem( ReplayItemHandle_t hItem, int *pItemManagerIndex ); + CBaseThumbnailCollection *FindOrAddReplayThumbnailCollection( const IQueryableReplayItem *pItem, IReplayItemManager *pItemManager ); + CReplayBrowserThumbnail *FindThumbnailAtCursor( int x, int y ); + bool PassesFilter( IQueryableReplayItem *pItem ); + + CBaseThumbnailCollection *m_pReplaysCollection; + CBaseThumbnailCollection *m_pMoviesCollection; + + CUtlVector< CBaseThumbnailCollection * > m_vecCollections; + CReplayPreviewPanelBase *m_pPreviewPanel; + Panel *m_pPrevHoverPanel; + + ImagePanel *m_pBorderArrowImg; + int m_aBorderArrowDims[2]; + wchar_t m_wszFilter[256]; +}; + +#endif // REPLAYBROWSER_LISTPANEL_H |