Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef BLUEPRINT_PANEL_H
  8. #define BLUEPRINT_PANEL_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <vgui_controls/Panel.h>
  13. #include <vgui_controls/Frame.h>
  14. #include "tf_shareddefs.h"
  15. #include "IconPanel.h"
  16. //-----------------------------------------------------------------------------
  17. // Purpose:
  18. //-----------------------------------------------------------------------------
  19. class CBlueprintPanel : public vgui::EditablePanel
  20. {
  21. DECLARE_CLASS_SIMPLE( CBlueprintPanel, vgui::EditablePanel );
  22. public:
  23. CBlueprintPanel( vgui::Panel *parent, const char *name );
  24. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  25. void SetObjectInfo( const CObjectInfo* pNewInfo );
  26. const CObjectInfo* GetObjectInfo( void ) { return m_pObjectInfo; }
  27. // Button functionality
  28. void SetActAsButton( bool bClickable, bool bMouseOver );
  29. virtual void OnCursorEntered();
  30. virtual void OnCursorExited();
  31. virtual void OnMousePressed(vgui::MouseCode code);
  32. virtual void OnMouseDoublePressed(vgui::MouseCode code);
  33. virtual void OnMouseReleased(vgui::MouseCode code);
  34. MESSAGE_FUNC_INT_INT( OnCursorMoved, "OnCursorMoved", x, y );
  35. void SetInStack( bool bVal ) { m_bInStack = bVal; }
  36. bool IsInStack( void ) { return m_bInStack; }
  37. vgui::Label *m_pItemNameLabel;
  38. vgui::Label *m_pItemCostLabel;
  39. char m_pszCost[8];
  40. CIconPanel *m_pMetalIcon;
  41. CIconPanel *m_pIcon;
  42. CIconPanel *m_pBackground;
  43. const CObjectInfo* m_pObjectInfo;
  44. bool m_bClickable;
  45. bool m_bMouseOver;
  46. bool m_bInStack;
  47. };
  48. #endif // BLUEPRINT_PANEL_H