buttons to skip to labels
This commit is contained in:
@@ -33,6 +33,8 @@ enum FlxScreenPosition {
|
|||||||
* Model/controller of a Hollywoo-Flixel film, and main execution script
|
* Model/controller of a Hollywoo-Flixel film, and main execution script
|
||||||
*/
|
*/
|
||||||
class FlxMovie extends Movie<String, FlxStagePosition, FlxStageFacing, FlxScreenPosition, ActorFlxSprite, FlxSound, String, FlxSprite, FlxSound> {
|
class FlxMovie extends Movie<String, FlxStagePosition, FlxStageFacing, FlxScreenPosition, ActorFlxSprite, FlxSound, String, FlxSprite, FlxSound> {
|
||||||
|
// Think of HollywooFlixelDSL.kiss as the corresponding Kiss file for this class!
|
||||||
|
|
||||||
public function new(director:FlxDirector, ?voiceLinesAssetPath:String) {
|
public function new(director:FlxDirector, ?voiceLinesAssetPath:String) {
|
||||||
var voiceLinesJson = null;
|
var voiceLinesJson = null;
|
||||||
if (voiceLinesAssetPath != null) {
|
if (voiceLinesAssetPath != null) {
|
||||||
|
@@ -33,4 +33,16 @@
|
|||||||
(method :Void update [:Float elapsed]
|
(method :Void update [:Float elapsed]
|
||||||
(#when debug
|
(#when debug
|
||||||
(when FlxG.keys.justPressed.N
|
(when FlxG.keys.justPressed.N
|
||||||
(skipToNextLabel))))
|
(skipToNextLabel))
|
||||||
|
(when FlxG.keys.justPressed.L
|
||||||
|
(showLabelSkipButtons))))
|
||||||
|
|
||||||
|
(method :Void showLabelSkipButtons []
|
||||||
|
(let [runners (labelRunners)
|
||||||
|
buttons (new flixel.group.FlxGroup.FlxTypedGroup<flixel.ui.FlxButton>)]
|
||||||
|
(localVar &mut buttonY 0)
|
||||||
|
(doFor =>label runner runners
|
||||||
|
(let [b (new flixel.ui.FlxButton 0 buttonY label ->{(FlxG.state.remove buttons)(runner)})]
|
||||||
|
(buttons.add b))
|
||||||
|
(+= buttonY 20))
|
||||||
|
(FlxG.state.add buttons)))
|
Reference in New Issue
Block a user