press dd to redefine last delay length
This commit is contained in:
@@ -44,6 +44,7 @@ interface Director<Set:Cloneable<Set>, Actor, Sound, Song, Prop, VoiceTrack, Cam
|
|||||||
function showPauseMenu(resume:Continuation):Void;
|
function showPauseMenu(resume:Continuation):Void;
|
||||||
|
|
||||||
function chooseString(prompt:String, choices:Array<String>, submit:String->Void):Void;
|
function chooseString(prompt:String, choices:Array<String>, submit:String->Void):Void;
|
||||||
|
function enterString(prompt:String, submit:String->Void):Void;
|
||||||
|
|
||||||
function defineStagePosition(submit:StagePosition->Void):Void;
|
function defineStagePosition(submit:StagePosition->Void):Void;
|
||||||
function defineLightSource(submit:LightSource->Void):Void;
|
function defineLightSource(submit:LightSource->Void):Void;
|
||||||
|
@@ -20,6 +20,10 @@
|
|||||||
(prop :Map<String,Int> voiceTracksPerActor (new Map))
|
(prop :Map<String,Int> voiceTracksPerActor (new Map))
|
||||||
|
|
||||||
(prop &mut :DelayHandling delayHandling AutoWithSkip)
|
(prop &mut :DelayHandling delayHandling AutoWithSkip)
|
||||||
|
|
||||||
|
(prop &mut :String lastDelay "")
|
||||||
|
(prop &mut :Float lastDelayLength 0)
|
||||||
|
|
||||||
|
|
||||||
// Mutable representation of frames in time:
|
// Mutable representation of frames in time:
|
||||||
(prop :FuzzyMap<Scene<Set,Actor,Prop,Camera>> scenes (new FuzzyMap<Scene<Set,Actor,Prop,Camera>>))
|
(prop :FuzzyMap<Scene<Set,Actor,Prop,Camera>> scenes (new FuzzyMap<Scene<Set,Actor,Prop,Camera>>))
|
||||||
@@ -230,6 +234,13 @@
|
|||||||
->cc (director.showPauseMenu cc))
|
->cc (director.showPauseMenu cc))
|
||||||
|
|
||||||
(#when debug
|
(#when debug
|
||||||
|
(shortcutHandler.registerItem "[d]efine [d]elay"
|
||||||
|
->cc
|
||||||
|
(director.enterString "Redefine $lastDelay from $lastDelayLength sec?"
|
||||||
|
->lengthStr
|
||||||
|
(let [length (Std.parseFloat lengthStr)]
|
||||||
|
(delayLengths.put lastDelay (new DelayLength length))
|
||||||
|
(cc))))
|
||||||
(shortcutHandler.registerItem "[d]efine [p]osition"
|
(shortcutHandler.registerItem "[d]efine [p]osition"
|
||||||
->cc
|
->cc
|
||||||
(director.chooseString "Which position?" (dictGet positionsInScene sceneKey)
|
(director.chooseString "Which position?" (dictGet positionsInScene sceneKey)
|
||||||
@@ -304,7 +315,11 @@
|
|||||||
(hollywooMethod :Void delay true [:Dynamic length :Continuation cc]
|
(hollywooMethod :Void delay true [:Dynamic length :Continuation cc]
|
||||||
(let [sec (typeCase [length]
|
(let [sec (typeCase [length]
|
||||||
([:Float sec] sec)
|
([:Float sec] sec)
|
||||||
([:String key] .length (delayLengths.get key))
|
([:String key]
|
||||||
|
(let [lengthFloat .length (delayLengths.get key)]
|
||||||
|
(set lastDelay key)
|
||||||
|
(set lastDelayLength lengthFloat)
|
||||||
|
lengthFloat))
|
||||||
(never otherwise))]
|
(never otherwise))]
|
||||||
(case delayHandling
|
(case delayHandling
|
||||||
(Auto
|
(Auto
|
||||||
|
Reference in New Issue
Block a user