User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
text_label [2020/11/30 18:52]
justin created
text_label [2021/04/21 20:24]
Line 6: Line 6:
 =====Element Properties===== =====Element Properties=====
 ^Icon^Property^Description^ ^Icon^Property^Description^
 +|{{:wiki:tag_id.png?nolink|}}|Element ID|ID for the text label. This ID must be unique amongst other elements within the same [[widget]]. It is currently auto-generated but will be editable in a future update.|
 +|{{:wiki:text.png?nolink|}}|Text|Text that will be displayed on the text label.|
 +|{{:wiki:font.png?nolink|}}|Font|[[Font]] that will be used for the label's text. If the "Default" option is selected, your game's default dialogue [[font]] will be used.|
 +|{{:wiki:font_size.png?nolink|}}|Font Size|[[Font]] size to use for the label's text.|
 =====Scripting===== =====Scripting=====
 +You can access and change certain properties of a text label from within a [[script]] by simply referencing the parent [[widget]] and the element by their unique IDs. See below for an example of changing the label's text. In this case, the [[widget]] has an ID of "test" and the text label has an ID of "0001".
-(Accessing/changing properties of the element via scripts)+**Changing a button's text:** 
 +<code bauxite> 
 +widget["test"].element["0001"].text = "New Text"; 
 ~~NOTOC~~ ~~NOTOC~~
text_label.txt · Last modified: 2021/04/21 20:24 by justin