Class GuiSlot

  • Direct Known Subclasses:
    GuiListExtended

    public abstract class GuiSlot
    extends java.lang.Object
    • Field Detail

      • width

        protected int width
      • height

        protected int height
      • top

        protected int top
      • bottom

        protected int bottom
      • right

        protected int right
      • left

        protected int left
      • slotHeight

        protected final int slotHeight
      • mouseX

        protected int mouseX
      • mouseY

        protected int mouseY
      • field_148163_i

        protected boolean field_148163_i
      • initialClickY

        protected int initialClickY
        + Where the mouse was in the window when you first clicked to scroll
      • scrollMultiplier

        protected float scrollMultiplier
      • amountScrolled

        protected float amountScrolled
      • selectedElement

        protected int selectedElement
        + The element in the list that was selected
      • lastClicked

        protected long lastClicked
      • field_178041_q

        protected boolean field_178041_q
      • showSelectionBox

        protected boolean showSelectionBox
        + Set to true if a selected element in this gui will show an outline box
      • hasListHeader

        protected boolean hasListHeader
      • headerPadding

        protected int headerPadding
    • Constructor Detail

      • GuiSlot

        public GuiSlot​(Minecraft mcIn,
                       int width,
                       int height,
                       int topIn,
                       int bottomIn,
                       int slotHeightIn)
    • Method Detail

      • setDimensions

        public void setDimensions​(int widthIn,
                                  int heightIn,
                                  int topIn,
                                  int bottomIn)
      • setShowSelectionBox

        public void setShowSelectionBox​(boolean showSelectionBoxIn)
      • setHasListHeader

        protected void setHasListHeader​(boolean hasListHeaderIn,
                                        int headerPaddingIn)
        + Sets hasListHeader and headerHeight. Params: hasListHeader, headerHeight. If hasListHeader is false headerHeight is set to 0.
      • getSize

        protected abstract int getSize()
      • elementClicked

        protected abstract void elementClicked​(int var1,
                                               boolean var2,
                                               int var3,
                                               int var4)
      • isSelected

        protected abstract boolean isSelected​(int var1)
      • getContentHeight

        protected int getContentHeight()
        + Return the height of the content being scrolled
      • drawBackground

        protected abstract void drawBackground()
      • func_178040_a

        protected void func_178040_a​(int var1,
                                     int var2,
                                     int var3)
      • drawSlot

        protected abstract void drawSlot​(int var1,
                                         int var2,
                                         int var3,
                                         int var4,
                                         int var5,
                                         int var6)
      • drawListHeader

        protected void drawListHeader​(int parInt1,
                                      int parInt2,
                                      Tessellator parTessellator)
        + Handles drawing a list's header row.
      • func_148132_a

        protected void func_148132_a​(int parInt1,
                                     int parInt2)
      • func_148142_b

        protected void func_148142_b​(int parInt1,
                                     int parInt2)
      • getSlotIndexFromScreenCoords

        public int getSlotIndexFromScreenCoords​(int parInt1,
                                                int parInt2)
      • registerScrollButtons

        public void registerScrollButtons​(int scrollUpButtonIDIn,
                                          int scrollDownButtonIDIn)
        + Registers the IDs that can be used for the scrollbar's up/down buttons.
      • bindAmountScrolled

        protected void bindAmountScrolled()
        + Stop the thing from scrolling out of bounds
      • func_148135_f

        public int func_148135_f()
      • getAmountScrolled

        public int getAmountScrolled()
        + Returns the amountScrolled field as an integer.
      • isMouseYWithinSlotBounds

        public boolean isMouseYWithinSlotBounds​(int parInt1)
      • scrollBy

        public void scrollBy​(int amount)
        + Scrolls the slot by the given amount. A positive value scrolls down, and a negative value scrolls up.
      • actionPerformed

        public void actionPerformed​(GuiButton button)
      • drawScreen

        public void drawScreen​(int mouseXIn,
                               int mouseYIn,
                               float parFloat1)
      • handleMouseInput

        public void handleMouseInput()
      • setEnabled

        public void setEnabled​(boolean enabledIn)
      • getEnabled

        public boolean getEnabled()
      • getListWidth

        public int getListWidth()
        + Gets the width of the list
      • drawSelectionBox

        protected void drawSelectionBox​(int mouseXIn,
                                        int mouseYIn,
                                        int parInt3,
                                        int parInt4)
        + Draws the selection box around the selected slot element.
      • getScrollBarX

        protected int getScrollBarX()
      • overlayBackground

        protected void overlayBackground​(int startY,
                                         int endY,
                                         int startAlpha,
                                         int endAlpha)
        + Overlays the background to hide scrolled items
      • setSlotXBoundsFromLeft

        public void setSlotXBoundsFromLeft​(int leftIn)
        + Sets the left and right bounds of the slot. Param is the left bound, right is calculated as left + width.
      • getSlotHeight

        public int getSlotHeight()