Difference between revisions of "UI.Label"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2023.1<br/> '''Class:''' UI<br/> === Description === Creates a Label widget. <syntaxhighlight lang="lua"> UI.Label.new(text,layou...")
 
 
Line 25: Line 25:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
{{GIDEROS IMPORTANT LINKS}}
+
{{UI}}

Latest revision as of 08:19, 17 October 2023

Available since: Gideros 2023.1
Class: UI

Description

Creates a Label widget.

UI.Label.new(text,layout,font,lightweight)

Parameters

text: (string) the Label widget text
layout: (table) the Label widget text layout (see FontBase Constants)
font: (table) the Label widget font
lightweight: (table) resize the Label widget

Example

local gui = UI.Label.new("Hello Gideros UI!")
gui:setText("reading is good for you")
gui:setColor(0xaa0000)
gui:setPosition(50, 50)

stage:addChild(gui)