VirtualGamepadThumbStickRequestBus.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  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/Math/Vector2.h>
  11. #include <AzCore/std/string/string.h>
  12. ////////////////////////////////////////////////////////////////////////////////////////////////////
  13. namespace VirtualGamepad
  14. {
  15. ////////////////////////////////////////////////////////////////////////////////////////////////
  16. class VirtualGamepadThumbStickRequests : public AZ::EBusTraits
  17. {
  18. public:
  19. ////////////////////////////////////////////////////////////////////////////////////////////
  20. // EBusTraits overrides
  21. static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById;
  22. static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
  23. using BusIdType = AZStd::string;
  24. ////////////////////////////////////////////////////////////////////////////////////////////
  25. //! Get the current virtual thumb-stick axis values
  26. //! \return Current virtual thumb-stick axis values
  27. virtual AZ::Vector2 GetCurrentAxisValuesNormalized() const = 0;
  28. };
  29. using VirtualGamepadThumbStickRequestBus = AZ::EBus<VirtualGamepadThumbStickRequests>;
  30. }