EditorToolsApplicationAPI.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. namespace EditorInternal
  11. {
  12. /**
  13. * Bus used to make general requests to the ToolsApplication.
  14. */
  15. class EditorToolsApplicationRequests
  16. : public AZ::EBusTraits
  17. {
  18. public:
  19. using Bus = AZ::EBus<EditorToolsApplicationRequests>;
  20. //////////////////////////////////////////////////////////////////////////
  21. // EBusTraits overrides
  22. static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
  23. //////////////////////////////////////////////////////////////////////////
  24. virtual bool OpenLevel(AZStd::string_view levelName) = 0;
  25. virtual bool OpenLevelNoPrompt(AZStd::string_view levelName) = 0;
  26. virtual int CreateLevel(AZStd::string_view templateName, AZStd::string_view levelName, bool bUseTerrain) = 0;
  27. virtual int CreateLevelNoPrompt(AZStd::string_view templateName, AZStd::string_view levelName, int terrainExportTextureSize, bool useTerrain) = 0;
  28. virtual AZStd::string GetGameFolder() const = 0;
  29. virtual AZStd::string GetCurrentLevelName() const = 0;
  30. virtual AZStd::string GetCurrentLevelPath() const = 0;
  31. //! Retrieve old cry level file extension (With prepending '.')
  32. virtual const char* GetOldCryLevelExtension() const = 0;
  33. //! Retrieve default level file extension (With prepending '.')
  34. virtual const char* GetLevelExtension() const = 0;
  35. virtual void Exit() = 0;
  36. virtual void ExitNoPrompt() = 0;
  37. };
  38. using EditorToolsApplicationRequestBus = AZ::EBus<EditorToolsApplicationRequests>;
  39. } // namespace EditorInternal