Cocos Creator API

0.7.1

Cocos Creator is a highly customizable game development tool that utilizes the power of cocos2d-x.

Module Editor.Panel

Panel module for operating specific panel

Methods

open
(
  • panelID
  • argv
)

Open a panel and pass argv to it. The argv will be sent as argument in panel:run message in page-level

name type description
panelID string

a panelID

argv object

argument store as key-value table, which will pass later

close
(
  • panelID
)

Close a panel via panelID

name type description
panelID string

a panelID

findWindow
(
  • panelID
)
Editor.Window

Find and return an editor window that contains the panelID

name type description
panelID string

a panelID

returns:

type: Editor.Window

findWindows
(
  • packageName
)
Editor.Window

Find and return editor window list that contains panel defined in package via packageName

name type description
packageName string

returns:

type: Editor.Window

findPanels
(
  • packageName
)
string[]

Find and return panel ID list that contains panel defined in package via packageName

name type description
packageName string

returns:

type: string[]

closeAll
(
  • packageName
)

Close all panels defined in package via packageName

name type description
packageName string