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 { ->bitmapData {
(loadGraphic 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) (updateColor)
(when (hasComponent e Scale) (when (hasComponent e Scale)
(let [:Float scale (readComponent e Scale)] (let [:Float scale (readComponent e Scale)]

View File

@@ -4,6 +4,8 @@
// make interactible sprites for entries that have images // make interactible sprites for entries that have images
(var TEXT_SIZE 16)
(prop &mut :EntrySpriteSystem spriteSystem) (prop &mut :EntrySpriteSystem spriteSystem)
(method :PlaygroundSystem playgroundSystem [] (method :PlaygroundSystem playgroundSystem []
@@ -183,9 +185,9 @@
(prop &mut :FlxInputText textInput null) (prop &mut :FlxInputText textInput null)
(method :Void enterText [prompt resolve maxLength] (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) (showUI textInputLabel)
(set textInput (new FlxInputText 0 0 300 "")) (set textInput (new FlxInputText 0 0 300 "" TEXT_SIZE))
(set textInput.hasFocus true) (set textInput.hasFocus true)
(set textInput.callback (set textInput.callback
->:Void [text action] ->:Void [text action]
@@ -273,7 +275,7 @@
(when (= lastUI ui) (-= uiY ui.height))) (when (= lastUI ui) (-= uiY ui.height)))
(method :Void displayMessage [:String message] (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))) (showUI messageText)))
(method :Void clearUI [] (method :Void clearUI []