Files
o3de/Code/Editor/EditorToolsApplication.h
T
Steve Pham 38261d0800 Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
2021-07-16 15:25:48 -07:00

75 lines
2.5 KiB
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzToolsFramework/Application/ToolsApplication.h>
#include "Core/EditorMetricsPlainTextNameRegistration.h"
#include "EditorToolsApplicationAPI.h"
namespace EditorInternal
{
// Override the ToolsApplication so that we can special case when the config file is not
// found and give the user of the Editor a specific message about it.
class EditorToolsApplication
: public AzToolsFramework::ToolsApplication
, public EditorToolsApplicationRequests::Bus::Handler
{
public:
EditorToolsApplication(int* argc, char*** argv);
~EditorToolsApplication();
bool IsStartupAborted() const;
void RegisterCoreComponents() override;
AZ::ComponentTypeList GetRequiredSystemComponents() const;
void StartCommon(AZ::Entity* systemEntity) override;
using AzToolsFramework::ToolsApplication::Start;
bool Start();
//////////////////////////////////////////////////////////////////////////
// AzFramework::ApplicationRequests::Bus
void QueryApplicationType(AZ::ApplicationTypeQuery& appType) const override;
//////////////////////////////////////////////////////////////////////////
// From AzToolsFramework::ToolsApplication
void CreateReflectionManager() override;
void Reflect(AZ::ReflectContext* context) override;
protected:
// From EditorToolsApplicationRequests
bool OpenLevel(AZStd::string_view levelName) override;
bool OpenLevelNoPrompt(AZStd::string_view levelName) override;
int CreateLevel(AZStd::string_view levelName, bool bUseTerrain) override;
int CreateLevelNoPrompt(AZStd::string_view levelName, int terrainExportTextureSize, bool useTerrain) override;
void Exit() override;
void ExitNoPrompt() override;
AZStd::string GetGameFolder() const override;
AZStd::string GetCurrentLevelName() const override;
AZStd::string GetCurrentLevelPath() const override;
const char* GetOldCryLevelExtension() const override;
const char* GetLevelExtension() const override;
private:
static constexpr char DefaultLevelFolder[] = "Levels";
bool m_StartupAborted = false;
Editor::EditorMetricsPlainTextNameRegistrationBusListener m_metricsPlainTextRegistrar;
};
}