# InventoryGUIPageBuilder

class InventoryGUIPageBuilder<T : ForInventory>(type: InventoryType<T>, page: Int)
Content copied to clipboard

## Functions

button
Link copied to clipboard
fun button(slots: InventorySlotCompound<T>, itemStack: ItemStack, onClick: (InventoryGUIClickEvent<T>) -> Unit)
Content copied to clipboard
A button is an item protected from any player actions.
changeGUI
Link copied to clipboard
fun changeGUI(slots: InventorySlotCompound<T>, icon: ItemStack, newGUI: () -> InventoryGUI<*>, newPage: Int? = null, onChange: (InventoryGUIClickEvent<T>) -> Unit? = null)
Content copied to clipboard
By pressing this button, the player switches to another InventoryGUI.
compoundScroll
Link copied to clipboard
fun compoundScroll(slots: InventorySlotCompound<T>, icon: ItemStack, compound: InventoryGUIRectSpaceCompound<T, *>, scrollTimes: Int = 1, reverse: Boolean = false)
Content copied to clipboard
By pressing this button, the user scrolls forwards or backwards in the compound.
fun compoundScroll(slots: InventorySlotCompound<T>, icon: ItemStack, compound: InventoryGUISpaceCompound<T, *>, scrollDistance: Int = 1, scrollTimes: Int = 1, reverse: Boolean = false)
Content copied to clipboard
By pressing this button, the user scrolls forwards or backwards in the compound.
compoundSpace
Link copied to clipboard
fun <E> compoundSpace(slots: InventorySlotCompound<T>, compound: AbstractInventoryGUISpaceCompound<T, E>)
Content copied to clipboard
Defines an area where the content of the given compound is displayed.
createCompound
Link copied to clipboard
fun <E> createCompound(iconGenerator: (E) -> ItemStack, onClick: (clickEvent: InventoryGUIClickEvent<T>, E) -> Unit): InventoryGUISpaceCompound<T, E>
Content copied to clipboard
Creates a new compound, holding data which can be displayed in any compound space.
fun <E> createCompound(fromSlot: SingleInventorySlot<out T>, toSlot: SingleInventorySlot<out T>, iconGenerator: (E) -> ItemStack, onClick: (clickEvent: InventoryGUIClickEvent<T>, E) -> Unit): InventoryGUIRectSpaceCompound<T, E>
Content copied to clipboard
Creates a new compound, holding data which can be displayed in any compound space.
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
Content copied to clipboard
freeSlot
Link copied to clipboard
fun freeSlot(slots: InventorySlotCompound<T>)
Content copied to clipboard
A free slot does not block any player actions.
hashCode
Link copied to clipboard
open fun hashCode(): Int
Content copied to clipboard
nextPage
Link copied to clipboard
fun nextPage(slots: InventorySlotCompound<T>, icon: ItemStack, onChange: (InventoryGUIClickEvent<T>) -> Unit? = null)
Content copied to clipboard
This button always tries to find the next page if clicked, and if a next page exists it is loaded.
pageChanger
Link copied to clipboard
fun pageChanger(slots: InventorySlotCompound<T>, icon: ItemStack, toPage: Int, onChange: (InventoryGUIClickEvent<T>) -> Unit? = null)
Content copied to clipboard
This is a button which loads the specified toPage if clicked.
placeholder
Link copied to clipboard
fun placeholder(slots: InventorySlotCompound<T>, itemStack: ItemStack)
Content copied to clipboard
An item protected from any player actions.
previousPage
Link copied to clipboard
fun previousPage(slots: InventorySlotCompound<T>, icon: ItemStack, onChange: (InventoryGUIClickEvent<T>) -> Unit? = null)
Content copied to clipboard
This button always tries to find the previous page if clicked, and if a previous page exists it is loaded.
toString
Link copied to clipboard
open fun toString(): String
Content copied to clipboard

## Properties

page
Link copied to clipboard
val page: Int
Content copied to clipboard
transitionFrom
Link copied to clipboard
var transitionFrom: PageChangeEffect? = null
Content copied to clipboard
transitionTo
Link copied to clipboard
var transitionTo: PageChangeEffect? = null
Content copied to clipboard