The space of a rect slot compound can not be modified anymore
This commit is contained in:
@@ -188,13 +188,28 @@ class GUIPageBuilder<T : ForInventory>(
|
|||||||
onClick: (clickEvent: GUIClickEvent<T>, element: E) -> Unit
|
onClick: (clickEvent: GUIClickEvent<T>, element: E) -> Unit
|
||||||
) = GUISpaceCompound(type, iconGenerator, onClick)
|
) = GUISpaceCompound(type, iconGenerator, onClick)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines an area where the content of the given compound
|
||||||
|
* is displayed.
|
||||||
|
*/
|
||||||
|
fun <E> compoundSpace(
|
||||||
|
slots: InventorySlotCompound<T>,
|
||||||
|
compound: GUISpaceCompound<T, E>
|
||||||
|
) {
|
||||||
|
compound.addSlots(slots)
|
||||||
|
defineSlots(
|
||||||
|
slots,
|
||||||
|
GUISpaceCompoundElement(compound)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new compound, holding data which can be displayed
|
* Creates a new compound, holding data which can be displayed
|
||||||
* in any compound space.
|
* in any compound space.
|
||||||
* This compound is strictly a rectangle.
|
* This compound is strictly a rectangle.
|
||||||
* The space is automatically defined.
|
* The space is automatically defined.
|
||||||
*/
|
*/
|
||||||
fun <E> createCompound(
|
fun <E> createRectCompound(
|
||||||
fromSlot: SingleInventorySlot<out T>,
|
fromSlot: SingleInventorySlot<out T>,
|
||||||
toSlot: SingleInventorySlot<out T>,
|
toSlot: SingleInventorySlot<out T>,
|
||||||
iconGenerator: (E) -> ItemStack,
|
iconGenerator: (E) -> ItemStack,
|
||||||
@@ -215,21 +230,6 @@ class GUIPageBuilder<T : ForInventory>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Defines an area where the content of the given compound
|
|
||||||
* is displayed.
|
|
||||||
*/
|
|
||||||
fun <E> compoundSpace(
|
|
||||||
slots: InventorySlotCompound<T>,
|
|
||||||
compound: AbstractGUISpaceCompound<T, E>
|
|
||||||
) {
|
|
||||||
compound.addSlots(slots)
|
|
||||||
defineSlots(
|
|
||||||
slots,
|
|
||||||
GUISpaceCompoundElement(compound)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* By pressing this button,
|
* By pressing this button,
|
||||||
* the user scrolls forwards or backwards in the compound.
|
* the user scrolls forwards or backwards in the compound.
|
||||||
|
Reference in New Issue
Block a user