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
ConstructorsConstructorDescriptionItemListComponent(List<ItemStack> items) ItemListComponent(List<ItemStack> items, int maxHeight) ItemListComponent(List<ItemStack> items, int maxHeight, float scale) -
Method Summary
Modifier and TypeMethodDescriptionintReturns the height of the component.intReturns the minimal width of the component.voidrender(GuiGraphics ctx, int x, int y, DeltaTracker delta) Renders the component.voidsetGrownWidth(int grownWidth) Called with the calculated width.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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.HorizontalGrowingReturns the minimal width of the component.- Specified by:
getMinimalWidthin interfaceITooltipComponent.HorizontalGrowing
-
setGrownWidth
public void setGrownWidth(int grownWidth) Description copied from interface:ITooltipComponent.HorizontalGrowingCalled with the calculated width.- Specified by:
setGrownWidthin interfaceITooltipComponent.HorizontalGrowing
-
getHeight
public int getHeight()Description copied from interface:ITooltipComponent.HorizontalGrowingReturns the height of the component.Contract:
ITooltipComponent.HorizontalGrowing.setGrownWidth(int)will be called first, thenITooltipComponent.HorizontalGrowing.getHeight().- Specified by:
getHeightin interfaceITooltipComponent- Specified by:
getHeightin interfaceITooltipComponent.HorizontalGrowing
-
render
Description copied from interface:ITooltipComponentRenders the component.- Specified by:
renderin interfaceITooltipComponent
-