EditorLandscapeCanvasComponent.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 <AzToolsFramework/ToolsComponents/EditorComponentBase.h>
  10. #include <GraphModel/Model/Graph.h>
  11. namespace LandscapeCanvas
  12. {
  13. inline constexpr AZ::TypeId EditorLandscapeCanvasComponentTypeId{ "{A3E4EBB8-DAC1-4D59-A9CD-64D6DA2F79F7}" };
  14. class EditorLandscapeCanvasComponent
  15. : public AzToolsFramework::Components::EditorComponentBase
  16. {
  17. public:
  18. AZ_EDITOR_COMPONENT(EditorLandscapeCanvasComponent, EditorLandscapeCanvasComponentTypeId, AzToolsFramework::Components::EditorComponentBase);
  19. virtual ~EditorLandscapeCanvasComponent() = default;
  20. static void Reflect(AZ::ReflectContext* reflection);
  21. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
  22. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  23. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  24. //////////////////////////////////////////////////////////////////////////
  25. // AZ::Component
  26. void Init() override;
  27. void Activate() override;
  28. void Deactivate() override;
  29. //////////////////////////////////////////////////////////////////////////
  30. //////////////////////////////////////////////////////////////////////////
  31. // AzToolsFramework::Components::EditorComponentBase
  32. void BuildGameEntity(AZ::Entity* gameEntity) override;
  33. //////////////////////////////////////////////////////////////////////////
  34. GraphModel::Graph m_graph;
  35. protected:
  36. AZ::Crc32 OnOpenGraphButtonClicked();
  37. AZStd::string GetOpenGraphButtonText() const;
  38. };
  39. }