VirtualGamepadButtonRequestBus.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  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/EBus/EBus.h>
  10. #include <AzCore/std/string/string.h>
  11. ////////////////////////////////////////////////////////////////////////////////////////////////////
  12. namespace VirtualGamepad
  13. {
  14. ////////////////////////////////////////////////////////////////////////////////////////////////
  15. class VirtualGamepadButtonRequests : public AZ::EBusTraits
  16. {
  17. public:
  18. ////////////////////////////////////////////////////////////////////////////////////////////
  19. // EBusTraits overrides
  20. static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById;
  21. static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
  22. using BusIdType = AZStd::string;
  23. ////////////////////////////////////////////////////////////////////////////////////////////
  24. //! Query whether the virtual button is currently pressed or not
  25. //! \return True if the virtual button is currently pressed, false otherwise
  26. virtual bool IsPressed() const = 0;
  27. };
  28. using VirtualGamepadButtonRequestBus = AZ::EBus<VirtualGamepadButtonRequests>;
  29. }