关键节点
This commit is contained in:
50
editor/app/Scene/EditorSceneBridge.h
Normal file
50
editor/app/Scene/EditorSceneBridge.h
Normal file
@@ -0,0 +1,50 @@
|
||||
#pragma once
|
||||
|
||||
#include <XCEngine/Components/GameObject.h>
|
||||
|
||||
#include <filesystem>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
namespace XCEngine::Components {
|
||||
|
||||
class Scene;
|
||||
|
||||
} // namespace XCEngine::Components
|
||||
|
||||
namespace XCEngine::UI::Editor::App {
|
||||
|
||||
struct EditorStartupSceneResult {
|
||||
bool ready = false;
|
||||
bool loadedFromDisk = false;
|
||||
std::filesystem::path scenePath = {};
|
||||
std::string sceneName = {};
|
||||
};
|
||||
|
||||
EditorStartupSceneResult EnsureEditorStartupScene(
|
||||
const std::filesystem::path& projectRoot);
|
||||
|
||||
::XCEngine::Components::Scene* GetActiveEditorScene();
|
||||
bool OpenEditorSceneAsset(const std::filesystem::path& scenePath);
|
||||
std::string MakeEditorGameObjectItemId(::XCEngine::Components::GameObject::ID id);
|
||||
std::optional<::XCEngine::Components::GameObject::ID> ParseEditorGameObjectItemId(
|
||||
std::string_view itemId);
|
||||
::XCEngine::Components::GameObject* FindEditorGameObject(std::string_view itemId);
|
||||
bool RenameEditorGameObject(
|
||||
std::string_view itemId,
|
||||
std::string_view newName);
|
||||
bool DeleteEditorGameObject(std::string_view itemId);
|
||||
std::string DuplicateEditorGameObject(std::string_view itemId);
|
||||
bool ReparentEditorGameObject(
|
||||
std::string_view itemId,
|
||||
std::string_view parentItemId);
|
||||
bool MoveEditorGameObjectBefore(
|
||||
std::string_view itemId,
|
||||
std::string_view targetItemId);
|
||||
bool MoveEditorGameObjectAfter(
|
||||
std::string_view itemId,
|
||||
std::string_view targetItemId);
|
||||
bool MoveEditorGameObjectToRoot(std::string_view itemId);
|
||||
|
||||
} // namespace XCEngine::UI::Editor::App
|
||||
Reference in New Issue
Block a user