Class ScrollPanel

    • Field Detail

      • width

        protected final int width
      • height

        protected final int height
      • top

        protected final int top
      • bottom

        protected final int bottom
      • right

        protected final int right
      • left

        protected final int left
      • scrolling

        private boolean scrolling
      • scrollDistance

        protected float scrollDistance
      • captureMouse

        protected boolean captureMouse
      • barLeft

        private final int barLeft
    • Constructor Detail

      • ScrollPanel

        public ScrollPanel​(Minecraft client,
                           int width,
                           int height,
                           int top,
                           int left)
    • Method Detail

      • getContentHeight

        protected abstract int getContentHeight()
      • drawBackground

        protected void drawBackground()
      • drawPanel

        protected abstract void drawPanel​(MatrixStack mStack,
                                          int entryRight,
                                          int relativeY,
                                          Tessellator tess,
                                          int mouseX,
                                          int mouseY)
        Draw anything special on the screen. GL_SCISSOR is enabled for anything that is rendered outside of the view box. Do not mess with SCISSOR unless you support this.
        Parameters:
        mouseY -
        mouseX -
      • clickPanel

        protected boolean clickPanel​(double mouseX,
                                     double mouseY,
                                     int button)
      • getMaxScroll

        private int getMaxScroll()
      • applyScrollLimits

        private void applyScrollLimits()
      • getScrollAmount

        protected int getScrollAmount()
      • getBarHeight

        private int getBarHeight()
      • render

        public void render​(MatrixStack matrix,
                           int mouseX,
                           int mouseY,
                           float partialTicks)
        Specified by:
        render in interface IRenderable
      • drawGradientRect

        protected void drawGradientRect​(MatrixStack mStack,
                                        int left,
                                        int top,
                                        int right,
                                        int bottom,
                                        int color1,
                                        int color2)