UIEventListener.h 536 B

123456789101112131415161718192021222324
  1. // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
  2. // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
  3. // SPDX-License-Identifier: MIT
  4. #pragma once
  5. enum EUIEvent
  6. {
  7. EVENT_BUTTON_DOWN,
  8. EVENT_MENU_DEACTIVATED,
  9. };
  10. class UIElement;
  11. /// Callback class for handling events from UI elements
  12. class UIEventListener
  13. {
  14. public:
  15. /// Destructor
  16. virtual ~UIEventListener() = default;
  17. /// Handle an UI event, function should return true if event was handled
  18. virtual bool HandleUIEvent(EUIEvent inEvent, UIElement *inSender) = 0;
  19. };