BsGUIVirtualButtonEvent.h 871 B

123456789101112131415161718192021222324252627282930313233
  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 "BsVirtualInput.h"
  6. namespace BansheeEngine
  7. {
  8. /** @addtogroup GUI
  9. * @{
  10. */
  11. /** Holds data about a GUI event that happens when a virtual button is pressed. */
  12. class BS_EXPORT GUIVirtualButtonEvent
  13. {
  14. public:
  15. GUIVirtualButtonEvent()
  16. { }
  17. /** Returns the virtual button the event is referring to. */
  18. const VirtualButton& getButton() const { return mButton; }
  19. private:
  20. friend class GUIManager;
  21. /** Initializes the data for the event. */
  22. void setButton(const VirtualButton& button) { mButton = button; }
  23. VirtualButton mButton;
  24. };
  25. /** @} */
  26. }