From 15deeccc4bcbe5b68f002f8cc91ee4ed8ced68fb Mon Sep 17 00:00:00 2001 From: jussi Date: Wed, 11 Jun 2025 22:44:39 +0300 Subject: MeasureTextBoxed and DrawTextBoxedEx to DrawTextBoxed. --- examples/textBoxed/main.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'examples/textBoxed/main.lua') diff --git a/examples/textBoxed/main.lua b/examples/textBoxed/main.lua index c6b497f..623c445 100644 --- a/examples/textBoxed/main.lua +++ b/examples/textBoxed/main.lua @@ -32,26 +32,27 @@ end function RL.draw() RL.ClearBackground( RL.RAYWHITE ) RL.DrawRectangleLines( rect, RL.GREEN ) + textOffset = { 0, 0 } - _, textOffset = RL.DrawTextBoxedEx( + _, textOffset = RL.DrawTextBoxed( 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, - textSize, spacing, wordwrap, RL.RED, limitHeight, { 0, 0 } + textSize, spacing, wordwrap, RL.RED, limitHeight, textOffset ) - mouseCharId, textOffset = RL.DrawTextBoxedEx( + mouseCharId, textOffset = RL.DrawTextBoxed( RL.GetFontDefault(), " Hyperlink.", rect, textSize, spacing, wordwrap, linkColor, limitHeight, textOffset ) - _, textOffset = RL.DrawTextBoxedEx( + _, textOffset = RL.DrawTextBoxed( 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.DrawTextBoxed( 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, -- cgit v1.2.3