MeasureTextBoxed and DrawTextBoxedEx to DrawTextBoxed.

This commit is contained in:
jussi
2025-06-11 22:44:39 +03:00
parent a38e76873b
commit 15deeccc4b
7 changed files with 97 additions and 82 deletions

View File

@@ -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,