diff --git a/projects/flixel-desktop-habit-puzzle-game/source/HabitState.kiss b/projects/flixel-desktop-habit-puzzle-game/source/HabitState.kiss index aa4236cc..d25f5c35 100644 --- a/projects/flixel-desktop-habit-puzzle-game/source/HabitState.kiss +++ b/projects/flixel-desktop-habit-puzzle-game/source/HabitState.kiss @@ -7,6 +7,7 @@ (defAlias &ident textSize SimpleWindow.textSize) (prop &mut :FlxPomTimer pomTimer null) +(prop &mut :FlxText availableMatchesText (new FlxText 0 0 0 "" SimpleWindow.textSize)) (method &override :Void create [] (set FlxG.sound.soundTrayEnabled false) @@ -30,6 +31,9 @@ (set uiCamera (new FlxCamera)) (set SimpleWindow.defaultCamera uiCamera) (set uiCamera.bgColor FlxColor.TRANSPARENT) + (set availableMatchesText.color FlxColor.LIME) + (set availableMatchesText.cameras [uiCamera]) + (add availableMatchesText) (FlxG.cameras.add uiCamera) (FlxG.plugins.add (new FlxMouseControl)) (set FlxMouseControl.sortIndex "priorityID") @@ -59,6 +63,10 @@ (whileLet [f (nextFrameFunctions.shift)] (f))) + (set availableMatchesText.text "$(countAvailableMatches) matches can be made.") + (set availableMatchesText.y (- FlxG.height availableMatchesText.height)) + (set availableMatchesText.x (- FlxG.width availableMatchesText.width)) + // workaround for text box somehow losing focus: (when entryNameText (set entryNameText.hasFocus true)) (super.update elapsed)