changeset 885:b9ed52c6cc93

add: word-wrapping for texts
author Sam <sam@basx.dev>
date Sat, 03 Feb 2024 19:33:57 +0700
parents b93fe81ccf14
children cf4000cc6286
files semicongine/text.nim
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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)