diff --git a/projects/nat-flixel-desktop-playground/source/EntrySprite.kiss b/projects/nat-flixel-desktop-playground/source/EntrySprite.kiss index 9bcb7554..19e05b09 100644 --- a/projects/nat-flixel-desktop-playground/source/EntrySprite.kiss +++ b/projects/nat-flixel-desktop-playground/source/EntrySprite.kiss @@ -14,7 +14,7 @@ ->bitmapData { (loadGraphic bitmapData) })) - (set pixels .pixels (new FlxText 0 0 0 (readComponent e Name) 16))) + (set pixels .pixels (new FlxText 0 0 0 (readComponent e Name) PlayState.TEXT_SIZE))) (updateColor) (when (hasComponent e Scale) (let [:Float scale (readComponent e Scale)] diff --git a/projects/nat-flixel-desktop-playground/source/PlayState.kiss b/projects/nat-flixel-desktop-playground/source/PlayState.kiss index cf27073f..77f5d942 100644 --- a/projects/nat-flixel-desktop-playground/source/PlayState.kiss +++ b/projects/nat-flixel-desktop-playground/source/PlayState.kiss @@ -4,6 +4,8 @@ // make interactible sprites for entries that have images +(var TEXT_SIZE 16) + (prop &mut :EntrySpriteSystem spriteSystem) (method :PlaygroundSystem playgroundSystem [] @@ -183,9 +185,9 @@ (prop &mut :FlxInputText textInput null) (method :Void enterText [prompt resolve maxLength] - (set textInputLabel (new FlxText 0 0 300 prompt)) + (set textInputLabel (new FlxText 0 0 300 prompt TEXT_SIZE)) (showUI textInputLabel) - (set textInput (new FlxInputText 0 0 300 "")) + (set textInput (new FlxInputText 0 0 300 "" TEXT_SIZE)) (set textInput.hasFocus true) (set textInput.callback ->:Void [text action] @@ -273,7 +275,7 @@ (when (= lastUI ui) (-= uiY ui.height))) (method :Void displayMessage [:String message] - (let [messageText (new FlxText 0 0 0 (message.replace "\n" "|"))] + (let [messageText (new FlxText 0 0 0 (message.replace "\n" "|") TEXT_SIZE)] (showUI messageText))) (method :Void clearUI []