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/tf/vgui/tf_asyncpanel.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/tf/vgui/tf_asyncpanel.h')
| -rw-r--r-- | game/client/tf/vgui/tf_asyncpanel.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/game/client/tf/vgui/tf_asyncpanel.h b/game/client/tf/vgui/tf_asyncpanel.h new file mode 100644 index 0000000..478c83f --- /dev/null +++ b/game/client/tf/vgui/tf_asyncpanel.h @@ -0,0 +1,40 @@ +#ifndef TF_ASYNCPANEL +#define TF_ASYNCPANEL + +#include "vgui_controls/EditablePanel.h" + +using namespace vgui; + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +class CBaseASyncPanel : public EditablePanel +{ + DECLARE_CLASS_SIMPLE( CBaseASyncPanel, EditablePanel ); +public: + CBaseASyncPanel( Panel *pParent, const char *pszPanelName ); + virtual ~CBaseASyncPanel() {} + + bool IsInitialized() const; + void CheckForData(); + virtual void OnTick() OVERRIDE; + virtual void ApplySchemeSettings( IScheme *pScheme ) OVERRIDE; + virtual void PerformLayout() OVERRIDE; + virtual void LoadControlSettings(const char *dialogResourceName, const char *pathID = NULL, KeyValues *pPreloadedKeyValues = NULL, KeyValues *pConditions = NULL) OVERRIDE; +protected: + virtual void OnChildSettingsApplied( KeyValues *pInResourceData, Panel *pChild ) OVERRIDE; + +private: + void PresentDataIfReady(); + virtual bool CheckForData_Internal() = 0; + + bool m_bDataInitialized; + bool m_bSettingsApplied; + float m_flLastRequestTime; + float m_flLastUpdatedTime; + CUtlVector< PHandle > m_vecLoadingPanels; + CUtlVector< PHandle > m_vecPanelsToShow; + CPanelAnimationVar( float, m_flRefreshDelay, "refresh_delay", "-1.f" ); +}; + +#endif //TF_ASYNCPANEL
\ No newline at end of file |