# HG changeset patch # User Sam # Date 1706963637 -25200 # Node ID b9ed52c6cc93484d3d33f42fc91dffce5f8864c3 # Parent b93fe81ccf14e3419a2156b8020ff76a05bd8a28 add: word-wrapping for texts diff -r b93fe81ccf14 -r b9ed52c6cc93 semicongine/text.nim --- 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)