User Tools

Site Tools


text_label

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
text_label [2020/11/30 20:30]
justin
text_label [2020/12/02 18:38] (current)
justin
Line 6: Line 6:
 =====Element Properties===== =====Element Properties=====
 ^Icon^Property^Description^ ^Icon^Property^Description^
-(WIP)+|{{:​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"​.
  
-(WIP - Accessing/​changing properties of the element ​via scripts)+**Changing a button'​s text:** 
 +<code bauxite>​ 
 +widget["​test"​].element["​0001"​].text = "New Text"​ 
 +</​code>​
  
 ~~NOTOC~~ ~~NOTOC~~
text_label.txt · Last modified: 2020/12/02 18:38 by justin