Class SlotComponent

java.lang.Object
de.ellpeck.rockbottom.api.gui.component.GuiComponent
de.ellpeck.rockbottom.api.gui.component.SlotComponent

public class SlotComponent extends GuiComponent
  • Field Details

    • slot

      public final SlotContainer slot
    • componentId

      public final int componentId
    • container

      public final ContainerGui container
  • Constructor Details

  • Method Details

    • disableBackgroundRender

      public SlotComponent 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

      public SlotComponent addColorOverride(int color)
      This forces your slot to render as a specific color. By default, slots will use the user-defined color preference Settings.guiColor
      Parameters:
      color - The color that you want your slot to use
      Returns:
      The colored component slot. The same as this one
    • onMouseAction

      public boolean onMouseAction(IGameInstance game, int button, float x, float y)
      Overrides:
      onMouseAction in class GuiComponent
    • getName

      public ResourceName getName()
      Specified by:
      getName in class GuiComponent
    • render

      public void render(IGameInstance game, IAssetManager manager, IRenderer g, int x, int y)
      Overrides:
      render in class GuiComponent
    • renderOverlay

      public void renderOverlay(IGameInstance game, IAssetManager manager, IRenderer g, int x, int y)
      Overrides:
      renderOverlay in class GuiComponent