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/tf2/playeroverlayname.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/tf2/playeroverlayname.h')
| -rw-r--r-- | game/client/tf2/playeroverlayname.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/game/client/tf2/playeroverlayname.h b/game/client/tf2/playeroverlayname.h new file mode 100644 index 0000000..4fe7a4f --- /dev/null +++ b/game/client/tf2/playeroverlayname.h @@ -0,0 +1,59 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $Workfile: $ +// $Date: $ +// +//----------------------------------------------------------------------------- +// $Log: $ +// +// $NoKeywords: $ +//=============================================================================// +#if !defined( PLAYEROVERLAYNAME_H ) +#define PLAYEROVERLAYNAME_H +#ifdef _WIN32 +#pragma once +#endif + +#include <vgui_controls/Label.h> + +class KeyValues; +class CHudPlayerOverlay; +class CHudPlayerOverlayName : public vgui::Label +{ +public: + typedef vgui::Label BaseClass; + + CHudPlayerOverlayName( CHudPlayerOverlay *baseOverlay, const char *name ); + virtual ~CHudPlayerOverlayName( void ); + + bool Init( KeyValues* pInitData ); + + void SetName( const char *name ); + + virtual void ApplySchemeSettings( vgui::IScheme *pScheme ); + virtual void Paint(); + + virtual void SetReflectMouse( bool reflect ); + // If reflect mouse is true, then pass these up to parent + virtual void OnCursorMoved(int x,int y); + virtual void OnMousePressed(vgui::MouseCode code); + virtual void OnMouseDoublePressed(vgui::MouseCode code); + virtual void OnMouseReleased(vgui::MouseCode code); + virtual void OnMouseWheeled(int delta); + + virtual void OnCursorEntered(); + virtual void OnCursorExited(); +private: + + char m_szName[ 64 ]; + Color m_fgColor; + Color m_bgColor; + + CHudPlayerOverlay *m_pBaseOverlay; + + bool m_bReflectMouse; +}; + +#endif // PLAYEROVERLAYNAME_H
\ No newline at end of file |