Package mcp.mobius.waila.api.component
Class ItemListComponent
java.lang.Object
mcp.mobius.waila.api.component.ItemListComponent
- All Implemented Interfaces:
ITooltipComponent
,ITooltipComponent.HorizontalGrowing
@ClientOnly
public class ItemListComponent
extends Object
implements ITooltipComponent.HorizontalGrowing
Component that renders items that dynamically grow based on available space.
-
Nested Class Summary
Nested classes/interfaces inherited from interface mcp.mobius.waila.api.ITooltipComponent
ITooltipComponent.HorizontalGrowing
-
Constructor Summary
ConstructorDescriptionItemListComponent
(List<ItemStack> items) ItemListComponent
(List<ItemStack> items, int maxHeight) ItemListComponent
(List<ItemStack> items, int maxHeight, float scale) -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the height of the component.int
Returns the minimal width of the component.void
render
(GuiGraphics ctx, int x, int y, DeltaTracker delta) Renders the component.void
setGrownWidth
(int grownWidth) Called with the calculated width.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface mcp.mobius.waila.api.ITooltipComponent.HorizontalGrowing
getWeight, getWidth
-
Constructor Details
-
ItemListComponent
-
ItemListComponent
-
ItemListComponent
-
-
Method Details
-
getMinimalWidth
public int getMinimalWidth()Description copied from interface:ITooltipComponent.HorizontalGrowing
Returns the minimal width of the component.- Specified by:
getMinimalWidth
in interfaceITooltipComponent.HorizontalGrowing
-
setGrownWidth
public void setGrownWidth(int grownWidth) Description copied from interface:ITooltipComponent.HorizontalGrowing
Called with the calculated width.- Specified by:
setGrownWidth
in interfaceITooltipComponent.HorizontalGrowing
-
getHeight
public int getHeight()Description copied from interface:ITooltipComponent.HorizontalGrowing
Returns the height of the component.Contract:
ITooltipComponent.HorizontalGrowing.setGrownWidth(int)
will be called first, thenITooltipComponent.HorizontalGrowing.getHeight()
.- Specified by:
getHeight
in interfaceITooltipComponent
- Specified by:
getHeight
in interfaceITooltipComponent.HorizontalGrowing
-
render
Description copied from interface:ITooltipComponent
Renders the component.- Specified by:
render
in interfaceITooltipComponent
-