Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:LabelSetWordWrap

From RoR Wiki
Revision as of 19:46, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Label functions
Version: WAR 1.4.8

Turns word wrapping on or off for a Label.

LabelSetWordWrap(labelName, wordWrap)

Arguments

labelName
string – Name of a Label window.
wordWrap
boolean – true to turn word wrapping on, false to turn it off.

Returns

Nothing.

Details

  • wordWrap must be a real boolean. Passing nil or a number raises an Invalid Parameters error.
  • If the flag already has the requested value, nothing happens. Otherwise the label's text is laid out again.
  • The function needs at least two arguments and only reads the last two.
  • The stock UI never calls LabelSetWordWrap.

Errors

  • Error in function call 'LabelSetWordWrap': Window %s does not exist
  • Error in function call 'LabelSetWordWrap': Window %s is not a Label

Example

A minimal example built from the signature above:

LabelSetWordWrap( "MyLabel", true )
LabelSetText( "MyLabel", L"A long line of text that should wrap inside the label." )

See also