ControlPanelButton

ControlPanelButton

Class representing a control panel button

Constructor

new ControlPanelButton(name, text, bgColor, hazard)

Source:
Creates a control panel button
Parameters:
Name Type Description
name String Button shortname
text String Button text
bgColor String Button background color
hazard Boolean If the action this button triggers is hazardous

Extends

  • Button

Methods

(static) getParent() → {HTMLElement}

Source:
Gets the parent for the control panel buttons
Returns:
The control panel HTMLElement
Type
HTMLElement

(static) setParent(parent)

Source:
Sets the parent for all control panel buttons Note the parent must be set before creating any buttons
Parameters:
Name Type Description
parent HTMLElement The html element representing the control panel