BsGUITooltipManager.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsPrerequisites.h"
  5. #include "BsModule.h"
  6. namespace BansheeEngine
  7. {
  8. /** @addtogroup GUI-Internal
  9. * @{
  10. */
  11. /** Manages displaying tooltips over GUI elements. */
  12. class BS_EXPORT GUITooltipManager : public Module<GUITooltipManager>
  13. {
  14. public:
  15. ~GUITooltipManager();
  16. /**
  17. * Shows a tooltip at the specified location. This will replace any previously shown tooltip.
  18. *
  19. * @param[in] widget GUI widget over which to display the tooltip.
  20. * @param[in] position Position of the tooltip, relative to the parent GUI widget.
  21. * @param[in] text Text to display on the tooltip.
  22. */
  23. void show(const GUIWidget& widget, const Vector2I& position, const WString& text);
  24. /** Hides the currently shown tooltip. */
  25. void hide();
  26. private:
  27. HSceneObject mTooltipSO;
  28. };
  29. /** @} */
  30. }