Constructor
new Text(text, x, y, fontFaceopt, fontSizeopt)
- Description:
Instantiate a Text object
- Source:
- See:
Example
const new Text("Do you agree?", 20, 200)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
text |
string | Text to display on the button |
||
x |
number | X position to draw the button |
||
y |
number | Y position to draw the button |
||
fontFace |
string |
<optional> |
Arial
|
Font face for the text on the button. Defaults to 'Arial' |
fontSize |
number |
<optional> |
40
|
Size of the font for the text on the button. Defaults to 40. |
Extends
- DisplayWidget