bigger text in flixel playground

This commit is contained in:
2022-07-03 03:03:03 +00:00
parent 6c36f17d23
commit d51940f1fc
2 changed files with 6 additions and 4 deletions

View File

@@ -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)]

View File

@@ -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 []