MessagePopupModule.cpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. #include <AzCore/Memory/SystemAllocator.h>
  9. #include <MessagePopupSystemComponent.h>
  10. #include <LyShineMessagePopup.h>
  11. #include <IGem.h>
  12. namespace MessagePopup
  13. {
  14. class MessagePopupModule
  15. : public CryHooksModule
  16. {
  17. public:
  18. AZ_RTTI(MessagePopupModule, "{79CE538B-D7D1-4066-8C0E-5794121BE8A8}", CryHooksModule);
  19. AZ_CLASS_ALLOCATOR(MessagePopupModule, AZ::SystemAllocator);
  20. MessagePopupModule()
  21. : CryHooksModule()
  22. {
  23. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  24. m_descriptors.insert(m_descriptors.end(), {
  25. MessagePopupSystemComponent::CreateDescriptor(),
  26. });
  27. m_descriptors.insert(m_descriptors.end(), {
  28. LyShineMessagePopup::CreateDescriptor(),
  29. });
  30. }
  31. /**
  32. * Add required SystemComponents to the SystemEntity.
  33. */
  34. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  35. {
  36. return AZ::ComponentTypeList{
  37. azrtti_typeid<MessagePopupSystemComponent>(),
  38. azrtti_typeid<LyShineMessagePopup>(),
  39. };
  40. }
  41. };
  42. }
  43. #if defined(O3DE_GEM_NAME)
  44. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME), MessagePopup::MessagePopupModule)
  45. #else
  46. AZ_DECLARE_MODULE_CLASS(Gem_MessagePopup, MessagePopup::MessagePopupModule)
  47. #endif