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.

57 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef CAREER_BUTTON_H
  7. #define CAREER_BUTTON_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include <vgui/VGUI.h>
  12. #include <vgui_controls/Frame.h>
  13. #include <vgui_controls/Controls.h>
  14. #include <vgui_controls/BitmapImagePanel.h>
  15. #include <vgui_controls/PanelListPanel.h>
  16. #include <vgui_controls/Button.h>
  17. #include <vgui/KeyCode.h>
  18. //--------------------------------------------------------------------------------------------------------------
  19. /**
  20. * This class adds border functionality necessary for next/prev/start buttons on map and bot screens
  21. */
  22. class CCareerButton : public vgui::Button
  23. {
  24. public:
  25. CCareerButton(vgui::Panel *parent, const char *buttonName, const char *buttonText, const char *image, bool textFirst );
  26. // Set armed button border attributes. Added in CCareerButton.
  27. virtual void SetArmedBorder(vgui::IBorder *border);
  28. virtual void ApplySchemeSettings(vgui::IScheme *pScheme);
  29. virtual void Paint();
  30. void SetImage( const char *image );
  31. protected:
  32. // Get button border attributes.
  33. virtual vgui::IBorder *GetBorder(bool depressed, bool armed, bool selected, bool keyfocus);
  34. vgui::IBorder *m_armedBorder;
  35. vgui::IImage *m_image;
  36. vgui::TextImage *m_textImage;
  37. bool m_textFirst;
  38. int m_textPad;
  39. int m_imagePad;
  40. Color m_textNormalColor;
  41. Color m_textDisabledColor;
  42. private:
  43. typedef vgui::Button BaseClass;
  44. };
  45. #endif // CAREER_BUTTON_H