This commit is contained in:
2021-06-23 17:21:03 -06:00
parent 34875a277a
commit 1602b873bc
4 changed files with 156 additions and 20 deletions

View File

@@ -6,25 +6,30 @@ interface ArchiveUI {
/**
* Prompt the user to enter text
*/
function enterText(?minLength:Int, ?maxLength:Int):String;
function enterText(prompt:String, resolve:(String) -> Void, ?minLength:Int, ?maxLength:Float):Void;
/**
* Prompt the user to enter a number
*/
function enterNumber(?min:Float, ?max:Float, ?inStepsOf:Float):Float;
function enterNumber(prompt:String, resolve:(Float) -> Void, ?min:Float, ?max:Float, ?inStepsOf:Float):Void;
/**
* Prompt the user to choose a single Entry
*/
function chooseEntry(archive:Archive):Entry;
function chooseEntry(prompt:String, archive:Archive, resolve:(Entry) -> Void):Void;
/**
* Prompt the user to choose multiple Entries
*/
function chooseEntries(archive:Archive, ?min:Int, ?max:Int):Array<Entry>;
function chooseEntries(prompt:String, archive:Archive, resolve:(Array<Entry>) -> Void, ?min:Int, ?max:Float):Void;
/**
* Update the interface to reflect changes made to Entries through commands
*/
function handleChanges(changeSet:ChangeSet):Void;
}
/**
* Tell the user that something is wrong
*/
function reportError(error:String):Void;
}