Mercurial > games > semicongine
diff semicongine/text.nim @ 424:54c5b933cbfc
add: word-wrapping for texts
author | Sam <sam@basx.dev> |
---|---|
date | Sat, 03 Feb 2024 19:33:57 +0700 |
parents | 50a2dc75b5bd |
children | df621844e32b |
line wrap: on
line diff
--- a/semicongine/text.nim Sat Feb 03 19:33:12 2024 +0700 +++ b/semicongine/text.nim Sat Feb 03 19:33:57 2024 +0700 @@ -220,6 +220,9 @@ text.processedText = text.text if text.maxWidth > 0: text.processedText = text.processedText.wordWrapped(text.font, text.maxWidth / text.scale) + echo "--------------------------" + echo text.processedText + echo "##########################" proc `text=`*(text: var Text, newText: string) = `text=`(text, newText.toRunes)