From b4c3b5ed189e1e708374fc5e33d4986dfc4ce753 Mon Sep 17 00:00:00 2001 From: max Date: Wed, 24 Jul 2024 21:40:10 +0200 Subject: [PATCH] naming --- Nerfed.Editor/Project/Project.cs | 36 ++++++++++++++--------------- Nerfed.Editor/Project/ProjectGui.cs | 12 +++++----- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Nerfed.Editor/Project/Project.cs b/Nerfed.Editor/Project/Project.cs index 1a09d43..84a3c10 100644 --- a/Nerfed.Editor/Project/Project.cs +++ b/Nerfed.Editor/Project/Project.cs @@ -7,9 +7,9 @@ internal static class EditorProject internal static Compiler.Project Project { get; private set; } = null; internal static string ProjectFilePath { get; private set; } = string.Empty; internal static string ProjectSolutionFilePath { get; private set; } = string.Empty; - internal static string ProjectPath { get; private set; } = string.Empty; - internal static string ProjectContentPath { get; private set; } = string.Empty; - internal static string ProjectTempPath { get; private set; } = string.Empty; + internal static string ProjectDirectory { get; private set; } = string.Empty; + internal static string ProjectContentDirectory { get; private set; } = string.Empty; + internal static string ProjectTempDirectory { get; private set; } = string.Empty; internal static bool Create(string projectFilePath, string projectName) { @@ -26,20 +26,20 @@ internal static bool Create(string projectFilePath, string projectName) return true; } - internal static bool Open(string path) + internal static bool Open(string projectFilePath) { Close(); - if(!Compiler.Project.Open(path, out Compiler.Project project)) + if(!Compiler.Project.Open(projectFilePath, out Compiler.Project project)) { return false; } Project = project; - ProjectFilePath = path; - ProjectPath = Path.GetDirectoryName(path); + ProjectFilePath = projectFilePath; + ProjectDirectory = Path.GetDirectoryName(projectFilePath); - string projectSolutionFilePath = Path.Combine(ProjectPath, Project.Name + Compiler.Generator.SolutionExtensionName); + string projectSolutionFilePath = Path.Combine(ProjectDirectory, Project.Name + Compiler.Generator.SolutionExtensionName); if (File.Exists(projectSolutionFilePath)) { ProjectSolutionFilePath = projectSolutionFilePath; @@ -58,9 +58,9 @@ internal static void Close() Project = null; ProjectFilePath = string.Empty; ProjectSolutionFilePath = string.Empty; - ProjectPath = string.Empty; - ProjectContentPath = string.Empty; - ProjectTempPath = string.Empty; + ProjectDirectory = string.Empty; + ProjectContentDirectory = string.Empty; + ProjectTempDirectory = string.Empty; } internal static bool Save() @@ -90,24 +90,24 @@ internal static void GenerateSolution() return; } - Nerfed.Compiler.Generator.GenerateSolution(ProjectPath, Project, out string solutionFilePath); + Nerfed.Compiler.Generator.GenerateSolution(ProjectDirectory, Project, out string solutionFilePath); ProjectSolutionFilePath = solutionFilePath; } private static void SetupDefaultFolders() { - if (Project == null || ProjectPath == null) + if (Project == null || ProjectDirectory == null) { return; } - string contentPath = Path.Combine(ProjectPath, "Content"); + string contentPath = Path.Combine(ProjectDirectory, "Content"); if (!Directory.Exists(contentPath)) { Directory.CreateDirectory(contentPath); } - ProjectContentPath = contentPath; - string scriptsPath = Path.Combine(ProjectContentPath, "Scripts"); + ProjectContentDirectory = contentPath; + string scriptsPath = Path.Combine(ProjectContentDirectory, "Scripts"); if (!Directory.Exists(scriptsPath)) { Directory.CreateDirectory(scriptsPath); @@ -125,11 +125,11 @@ private static void SetupDefaultFolders() Compiler.AssemblyDefinition.Create(gameplayRuntimePath, "Gameplay", out Compiler.AssemblyDefinition project); } - string tempPath = Path.Combine(ProjectPath, "Temp"); + string tempPath = Path.Combine(ProjectDirectory, "Temp"); if (!Directory.Exists(tempPath)) { Directory.CreateDirectory(tempPath); } - ProjectTempPath = tempPath; + ProjectTempDirectory = tempPath; } } \ No newline at end of file diff --git a/Nerfed.Editor/Project/ProjectGui.cs b/Nerfed.Editor/Project/ProjectGui.cs index c83ab77..25520fd 100644 --- a/Nerfed.Editor/Project/ProjectGui.cs +++ b/Nerfed.Editor/Project/ProjectGui.cs @@ -4,7 +4,7 @@ namespace Nerfed.Editor.Project { internal static class ProjectGui { - private static string projectPath = string.Empty; + private static string projectDirectory = string.Empty; private static string projectName = string.Empty; private static string projectFilePath = string.Empty; @@ -13,10 +13,10 @@ internal static void OnGui() ImGui.Begin("Project"); ImGui.BeginGroup(); - ImGui.InputText("Project Path", ref projectPath, 512); + ImGui.InputText("Project Directory", ref projectDirectory, 512); ImGui.InputText("Project Name", ref projectName, 512); - string newProjectFilePath = Path.Combine(projectPath, ".project"); + string newProjectFilePath = Path.Combine(projectDirectory, ".project"); ImGui.Text(newProjectFilePath); if (ImGui.Button("Create Project")) @@ -39,9 +39,9 @@ internal static void OnGui() ImGui.Text(EditorProject.Project.Name); ImGui.Text(EditorProject.ProjectFilePath); ImGui.Text(EditorProject.ProjectSolutionFilePath); - ImGui.Text(EditorProject.ProjectPath); - ImGui.Text(EditorProject.ProjectContentPath); - ImGui.Text(EditorProject.ProjectTempPath); + ImGui.Text(EditorProject.ProjectDirectory); + ImGui.Text(EditorProject.ProjectContentDirectory); + ImGui.Text(EditorProject.ProjectTempDirectory); } else {