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.

53 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #include "DemoPage.h"
  8. #include <VGUI/IVGui.h>
  9. #include <KeyValues.h>
  10. #include <vgui_controls/ToggleButton.h>
  11. #include <vgui_controls/Tooltip.h>
  12. using namespace vgui;
  13. class TooltipsDemo: public DemoPage
  14. {
  15. public:
  16. TooltipsDemo(Panel *parent, const char *name);
  17. ~TooltipsDemo();
  18. private:
  19. };
  20. //-----------------------------------------------------------------------------
  21. // Purpose: Constructor
  22. //-----------------------------------------------------------------------------
  23. TooltipsDemo::TooltipsDemo(Panel *parent, const char *name) : DemoPage(parent, name)
  24. {
  25. ToggleButton *pButton = new ToggleButton (this, "RadioDesc5", "");
  26. pButton->GetTooltip()->SetTooltipFormatToSingleLine();
  27. LoadControlSettings("Demo/SampleToolTips.res");
  28. }
  29. //-----------------------------------------------------------------------------
  30. // Purpose: Destructor
  31. //-----------------------------------------------------------------------------
  32. TooltipsDemo::~TooltipsDemo()
  33. {
  34. }
  35. Panel* TooltipsDemo_Create(Panel *parent)
  36. {
  37. return new TooltipsDemo(parent, "TooltipsDemo");
  38. }