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

@@ -44,6 +44,7 @@ function Keybind:CheckDown(action)
end
end
-- relies on being called exactly once per frame to be accurate.
function Keybind:CheckPressed(action)
if Keybind:CheckDown(action) then
if not action.pressed then
@@ -77,6 +78,7 @@ function Keybind:RemoveKeys(action)
action.keys = {}
end
-- this prolly should be used by Prompt:keypressed()
function Keybind:hasKey(action, key)
for _, v in pairs(action.keys) do
if v == key then