From 913b8f882031893f926b6aba89ec4456cb39a2c0 Mon Sep 17 00:00:00 2001 From: jussi Date: Wed, 14 May 2025 11:20:00 +0300 Subject: DrawTextBoxed Color change escape sequence. --- examples/textBoxed/main.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'examples/textBoxed/main.lua') diff --git a/examples/textBoxed/main.lua b/examples/textBoxed/main.lua index df731c3..c6b497f 100644 --- a/examples/textBoxed/main.lua +++ b/examples/textBoxed/main.lua @@ -33,7 +33,7 @@ function RL.draw() RL.ClearBackground( RL.RAYWHITE ) RL.DrawRectangleLines( rect, RL.GREEN ) - mouseCharId, textOffset = RL.DrawTextBoxedEx( + _, textOffset = RL.DrawTextBoxedEx( RL.GetFontDefault(), "\tYou can change the size of the box by pressing right mouse and toggle the wordwrap by pressing space. First we will write some text before the hyperlink to show that it is indeed is as powerful feature as adverticed.", rect, @@ -45,12 +45,18 @@ function RL.draw() rect, textSize, spacing, wordwrap, linkColor, limitHeight, textOffset ) - RL.DrawTextBoxedEx( + _, textOffset = RL.DrawTextBoxedEx( RL.GetFontDefault(), " Then we demonstrate this further by writin more text after the link. Isn't this just amazing! Don't forget to press left mouse to print text to your console when hovering mouse over the hyperlink.", rect, textSize, spacing, wordwrap, RL.RED, limitHeight, textOffset ) + RL.DrawTextBoxedEx( + RL.GetFontDefault(), + " \a#D28484FF Also supports \a#0000FFFF changing text \a#CCD834FF color in the \a#00FFFFFF middle of \a#B623A3FF the \a#00FF00FF text draw.", + rect, + textSize, spacing, wordwrap, RL.WHITE, limitHeight, textOffset + ) if 0 < mouseCharId then linkColor = RL.GREEN -- cgit v1.2.3