The admin panel shown by the Admin entry of the tab menu: a sidebar of page buttons and
the page that is currently open.
Pages are added from the AddAdminMenuItems hook with add_panel, may require a
permission, and are created through the theme when their button is clicked.
Summary
Methods
Methods
Registers a page and adds a sidebar button that opens it.
Parameters
- id String page ID; must match a panel registered with the theme
- title String button text
- permission String optional, defaults to
nilpermission needed to open the page - ... Vararg extra arguments passed to Theme.create_panel when the page is opened
Sizes and centers the admin panel, creates its sidebar and lets plugins add their pages through the AddAdminMenuItems hook.
Closes the current page and opens the one with the given ID, provided the local player has the permission it requires. The button of the page becomes the active one.
Parameters
- id String page ID
Draws the card of the panel and the divider between the sidebar and the page.
Parameters
- w Number panel width
- h Number panel height
Lets the active theme draw over the panel through its AdminPanelPaintOver hook.
Parameters
- w Number panel width
- h Number panel height
Unregisters a page. Its sidebar button is left in place.
Parameters
- id String page ID
Slides the sidebar out of view and shows a back button, or restores the normal layout.
Parameters
- fullscreen Boolean