Nerfed/Nerfed.Editor/Project/ProjectGui.cs

42 lines
1.1 KiB
C#
Raw Normal View History

2024-07-19 15:24:50 +02:00
using ImGuiNET;
namespace Nerfed.Editor.Project
{
internal static class ProjectGui
{
private static string projectDirectory = string.Empty;
private static string projectName = string.Empty;
internal static void OnGui()
{
ImGui.Begin("Project");
ImGui.InputText("Project Directory", ref projectDirectory, 512);
ImGui.InputText("Project Name", ref projectName, 512);
if (ImGui.Button("Create Project"))
{
Project.Create(projectDirectory, projectName);
}
if(ImGui.Button("Open Project"))
{
Project.Open(projectDirectory);
}
ImGui.Text("Loaded project: ");
if(Project.LoadedConfig != null)
{
ImGui.Text(Project.LoadedConfig.Name);
ImGui.Text(Project.LoadedConfig.Version.ToString());
ImGui.Text(Project.LoadedConfig.RuntimeProject);
}
else
{
ImGui.Text("None");
}
ImGui.End();
}
}
}