WIP KeyShortcutWindow for NAT flixel

This commit is contained in:
2022-08-10 13:51:12 +00:00
parent a32e5fd09b
commit 45df11a7b7
5 changed files with 50 additions and 9 deletions

View File

@@ -30,11 +30,14 @@
(set currentMap null)
(tryCall onFinishOrCancel))
(method clear []
(rootMap.clear))
(method handleKey [:String key]
(unless currentMap (tryCallOrThrow onBadKey "Tried to handle key $key without calling start() first" key null))
(if (= cancelKey key)
(cancel)
(case (dictGet currentMap key)
(case ~(dictGet currentMap key)
((Final item)
(tryCall onSelectItem item)
(cancel))