Class SlotComponent
java.lang.Object
de.ellpeck.rockbottom.api.gui.component.GuiComponent
de.ellpeck.rockbottom.api.gui.component.SlotComponent
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSlotComponent(ContainerGui container, SlotContainer slot, int componentId, int x, int y) -
Method Summary
Modifier and TypeMethodDescriptionaddColorOverride(int color) This forces your slot to render as a specific color.This disables the background rendering of the slot.getName()booleanonMouseAction(IGameInstance game, int button, float x, float y) voidrender(IGameInstance game, IAssetManager manager, IRenderer g, int x, int y) voidrenderOverlay(IGameInstance game, IAssetManager manager, IRenderer g, int x, int y) Methods inherited from class de.ellpeck.rockbottom.api.gui.component.GuiComponent
canCloseWithInvKey, getElementColor, getElementOutlineColor, getGuiColor, getHeight, getPriority, getRenderX, getRenderY, getUnselectedElementColor, getWidth, getX, getY, isActive, isMouseOver, isMouseOverPrioritized, onCharInput, onKeyPressed, setActive, setPos, shouldDoFingerCursor, toString, update, updateInactive
-
Field Details
-
slot
-
componentId
public final int componentId -
container
-
-
Constructor Details
-
SlotComponent
-
-
Method Details
-
disableBackgroundRender
This disables the background rendering of the slot. Your slot will be invisible with this enabled if there are no items in it. You should probably only use this if your GUI texture includes its own slot markers.- Returns:
- This component slot
-
addColorOverride
This forces your slot to render as a specific color. By default, slots will use the user-defined color preferenceSettings.guiColor- Parameters:
color- The color that you want your slot to use- Returns:
- The colored component slot. The same as this one
-
onMouseAction
- Overrides:
onMouseActionin classGuiComponent
-
getName
- Specified by:
getNamein classGuiComponent
-
render
- Overrides:
renderin classGuiComponent
-
renderOverlay
- Overrides:
renderOverlayin classGuiComponent
-