mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Refactor pass #3
This commit is contained in:
@@ -598,7 +598,7 @@ namespace Nuake {
|
||||
{
|
||||
Engine::ExitPlayMode();
|
||||
|
||||
Engine::LoadScene(SceneSnapshot);
|
||||
Engine::SetCurrentScene(SceneSnapshot);
|
||||
Selection = EditorSelection();
|
||||
SetStatusMessage("Ready");
|
||||
}
|
||||
@@ -2640,7 +2640,7 @@ namespace Nuake {
|
||||
|
||||
Ref<Project> project = Project::New(String::Split(fileName, '.')[0], "no description", finalPath);
|
||||
Engine::LoadProject(project);
|
||||
Engine::LoadScene(Scene::New());
|
||||
Engine::SetCurrentScene(Scene::New());
|
||||
|
||||
Engine::GetCurrentWindow()->SetTitle("Nuake Engine - Editing " + project->Name);
|
||||
}
|
||||
@@ -2689,7 +2689,7 @@ namespace Nuake {
|
||||
}
|
||||
|
||||
scene->Path = FileSystem::AbsoluteToRelative(projectPath);
|
||||
Engine::LoadScene(scene);
|
||||
Engine::SetCurrentScene(scene);
|
||||
}
|
||||
|
||||
void EditorInterface::DrawMenuBar()
|
||||
@@ -2735,7 +2735,7 @@ namespace Nuake {
|
||||
ImGui::Separator();
|
||||
if (ImGui::MenuItem("New scene"))
|
||||
{
|
||||
Engine::LoadScene(Scene::New());
|
||||
Engine::SetCurrentScene(Scene::New());
|
||||
Selection = EditorSelection();
|
||||
SetStatusMessage("New scene created.");
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ namespace Nuake
|
||||
Nuake::FileSystem::SetRootDirectory(projectParentPath);
|
||||
auto project = Nuake::Project::New(projectTitle, description, finalLocation);
|
||||
Nuake::Engine::LoadProject(project);
|
||||
Nuake::Engine::LoadScene(Nuake::Scene::New());
|
||||
Nuake::Engine::SetCurrentScene(Nuake::Scene::New());
|
||||
project->Settings.PrimaryColor = Nuake::Color(primaryColor.x, primaryColor.y, primaryColor.z, primaryColor.w);
|
||||
project->Save();
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#include "TrenchbroomConfiguratorWindow.h"
|
||||
|
||||
#include <Engine.h>
|
||||
#include <src/Resource/Project.h>
|
||||
#include <src/UI/ImUI.h>
|
||||
#include <src/Core/OS.h>
|
||||
#include <src/Rendering/Textures/TextureManager.h>
|
||||
#include <src/Resource/Prefab.h>
|
||||
|
||||
|
||||
void TrenchbroomConfiguratorWindow::Update()
|
||||
{
|
||||
|
||||
|
||||
@@ -309,7 +309,7 @@ namespace Nuake
|
||||
|
||||
// auto project = Project::New(String::Split(fileName, '.')[0], "no description", finalPath);
|
||||
// Engine::LoadProject(project);
|
||||
// Engine::LoadScene(Scene::New());
|
||||
// Engine::SetCurrentScene(Scene::New());
|
||||
// project->Save();
|
||||
|
||||
// auto projectPreview = ProjectPreview();
|
||||
|
||||
@@ -24,7 +24,7 @@ Ref<Scene> SceneManager::GetScene(const UUID& uuid) const
|
||||
return Ref<Scene>();
|
||||
}
|
||||
|
||||
Ref<Scene> SceneManager::LoadScene(Ref<File> file)
|
||||
Ref<Scene> SceneManager::SetCurrentScene(Ref<File> file)
|
||||
{
|
||||
|
||||
return Ref<Scene>();
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Nuake
|
||||
bool IsSceneLoaded(const UUID& uuid) const;
|
||||
Ref<Scene> GetScene(const UUID& uuid) const;
|
||||
|
||||
Ref<Scene> LoadScene(Ref<File> file);
|
||||
Ref<Scene> SetCurrentScene(Ref<File> file);
|
||||
void UnloadScene(const UUID& uuid);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user