UiHierarchyInteractivityToggleBus.h 1.1 KB

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <AzCore/Component/ComponentBus.h>
  10. #include <LyShine/UiBase.h>
  11. // The event bus that interfaces with the UiHierarchyInteractivityToggle Component.
  12. // Used to toggle interactivity to the current entity and descendants.
  13. class UiHierarchyInteractivityToggleInterface
  14. : public AZ::ComponentBus
  15. {
  16. public:
  17. static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
  18. //Interactive
  19. //! The root event call used to manipulate the Interactive state.
  20. virtual bool SetInteractivity(bool enabled) = 0;
  21. virtual bool SetParentInteractivity(bool parentEnabled) = 0;
  22. //! Getter to see the current interactive state.
  23. virtual bool GetInteractiveState() = 0;
  24. };
  25. typedef AZ::EBus<UiHierarchyInteractivityToggleInterface> UiHierarchyInteractivityToggleBus;