ArchiveUI.chooseBetwoonStrings
This commit is contained in:
@@ -23,10 +23,13 @@ enum CommandArgType {
|
||||
// Make the user select Entry(s) when called interactively
|
||||
OneEntry; // This constructor must be disambiguated from the typedef "Entry"
|
||||
Entries(min:Null<Int>, max:Null<Int>);
|
||||
|
||||
// TODO Tag -- make sure a tag input is a valid haxe variable name for tagsMatch compatibility
|
||||
// TODO VarTag
|
||||
// What I really want is tags autocomplete, which is UNREALISTIC
|
||||
|
||||
// TODO playground name -- choose from archive.playgrounds
|
||||
// TODO File
|
||||
// TODO Files
|
||||
|
||||
Position;
|
||||
|
||||
|
@@ -407,6 +407,13 @@
|
||||
(SelectEntries [])
|
||||
(when playgroundSystem (playgroundSystem.switchPlaygroundKey name))
|
||||
[])
|
||||
|
||||
(defCommand ChoosePlayground []
|
||||
(ui.chooseBetweenStrings
|
||||
"Choose a playground:"
|
||||
(for =>key _ archive.playgrounds (if (= key "default") (continue) key))
|
||||
->pg (SwitchPlayground pg))
|
||||
[])
|
||||
|
||||
(defCommand AddConnections [entries (SelectedEntries 1 null) entriesToConnect (Entries 1 null)]
|
||||
(for e entries
|
||||
|
@@ -75,4 +75,9 @@ interface ArchiveUI {
|
||||
* A way to tell NAT where the cursor is
|
||||
*/
|
||||
function cursorPosition():Option<Position>;
|
||||
|
||||
/**
|
||||
* Prompt the user between some string options
|
||||
*/
|
||||
function chooseBetweenStrings(prompt:String, choices:Array<String>, resolve:String->Void):Void;
|
||||
}
|
||||
|
Reference in New Issue
Block a user