Class RenderTooltipEvent.Pre

  • Enclosing class:
    RenderTooltipEvent

    public static class RenderTooltipEvent.Pre
    extends RenderTooltipEvent
    This event is fired before any tooltip calculations are done. It provides setters for all aspects of the tooltip, so the final render can be modified.

    This event is Cancelable.

    • Field Detail

      • screenWidth

        private int screenWidth
      • screenHeight

        private int screenHeight
      • maxWidth

        private int maxWidth
    • Constructor Detail

    • Method Detail

      • getScreenWidth

        public int getScreenWidth()
      • setScreenWidth

        public void setScreenWidth​(int screenWidth)
      • getScreenHeight

        public int getScreenHeight()
      • setScreenHeight

        public void setScreenHeight​(int screenHeight)
      • getMaxWidth

        public int getMaxWidth()
        Returns:
        The max width the tooltip can be. Defaults to -1 (unlimited).
      • setMaxWidth

        public void setMaxWidth​(int maxWidth)
        Sets the max width of the tooltip. Use -1 for unlimited.
      • setFontRenderer

        public void setFontRenderer​(@Nonnull
                                    FontRenderer fr)
        Sets the FontRenderer to be used to render text.
      • setX

        public void setX​(int x)
        Set the X origin of the tooltip.
      • setY

        public void setY​(int y)
        Set the Y origin of the tooltip.