Removed Wren script references in the UI

This commit is contained in:
WiggleWizard
2024-09-16 10:18:32 +01:00
parent bb43bbe1b8
commit d338a98c9b
5 changed files with 0 additions and 191 deletions

View File

@@ -657,36 +657,6 @@ namespace Nuake
}
}
if (ImGui::MenuItem("Wren Script"))
{
std::string path = FileDialog::SaveFile("*.wren");
if (!String::EndsWith(path, ".wren"))
{
path += ".wren";
}
if (!path.empty())
{
std::string fileName = String::ToUpper(FileSystem::GetFileNameFromPath(path));
fileName = String::RemoveWhiteSpace(fileName);
if(!String::IsDigit(fileName[0]))
{
FileSystem::BeginWriteFile(path, true);
FileSystem::WriteLine(TEMPLATE_SCRIPT_FIRST + fileName + TEMPLATE_SCRIPT_SECOND);
FileSystem::EndWriteFile();
RefreshFileBrowser();
}
else
{
Logger::Log("Cannot create script files that starts with a number.", "filesystem", CRITICAL);
}
}
}
ImGui::EndMenu();
}