diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8ad74f7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4709183 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Godot 4+ specific ignores +.godot/ diff --git a/.vs/ProjectEvaluation/shark ui.metadata.v5.1 b/.vs/ProjectEvaluation/shark ui.metadata.v5.1 new file mode 100644 index 0000000..981dc3d Binary files /dev/null and b/.vs/ProjectEvaluation/shark ui.metadata.v5.1 differ diff --git a/.vs/ProjectEvaluation/shark ui.projects.v5.1 b/.vs/ProjectEvaluation/shark ui.projects.v5.1 new file mode 100644 index 0000000..48e3f04 Binary files /dev/null and b/.vs/ProjectEvaluation/shark ui.projects.v5.1 differ diff --git a/.vs/SHARK UI/DesignTimeBuild/.dtbcache.v2 b/.vs/SHARK UI/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..387e4c2 Binary files /dev/null and b/.vs/SHARK UI/DesignTimeBuild/.dtbcache.v2 differ diff --git a/.vs/SHARK UI/FileContentIndex/f012726e-a1bf-422b-aa55-e23860b8aad6.vsidx b/.vs/SHARK UI/FileContentIndex/f012726e-a1bf-422b-aa55-e23860b8aad6.vsidx new file mode 100644 index 0000000..5d1df81 Binary files /dev/null and b/.vs/SHARK UI/FileContentIndex/f012726e-a1bf-422b-aa55-e23860b8aad6.vsidx differ diff --git a/.vs/SHARK UI/FileContentIndex/read.lock b/.vs/SHARK UI/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/.vs/SHARK UI/v17/.futdcache.v2 b/.vs/SHARK UI/v17/.futdcache.v2 new file mode 100644 index 0000000..f0291aa Binary files /dev/null and b/.vs/SHARK UI/v17/.futdcache.v2 differ diff --git a/.vs/SHARK UI/v17/.suo b/.vs/SHARK UI/v17/.suo new file mode 100644 index 0000000..a8f2399 Binary files /dev/null and b/.vs/SHARK UI/v17/.suo differ diff --git a/SHARK UI.csproj b/SHARK UI.csproj new file mode 100644 index 0000000..5a9659c --- /dev/null +++ b/SHARK UI.csproj @@ -0,0 +1,7 @@ + + + net6.0 + true + SHARKUI + + \ No newline at end of file diff --git a/SHARK UI.sln b/SHARK UI.sln new file mode 100644 index 0000000..037973d --- /dev/null +++ b/SHARK UI.sln @@ -0,0 +1,19 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SHARK UI", "SHARK UI.csproj", "{C7EB7DDC-714A-4E06-8F17-D5F706C58F31}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + ExportDebug|Any CPU = ExportDebug|Any CPU + ExportRelease|Any CPU = ExportRelease|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C7EB7DDC-714A-4E06-8F17-D5F706C58F31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C7EB7DDC-714A-4E06-8F17-D5F706C58F31}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C7EB7DDC-714A-4E06-8F17-D5F706C58F31}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU + {C7EB7DDC-714A-4E06-8F17-D5F706C58F31}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU + {C7EB7DDC-714A-4E06-8F17-D5F706C58F31}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU + {C7EB7DDC-714A-4E06-8F17-D5F706C58F31}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU + EndGlobalSection +EndGlobal diff --git a/Scripts/top.cs b/Scripts/top.cs new file mode 100644 index 0000000..ed13719 --- /dev/null +++ b/Scripts/top.cs @@ -0,0 +1,188 @@ +using Godot; +using System; +using System.Threading.Tasks; +using System.Diagnostics; +using System.IO; + +public partial class top : Control +{ + //cmdLine CL = new cmdLine(); + // Called when the node enters the scene tree for the first time. + public override void _Ready() + { + //load settings + settingsLocation = System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData), settingsLocation); + GD.Print(settingsLocation); + if (!System.IO.File.Exists(settingsLocation)) + { + GD.Print("File doesn't exist"); + settingsCurrent = false; + } + else + { + string s = File.ReadAllText (settingsLocation); + if(Directory.Exists(s)) { sharkLocation = s;} + } + outputLocation = System.IO.Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Desktop), "Mori-Shark-Factory\\"); + if (!Directory.Exists(outputLocation)) + { + Directory.CreateDirectory(outputLocation); + } + opt = GetNode("OptionButton"); + tex = GetNode("Data Entry/text"); + } + string settingsLocation = "mori-SHARK-factory\\settings.txt"; + string settingsDirectory = "mori-SHARK-factory"; + OptionButton opt; + TextEdit tex; + string sharkLocation; + string outputLocation; + bool settingsCurrent; + // Called every frame. 'delta' is the elapsed time since the previous frame. + public void _on_text_edit_text_changed() + { + GD.Print("changed"); + if(opt.Text == "Prompt") + { + prompt = tex.Text; + GD.Print(opt.Text + " text is now: " + prompt); + } + if(opt.Text == "Negative Prompt") + { + negativePrompt = tex.Text; + } + if(opt.Text == "Seed") + { + + int c = seed; + int.TryParse(tex.Text, out c); + seed = c; + } + if(opt.Text == "Shark Install") + { + sharkLocation = tex.Text; + settingsCurrent = false; + } + if(opt.Text == "Output Directory") + { + outputLocation = tex.Text; + } + + } + public void doop(int blah) + { + GD.Print("Something or other"); + } + public void _onOptionChange(int blah) + { + if (opt.Text == "Prompt") { + GetNode("Prompts").Visible = true; + GetNode("Data Entry").Visible = false; + } else { GetNode("Prompts").Visible = false; GetNode("Data Entry").Visible = true; } + if(opt.Text == "Negative Prompt") { tex.Text = negativePrompt; } + if(opt.Text == "Seed") { tex.Text = seed.ToString(); } + if (opt.Text == "Shark Install") { tex.Text = sharkLocation; } + if(opt.Text == "Output Directory") { tex.Text = outputLocation; } + } + + public override void _Process(double delta) + { + if(werking == true) + { + if (ta.IsCompleted) + { + werking = false; + GetNode