Menus
Last updated
Last updated
Updated for version 3.36.
All values and functions are inherited from here: https://luffyyy.gitbook.io/beardlib/menuui/menuui-item
The most simple type of menu. Only holds items. If you don't need a scroll-able panel you should use this menu type instead of Menu
.
Parameter | Type | Description |
---|---|---|
A Menu is a menu type with a scroll-able panel for the items.
Inherits Menu
Features a title and a scroll-able panel for items. Additionally allows you to close and open the menu.
or if a DivGroup:
The difference between Group and DivGroup is that div group sets divider_type
to true which makes the item like a divider but it has items, this also disables toggling for the group.
A menu that is like a simple button. But, opens up a popup menu when pressed. Kind of like those context menus in every Windows app.
Inherits Menu
A menu that is like a notebook; it has pages. You can control the page using the arrow keys at the top right corner of the menu.
This is a little weird type of item, it has items; but only renders them based on pages. So be careful with it.
Parameter | Type | Description |
---|---|---|
Function | Return Type | Description |
---|---|---|
Function | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Function | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Function | Description |
---|---|
Parameter | Type | Description |
---|---|---|
Function | Return Type | Description |
---|---|---|
Function | Description |
---|---|
Function | Description |
---|---|
auto_height
Boolean
Should the menu automatically set the height based on items it has? Defaults to true
scrollbar
Boolean
Should there by a scrollbar for the menu? You should set this to false if you are sure the menu will never have too many items to require a scrollbar. Defaults to true if the menu has auto_height
set to false or min_height
not set to null or max_height
not set to null (Recommended to use Holder instead in that case)
scroll_width
Number
Set a custom size for the scrollbar. Defaults to 8
auto_height
Boolean
Should the menu automatically set the height based on items it has? Defaults to true if menu is a group
ScrollY()
Number
Returns the current scroll Y position. Useful if you want to retain the position of the scroll
SetScrollSpeed(Number speed)
Sets the scrolling speed
SetSize(Number w, Number h)
Sets the size for the menu. w
is the width and h
is the height w
and h
can be null and will default to the current size if not defined
SetScrollY(Number y)
Sets the Y position of the scroll
closed
Boolean
is the group closed?
ToggleGroup()
Toggles the group, if it's closed then it will open it and if not it will close it
CloseGroup()
Closes the group
OpenGroup()
Opens the group
keep_menu_open
Boolean
Decides whether the popup menu should stay open after pressing outside of it. Defaults to false
Open()
Opens the menu
Close()
Closes the menu
page
Number
The current page. Defaults to 1
GetCurrentPage()
Number
Returns the current page
GetPageCount()
Number
Returns the page count
GetItemPage(Item item)
Table
Returns the page of an item; if it's inside any
SetPage(Number page)
Sets the current page
AddToPage(Item item, Number page)
Adds an item to a page
RemoveFromPage(Item item, Number page)
Removes an item from a page
AddPage(String name, Number indx)
Adds a page. name
is the name of the page. It will also be displayed near the arrow page controls. indx
is used to insert it to a specific index. By default it inserts it to the last position
AddItemPage(String name, Item item, Number indx)
Adds a page by the name of name
and adds item
to it. indx
is same as in AddPage
SetPageName(Number indx, String name)
Sets a page name/title. indx
is the page number and name
is the title
RemovePage(Number indx)
Removes a page that has the index indx
RemoveAllPages()
Removes all pages
RemovePageWithItem(Item item)
Removes a page that has a certain item