Home Reference Source
import {Label} from './vgui/30-label.js'
public class | source

Label

Extends:

NodeElementPanel → Label

Direct Subclass:

Button

Represents a label element

Constructor Summary

Public Constructor
public

constructor(id: *)

Member Summary

Public Members
public get

text: *

Gets the text of the label

public set

text(text: string): *

Sets the text of the label

Method Summary

Public Methods
public

toString(): *

Inherited Summary

From class Node
public get

Returns the children of this node

public get

Returns a Node that is the parent of this node.

public

toString(): *

Returns a string representation of the Node

From class Element
public get

id: *

Returns the fieldName of the element

public

addEventListener(type: *, listener: *)

Adds a listener to a type of events See Event for subclasses for supported types

public

dispatchEvent(event: *): *

Dispatch an event on this element.

public

getAttribute(name: *): *

Gets an attribute on the element In order to support a new attribute an overloading class needs to add the setting type to _attrHandler

public

removeEventListener(type: *, listener: *)

Removes a registered event listener

public

setAttribute(name: *, value: *)

Sets an attribute on the element In order to support a new attribute an overloading class needs to add the setting type to _attrHandler

public

startAnimation(animationName: string): bool

Starts a VGUI animation on child elements.

From class Panel
public

Public Constructors

public constructor(id: *) source

Override:

Panel#constructor

Params:

NameTypeAttributeDescription
id *

Public Members

public get text: * source

Gets the text of the label

public set text(text: string): * source

Sets the text of the label

Public Methods

public toString(): * source

Override:

Panel#toString

Return:

*