Package mcp.mobius.waila.api
Interface ITheme
A theme that will be used to render the Waila tooltip.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the default text color of this theme.default void
processProperties
(IThemeAccessor accessor) This method is called when properties are changed in game.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.void
setPadding
(ITheme.Padding padding) Sets the padding of this theme,ITheme.Padding.set(int)
overloads are based on CSS shorthand padding property.
-
Method Details
-
processProperties
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
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 contextx
- the x position of the hudy
- the y position of the hudwidth
- the width of the hudheight
- the height of the hudalpha
- the background transparancy of the hud, ranged from0
to255
delta
- frame time delta
-