improve Prompt and use it to ask for level and file name when exporting

This commit is contained in:
binarycat
2022-03-05 14:29:01 -05:00
parent 8cfc6a9d18
commit edd064c2fd
4 changed files with 31 additions and 4 deletions

View File

@@ -65,7 +65,21 @@ function stepEditor()
end
if Keybind:CheckPressed(Keybind.debug.reload) then
ExportLevel("test")
Prompt:new({
name = "level name",
input = "unnamed",
func = function(name_prompt)
if name_prompt.canceled then return end
Prompt:new({
name = "filename",
input = "level.lua",
func = function(file_prompt)
if file_prompt.canceled then return end
ExportLevel(name_prompt.input, file_prompt.input)
end,
}):activate()
end,
}):activate()
end
if Keybind:CheckPressed(Keybind.debug.editor) then