Interface ITheme


@ClientOnly @OverrideOnly @Experimental public interface ITheme
A theme that will be used to render the Waila tooltip.
  • Method Details

    • processProperties

      default void processProperties(IThemeAccessor accessor)
      This method is called when properties are changed in game. When a property is modified in this method, the editor input field for that property will be changed accordingly. This is useful for validating property values.
      Parameters:
      accessor - the context accessor
    • getDefaultTextColor

      int getDefaultTextColor()
      Returns the default text color of this theme.
    • setPadding

      void setPadding(ITheme.Padding padding)
      Sets the padding of this theme, ITheme.Padding.set(int) overloads are based on CSS shorthand padding property.
      See Also:
    • renderTooltipBackground

      void renderTooltipBackground(GuiGraphics ctx, int x, int y, int width, int height, @org.jetbrains.annotations.Range(from=0L, to=255L) int alpha, DeltaTracker delta)
      Render the tooltip background. Padding is already counted in the specified hud dimension.
      Parameters:
      ctx - the draw context
      x - the x position of the hud
      y - the y position of the hud
      width - the width of the hud
      height - the height of the hud
      alpha - the background transparancy of the hud, ranged from 0 to 255
      delta - frame time delta