Difference between revisions of "Text:set"

m (Function)
(Updated for 11.0)
 
Line 30: Line 30:
  
 
== Function ==
 
== Function ==
 +
{{oldin|[[11.0]]|110|type=variant|text=Use [[Text:clear]] instead}}
 
Clears the contents of the Text object.
 
Clears the contents of the Text object.
 
=== Synopsis ===
 
=== Synopsis ===

Latest revision as of 20:07, 1 April 2018

Available since LÖVE 0.10.0
This function is not supported in earlier versions.

Replaces the contents of the Text object with a new unformatted string.

Function

Synopsis

Text:set( textstring )

Arguments

string textstring
The new string of text to use.

Returns

Nothing.

Function

Synopsis

Text:set( coloredtext )

Arguments

table coloredtext
A table containing colors and strings to use as the new text, in the form of {color1, string1, color2, string2, ...}.
table color1
A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of {red, green, blue, alpha}.
string string1
A string of text which has a color specified by the previous color.
table color2
A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of {red, green, blue, alpha}.
string string2
A string of text which has a color specified by the previous color.
tables and strings ...
Additional colors and strings.

Returns

Nothing.

Notes

The color set by love.graphics.setColor will be combined (multiplied) with the colors of the text, when drawing the Text object.

Function

Removed in LÖVE 11.0
Use Text:clear instead.

Clears the contents of the Text object.

Synopsis

Text:set( )

Arguments

None.

Returns

Nothing.

See Also

Other Languages