diff --git a/projects/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss b/projects/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss index 23455adb..1412b3df 100644 --- a/projects/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss +++ b/projects/hollywoo-flixel/src/hollywoo_flixel/FlxDirector.kiss @@ -106,9 +106,9 @@ (var DIALOG_COLOR FlxColor.WHITE) (var DIALOG_SIZE 24) -(var &mut :FlxSprite dialogBox) -(var &mut :FlxText dialogText) -(var &mut :FlxText speakerNameText) +(prop &mut :FlxSprite dialogBox) +(prop &mut :FlxText dialogText) +(prop &mut :FlxText speakerNameText) (method showDialog [:String speakerName :SpeechType type :String wryly :String text :Continuation cc] // TODO handle text messages, wrylies, off-screen, from-phone, etc. via (case type) diff --git a/projects/hollywoo-flixel/src/hollywoo_flixel/HollywooFlixelDSL.kiss b/projects/hollywoo-flixel/src/hollywoo_flixel/HollywooFlixelDSL.kiss index acbe16a0..58d134e5 100644 --- a/projects/hollywoo-flixel/src/hollywoo_flixel/HollywooFlixelDSL.kiss +++ b/projects/hollywoo-flixel/src/hollywoo_flixel/HollywooFlixelDSL.kiss @@ -61,6 +61,8 @@ (set buttonY 0))) (FlxG.state.add buttons))) +(defAlias &ident flxDirector (cast director FlxDirector)) + (preload // These are set here so they're defined after FlxG.width and height have been set: (set STAGE_LEFT_X 150.0) diff --git a/projects/hollywoo-flixel/src/test/source/Test.hollywoo b/projects/hollywoo-flixel/src/test/source/Test.hollywoo index 4c696d55..1008b744 100644 --- a/projects/hollywoo-flixel/src/test/source/Test.hollywoo +++ b/projects/hollywoo-flixel/src/test/source/Test.hollywoo @@ -48,4 +48,21 @@ ADDCHARACTER "black" Right FacingLeft (withActor "white" actorLeft (assert (> actorRight.x actorLeft.x)))) +// Speaker name not being bumped to right side for stage-right actors while intercutting: +(preload + (newFlxSet "intercutSet" AssetPaths.whiteBackground1280x720__png) + (newSceneFromSet "intercutScene" "intercutSet")) + +SETSCENE "intercutScene" +ADDCHARACTER "black" right FacingLeft +INTERCUT [=>"white" basicSceneKey "black" "intercutScene"] + +(prop &mut speakerNameTextLeftX 0.0) +{(delay 0.01 ->:Void (set speakerNameTextLeftX flxDirector.speakerNameText.x))(cc)} +NORMALSPEECH "white" "" "Testing line one" +{(delay 0.01 ->:Void {(assert (> flxDirector.speakerNameText.x speakerNameTextLeftX))})(cc)} +NORMALSPEECH "black" "" "Testing line two" + +ENDINTERCUT + (Sys.exit 0) \ No newline at end of file