fix more key shortcut conflicts
This commit is contained in:
@@ -560,37 +560,39 @@
|
||||
cc ->(resume)]
|
||||
(shortcutHandler.registerItem "[d]efine prop [s]cale"
|
||||
->cc
|
||||
(director.chooseString "Which prop?" (withCancel (dictGet propsInScene sceneKey))
|
||||
(unlessCancel propKey
|
||||
(withFunctions
|
||||
[
|
||||
(definePropScale [cc]
|
||||
(let [lastScale .value (propScales.get propKey)]
|
||||
(director.enterString "Redefine $propKey scale from ${lastScale}?"
|
||||
->scaleStr
|
||||
(let [scale (Std.parseFloat scaleStr)]
|
||||
(if (Math.isNaN scale)
|
||||
(print "Failed to parse ${scaleStr}. leaving value the same")
|
||||
(propScales.put propKey (new JsonFloat scale)))
|
||||
// Re-scale props immediately
|
||||
(doFor prop .props (dictGet scenes sceneKey)
|
||||
(flxDirector.scaleProp prop.prop))
|
||||
(cc)))))
|
||||
]
|
||||
(set lastCommand definePropScale)
|
||||
(definePropScale cc)))))
|
||||
(unless doingSomething (set doingSomething true)
|
||||
(director.chooseString "Which prop?" (withCancel (dictGet propsInScene sceneKey))
|
||||
(unlessCancel propKey
|
||||
(withFunctions
|
||||
[
|
||||
(definePropScale [cc]
|
||||
(let [lastScale .value (propScales.get propKey)]
|
||||
(director.enterString "Redefine $propKey scale from ${lastScale}?"
|
||||
->scaleStr
|
||||
(let [scale (Std.parseFloat scaleStr)]
|
||||
(if (Math.isNaN scale)
|
||||
(print "Failed to parse ${scaleStr}. leaving value the same")
|
||||
(propScales.put propKey (new JsonFloat scale)))
|
||||
// Re-scale props immediately
|
||||
(doFor prop .props (dictGet scenes sceneKey)
|
||||
(flxDirector.scaleProp prop.prop))
|
||||
(cc)))))
|
||||
]
|
||||
(set lastCommand definePropScale)
|
||||
(definePropScale cc))))))
|
||||
(shortcutHandler.registerItem "[d]efine [z] of a position"
|
||||
->cc
|
||||
(director.chooseString "Which position?" (withCancel (dictGet positionsInScene sceneKey))
|
||||
(unlessCancel positionKey
|
||||
(let [position (stagePositions.get positionKey)]
|
||||
(director.enterString "Redefine z from ${position.z}?"
|
||||
->zStr {
|
||||
(let [z (Std.parseFloat zStr)]
|
||||
(if (Math.isNaN z)
|
||||
(print "Failed to parse ${zStr}. leaving value the same")
|
||||
(stagePositions.put positionKey (new StagePosition position.x position.y z)))
|
||||
(cc)) })))))))
|
||||
(unless doingSomething (set doingSomething true)
|
||||
(director.chooseString "Which position?" (withCancel (dictGet positionsInScene sceneKey))
|
||||
(unlessCancel positionKey
|
||||
(let [position (stagePositions.get positionKey)]
|
||||
(director.enterString "Redefine z from ${position.z}?"
|
||||
->zStr {
|
||||
(let [z (Std.parseFloat zStr)]
|
||||
(if (Math.isNaN z)
|
||||
(print "Failed to parse ${zStr}. leaving value the same")
|
||||
(stagePositions.put positionKey (new StagePosition position.x position.y z)))
|
||||
(cc)) }))))))))
|
||||
|
||||
(prop &mut :flixel.ui.FlxBar bar null)
|
||||
(prop &mut :Int barProgress 0)
|
||||
@@ -797,13 +799,14 @@
|
||||
(#when debug
|
||||
(preload
|
||||
(.registerItem (director.shortcutHandler) "[n]ext label"
|
||||
->cc {
|
||||
(prepareForSkip)
|
||||
(runFromNextLabel skipMovie)
|
||||
})
|
||||
->cc
|
||||
(unless doingSomething (set doingSomething true)
|
||||
(prepareForSkip)
|
||||
(runFromNextLabel skipMovie)))
|
||||
|
||||
|
||||
(.registerItem (director.shortcutHandler) "skip to [l]abel"
|
||||
->cc
|
||||
(flxDirector.sceneSelection ->:Void {}))))
|
||||
(unless doingSomething (set doingSomething true)
|
||||
(flxDirector.sceneSelection ->:Void {})))))
|
||||
})
|
Reference in New Issue
Block a user