mirror of
https://github.com/nillerusr/source-engine.git
synced 2025-04-07 17:04:30 +00:00
57 lines
1.3 KiB
C++
57 lines
1.3 KiB
C++
//========= Copyright © 1996-2006, Valve Corporation, All rights reserved. ============//
|
|
//
|
|
// Purpose:
|
|
//
|
|
// $NoKeywords: $
|
|
//=============================================================================//
|
|
|
|
#ifndef TF_HUD_AMMOSTATUS_H
|
|
#define TF_HUD_AMMOSTATUS_H
|
|
#ifdef _WIN32
|
|
#pragma once
|
|
#endif
|
|
|
|
#define TF_MAX_GRENADES 4
|
|
#define TF_MAX_FILENAME_LENGTH 128
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose: Displays weapon ammo data
|
|
//-----------------------------------------------------------------------------
|
|
class CTFHudWeaponAmmo : public CHudElement, public vgui::EditablePanel
|
|
{
|
|
DECLARE_CLASS_SIMPLE( CTFHudWeaponAmmo, vgui::EditablePanel );
|
|
|
|
public:
|
|
|
|
CTFHudWeaponAmmo( const char *pElementName );
|
|
|
|
virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
|
|
virtual void Reset();
|
|
|
|
virtual bool ShouldDraw( void );
|
|
|
|
protected:
|
|
|
|
virtual void OnThink();
|
|
|
|
private:
|
|
|
|
void UpdateAmmoLabels( bool bPrimary, bool bReserve, bool bNoClip );
|
|
|
|
private:
|
|
|
|
float m_flNextThink;
|
|
|
|
CHandle<C_BaseCombatWeapon> m_hCurrentActiveWeapon;
|
|
int m_nAmmo;
|
|
int m_nAmmo2;
|
|
|
|
CTFLabel *m_pInClip;
|
|
CTFLabel *m_pInClipShadow;
|
|
CTFLabel *m_pInReserve;
|
|
CTFLabel *m_pInReserveShadow;
|
|
CTFLabel *m_pNoClip;
|
|
CTFLabel *m_pNoClipShadow;
|
|
};
|
|
|
|
#endif // TF_HUD_AMMOSTATUS_H
|