habit puzzles hint how many matches. Close #120
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
(defAlias &ident textSize SimpleWindow.textSize)
|
(defAlias &ident textSize SimpleWindow.textSize)
|
||||||
|
|
||||||
(prop &mut :FlxPomTimer pomTimer null)
|
(prop &mut :FlxPomTimer pomTimer null)
|
||||||
|
(prop &mut :FlxText availableMatchesText (new FlxText 0 0 0 "" SimpleWindow.textSize))
|
||||||
|
|
||||||
(method &override :Void create []
|
(method &override :Void create []
|
||||||
(set FlxG.sound.soundTrayEnabled false)
|
(set FlxG.sound.soundTrayEnabled false)
|
||||||
@@ -30,6 +31,9 @@
|
|||||||
(set uiCamera (new FlxCamera))
|
(set uiCamera (new FlxCamera))
|
||||||
(set SimpleWindow.defaultCamera uiCamera)
|
(set SimpleWindow.defaultCamera uiCamera)
|
||||||
(set uiCamera.bgColor FlxColor.TRANSPARENT)
|
(set uiCamera.bgColor FlxColor.TRANSPARENT)
|
||||||
|
(set availableMatchesText.color FlxColor.LIME)
|
||||||
|
(set availableMatchesText.cameras [uiCamera])
|
||||||
|
(add availableMatchesText)
|
||||||
(FlxG.cameras.add uiCamera)
|
(FlxG.cameras.add uiCamera)
|
||||||
(FlxG.plugins.add (new FlxMouseControl))
|
(FlxG.plugins.add (new FlxMouseControl))
|
||||||
(set FlxMouseControl.sortIndex "priorityID")
|
(set FlxMouseControl.sortIndex "priorityID")
|
||||||
@@ -59,6 +63,10 @@
|
|||||||
(whileLet [f (nextFrameFunctions.shift)]
|
(whileLet [f (nextFrameFunctions.shift)]
|
||||||
(f)))
|
(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:
|
// workaround for text box somehow losing focus:
|
||||||
(when entryNameText (set entryNameText.hasFocus true))
|
(when entryNameText (set entryNameText.hasFocus true))
|
||||||
(super.update elapsed)
|
(super.update elapsed)
|
||||||
|
Reference in New Issue
Block a user