ArchiveUI showPrefixMap and hidePrefixMap
This commit is contained in:
@@ -16,6 +16,9 @@ interface ArchiveUI {
|
||||
*/
|
||||
var shortcutHandler(default, null):Null<KeyShortcutHandler<Entry>>;
|
||||
|
||||
function showPrefixMap(map:Map<String,ShortcutKey<Entry>>):Void;
|
||||
function hidePrefixMap():Void;
|
||||
|
||||
/**
|
||||
* A PlaygroundSystem that will display interactible entry representations
|
||||
*/
|
||||
|
@@ -11,7 +11,12 @@
|
||||
{
|
||||
(when (and ui ui.shortcutHandler)
|
||||
(unless setup
|
||||
(set ui.shortcutHandler.onSelectItem (invokeEntry.bind archive ui))
|
||||
(set ui.shortcutHandler.onSelectPrefixMap ui.showPrefixMap)
|
||||
(set ui.shortcutHandler.onSelectItem
|
||||
->e {
|
||||
(ui.hidePrefixMap)
|
||||
(invokeEntry archive ui e)
|
||||
})
|
||||
(set ui.shortcutHandler.onBadKey ->[key map] (ui.displayMessage "$key is not mapped to a shortcut in this context: $map"))
|
||||
(set setup true))
|
||||
|
||||
|
Reference in New Issue
Block a user