GUIPanel

new GUIPanel(id, options, guimanager, append)

Creates a new GUIPanel

Parameters

NameTypeDescription
Name
id
Type
string
Description
The id and name element
Name
options
Type
json
Description
Options of element
Name
guimanager
Type
GUIManager
Description
The gui manager
Name
callback
Type
function
Description
Trigger function by click (optional)

Options

  • w: width of panel (in pixel)
  • h: height of panel (in pixel)
  • x: position left of panel (in pixel)
  • y: position top of panel (in pixel)
  • backgroundImage: image background of panel (string) => null by default
  • backgroundColor: color background of panel (string) => "black" by default
  • borderRadiusPanel: radius border of panel (string) => "10px" by default
  • borderPanel: border of panel (string) => "2px solid black" by default
  • zIndex: depth of the element (int) => 1 by default
  • overflow: overflow auto or hidden (auto by default)

Methods

add(element) → void

add element in the GUIPanel

setVisible(bool, fade) → void

Set this GUI element to visible or invisible (false by default)

isVisible() → void

Returns element if is visible or no

dispose() → void

Dispose the GUIPanel, and delete element.