From 2226ab793902c78e286b5f0bcbb84f0000f5b564 Mon Sep 17 00:00:00 2001 From: MtH Date: Sat, 13 Mar 2021 19:40:54 +0100 Subject: [PATCH] week6 dialogue finger --- source/DialogueBox.hx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source/DialogueBox.hx b/source/DialogueBox.hx index 929eb242e..1e56367af 100644 --- a/source/DialogueBox.hx +++ b/source/DialogueBox.hx @@ -120,7 +120,10 @@ class DialogueBox extends FlxSpriteGroup box.screenCenter(X); portraitLeft.screenCenter(X); - handSelect = new FlxSprite(FlxG.width * 0.9, FlxG.height * 0.9).loadGraphic(Paths.image('weeb/pixelUI/hand_textbox')); + handSelect = new FlxSprite(1042, 590).loadGraphic(Paths.image('weeb/pixelUI/hand_textbox')); + handSelect.setGraphicSize(Std.int(handSelect.width * PlayState.daPixelZoom * 0.9)); + handSelect.updateHitbox(); + handSelect.visible = false; add(handSelect); @@ -230,7 +233,13 @@ class DialogueBox extends FlxSpriteGroup // swagDialogue.text = ; swagDialogue.resetText(dialogueList[0]); - swagDialogue.start(0.04, true); + swagDialogue.start(0.04); + swagDialogue.completeCallback = function() + { + trace("dialogue finish"); + handSelect.visible = true; + }; + handSelect.visible = false; switch (curCharacter) {