Class: BlazeText<T>
ui/text.BlazeText
Type parameters
Name | Type |
---|---|
T | extends HTMLParagraphElement | HTMLHeadingElement |
Hierarchy
BlazeElement
<HTMLParagraphElement
|HTMLHeadingElement
>โณ
BlazeText
โณโณ
BlazeHeading
โณโณ
BlazeStat
Constructors
constructor
โข new BlazeText<T
>(text
, level
, size
, bold?
, style?
)
Create a BlazeText with a {@link HTMLHeadingElement}.
Type parameters
Name | Type |
---|---|
T | extends HTMLHeadingElement | HTMLParagraphElement |
Parameters
Name | Type | Description |
---|---|---|
text | string | The element's text |
level | number | The heading level (1 - 6) |
size | number | The text's size in rem units |
bold? | boolean | Wether or not the text is bold |
style? | TextStyle | The text's style (color) |
Overrides
Defined in
src/ui/text.ts:32
โข new BlazeText<T
>(text
, size
, bold?
, style?
)
Create a BlazeText with a {@link HTMLParagraphElement}.
Type parameters
Name | Type |
---|---|
T | extends HTMLHeadingElement | HTMLParagraphElement |
Parameters
Name | Type | Description |
---|---|---|
text | string | The element's text |
size | number | The text's size in rem units |
bold? | boolean | Wether or not the text is bold |
style? | TextStyle | The text's style (color) |
Overrides
BlazeElement< HTMLParagraphElement | HTMLHeadingElement \>.constructor
Defined in
src/ui/text.ts:42
Properties
bold
โข bold: boolean
Defined in
src/ui/text.ts:20
element
โข Readonly
element: HTMLHeadingElement
| HTMLParagraphElement
Inherited from
Defined in
src/ui/element.ts:9
keys
โข Readonly
keys: KeyboardHandler
Inherited from
Defined in
src/ui/element.ts:11
mouse
โข Readonly
mouse: MouseHandler
Inherited from
Defined in
src/ui/element.ts:10
size
โข size: number
Defined in
src/ui/text.ts:19
style
โข style: TextStyle
Defined in
src/ui/text.ts:21
text
โข Private
text: string
Defined in
src/ui/text.ts:18
touch
โข Readonly
touch: TouchHandler
Inherited from
Defined in
src/ui/element.ts:12
Methods
applyStyles
โธ applyStyles(): void
Applies the size
, bold
, and style
variables to the text's dom element.
Returns
void
Defined in
src/ui/text.ts:73
getText
โธ getText(): string
Gets the element's text.
Returns
string
The element's text
Defined in
src/ui/text.ts:120
setText
โธ setText(text
): void
Sets the element's text.
Parameters
Name | Type | Description |
---|---|---|
text | string | The element's text |
Returns
void
Defined in
src/ui/text.ts:110