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/blueprint_panel.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/blueprint_panel.h')
| -rw-r--r-- | game/client/tf/vgui/blueprint_panel.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/game/client/tf/vgui/blueprint_panel.h b/game/client/tf/vgui/blueprint_panel.h new file mode 100644 index 0000000..dd71205 --- /dev/null +++ b/game/client/tf/vgui/blueprint_panel.h @@ -0,0 +1,61 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef BLUEPRINT_PANEL_H +#define BLUEPRINT_PANEL_H +#ifdef _WIN32 +#pragma once +#endif + +#include <vgui_controls/Panel.h> +#include <vgui_controls/Frame.h> +#include "tf_shareddefs.h" +#include "IconPanel.h" + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +class CBlueprintPanel : public vgui::EditablePanel +{ + DECLARE_CLASS_SIMPLE( CBlueprintPanel, vgui::EditablePanel ); +public: + CBlueprintPanel( vgui::Panel *parent, const char *name ); + + virtual void ApplySchemeSettings( vgui::IScheme *pScheme ); + + void SetObjectInfo( const CObjectInfo* pNewInfo ); + const CObjectInfo* GetObjectInfo( void ) { return m_pObjectInfo; } + + // Button functionality + void SetActAsButton( bool bClickable, bool bMouseOver ); + virtual void OnCursorEntered(); + virtual void OnCursorExited(); + virtual void OnMousePressed(vgui::MouseCode code); + virtual void OnMouseDoublePressed(vgui::MouseCode code); + virtual void OnMouseReleased(vgui::MouseCode code); + MESSAGE_FUNC_INT_INT( OnCursorMoved, "OnCursorMoved", x, y ); + + void SetInStack( bool bVal ) { m_bInStack = bVal; } + bool IsInStack( void ) { return m_bInStack; } + + vgui::Label *m_pItemNameLabel; + vgui::Label *m_pItemCostLabel; + char m_pszCost[8]; + + CIconPanel *m_pMetalIcon; + CIconPanel *m_pIcon; + CIconPanel *m_pBackground; + + const CObjectInfo* m_pObjectInfo; + + bool m_bClickable; + bool m_bMouseOver; + + bool m_bInStack; +}; + +#endif // BLUEPRINT_PANEL_H |