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/dod/dod_hud_capturepanel.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/dod/dod_hud_capturepanel.h')
| -rw-r--r-- | game/client/dod/dod_hud_capturepanel.h | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/game/client/dod/dod_hud_capturepanel.h b/game/client/dod/dod_hud_capturepanel.h new file mode 100644 index 0000000..014236c --- /dev/null +++ b/game/client/dod/dod_hud_capturepanel.h @@ -0,0 +1,91 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef DOD_HUD_CAPTUREPANEL_H +#define DOD_HUD_CAPTUREPANEL_H +#ifdef _WIN32 +#pragma once +#endif + +//----------------------------------------------------------------------------- +// Purpose: Draws the progress bar +//----------------------------------------------------------------------------- +class CDoDCapturePanelProgressBar : public vgui::ImagePanel +{ +public: + DECLARE_CLASS_SIMPLE( CDoDCapturePanelProgressBar, vgui::ImagePanel ); + + CDoDCapturePanelProgressBar( vgui::Panel *parent, const char *name ); + + virtual void Paint(); + + void SetPercentage( float flPercentage ){ m_flPercent = flPercentage; } + +private: + + float m_flPercent; + int m_iTexture; + + CPanelAnimationVar( Color, m_clrActive, "color_active", "HudCaptureProgressBar.Active" ); + CPanelAnimationVar( Color, m_clrInActive, "color_inactive", "HudCaptureProgressBar.InActive" ); +}; + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +class CDoDCapturePanelIcon : public vgui::ImagePanel +{ +public: + DECLARE_CLASS_SIMPLE( CDoDCapturePanelIcon, vgui::ImagePanel ); + + CDoDCapturePanelIcon( vgui::Panel *parent, const char *name ); + + virtual void Paint(); + + void SetActive( bool state ){ m_bActive = state; } + +private: + + bool m_bActive; + int m_iTexture; + + CPanelAnimationVar( Color, m_clrActive, "color_active", "HudCaptureIcon.Active" ); + CPanelAnimationVar( Color, m_clrInActive, "color_inactive", "HudCaptureIcon.InActive" ); +}; + +//----------------------------------------------------------------------------- +// +//----------------------------------------------------------------------------- +class CDoDHudCapturePanel : public CHudElement, public vgui::EditablePanel +{ +public: + DECLARE_CLASS_SIMPLE( CDoDHudCapturePanel, vgui::EditablePanel ); + + CDoDHudCapturePanel( const char *pElementName ); + + virtual void OnThink(); + virtual void ApplySchemeSettings( vgui::IScheme *pScheme ); + virtual void OnScreenSizeChanged( int iOldWide, int iOldTall ); + +private: + + CDoDCapturePanelProgressBar *m_pProgressBar; + + CUtlVector<CDoDCapturePanelIcon *> m_PlayerIcons; + + vgui::ImagePanel *m_pAlliesFlag; + vgui::ImagePanel *m_pAxisFlag; + vgui::ImagePanel *m_pNeutralFlag; + + vgui::Label *m_pMessage; + + vgui::Panel *m_pBackground; + + CPanelAnimationVarAliasType( float, m_nSpaceBetweenIcons, "icon_space", "2", "proportional_float" ); +}; + +#endif // DOD_HUD_CAPTUREPANEL_H
\ No newline at end of file |