Constructor
new ControlPanelButton(name, text, bgColor, hazard)
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}
Gets the parent for the control panel buttons
Returns:
The control panel HTMLElement
- Type
- HTMLElement
(static) setParent(parent)
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 |