Record Class GuiPaintContext.BoxOptions
java.lang.Object
java.lang.Record
com.render.api.gui.GuiPaintContext.BoxOptions
- Record Components:
backgroundColor- background fill colorborderColor- border colorborderWidth- border width in design-space pixelscornerRadius- corner radius in design-space pixelsopacity- opacity multiplier from zero through oneshadow- optional box shadowglow- optional box glowgradient- optional background gradientanimatedBorder- optional animated-border effect
- Enclosing class:
GuiPaintContext
public static record GuiPaintContext.BoxOptions(RenderColor backgroundColor, RenderColor borderColor, float borderWidth, float cornerRadius, float opacity, GuiShadow shadow, GuiGlow glow, GuiGradient gradient, GuiAnimatedBorder animatedBorder)
extends Record
Immutable options for a custom box paint operation.
Mutable effect objects are copied when the options are created and when returned through their accessors, so a shared options instance can safely be reused.
-
Constructor Summary
ConstructorsConstructorDescriptionBoxOptions(RenderColor backgroundColor, RenderColor borderColor, float borderWidth, float cornerRadius, float opacity, GuiShadow shadow, GuiGlow glow, GuiGradient gradient, GuiAnimatedBorder animatedBorder) Creates an instance of aBoxOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theanimatedBorderrecord component.Returns the value of thebackgroundColorrecord component.Returns the value of theborderColorrecord component.floatReturns the value of theborderWidthrecord component.floatReturns the value of thecornerRadiusrecord component.static GuiPaintContext.BoxOptionsdefaults()final booleanIndicates whether some other object is "equal to" this one.glow()Returns the value of theglowrecord component.gradient()Returns the value of thegradientrecord component.final inthashCode()Returns a hash code value for this object.floatopacity()Returns the value of theopacityrecord component.shadow()Returns the value of theshadowrecord component.static GuiPaintContext.BoxOptionssolid(RenderColor color) final StringtoString()Returns a string representation of this record class.withAnimatedBorder(GuiAnimatedBorder animatedBorder) withBackground(RenderColor color) withBorder(RenderColor color, float width) withCornerRadius(float radius) withGradient(GuiGradient gradient) withOpacity(float opacity) withShadow(GuiShadow shadow)
-
Constructor Details
-
BoxOptions
public BoxOptions(RenderColor backgroundColor, RenderColor borderColor, float borderWidth, float cornerRadius, float opacity, GuiShadow shadow, GuiGlow glow, GuiGradient gradient, GuiAnimatedBorder animatedBorder) Creates an instance of aBoxOptionsrecord class.- Parameters:
backgroundColor- the value for thebackgroundColorrecord componentborderColor- the value for theborderColorrecord componentborderWidth- the value for theborderWidthrecord componentcornerRadius- the value for thecornerRadiusrecord componentopacity- the value for theopacityrecord componentshadow- the value for theshadowrecord componentglow- the value for theglowrecord componentgradient- the value for thegradientrecord componentanimatedBorder- the value for theanimatedBorderrecord component
-
-
Method Details
-
defaults
-
solid
-
withBackground
-
withBorder
-
withCornerRadius
-
withOpacity
-
withShadow
-
withGlow
-
withGradient
-
withAnimatedBorder
-
shadow
-
glow
-
gradient
-
animatedBorder
Returns the value of theanimatedBorderrecord component.- Returns:
- the value of the
animatedBorderrecord component
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
backgroundColor
Returns the value of thebackgroundColorrecord component.- Returns:
- the value of the
backgroundColorrecord component
-
borderColor
Returns the value of theborderColorrecord component.- Returns:
- the value of the
borderColorrecord component
-
borderWidth
public float borderWidth()Returns the value of theborderWidthrecord component.- Returns:
- the value of the
borderWidthrecord component
-
cornerRadius
public float cornerRadius()Returns the value of thecornerRadiusrecord component.- Returns:
- the value of the
cornerRadiusrecord component
-
opacity
-