Record Class GuiPaintContext.TextOptions
java.lang.Object
java.lang.Record
com.render.api.gui.GuiPaintContext.TextOptions
- Record Components:
font- font configurationcolor- text colortextScalePixels- text size in design-space pixelsletterSpacing- extra spacing between glyphslineHeightMultiplier- line-height multiplieropacity- opacity multiplier from zero through oneshadow- whether to draw the standard Minecraft text shadoweffectShadow- optional custom text shadoweffectGlow- optional custom text glowmaxWidth- wrapping width, or zero to disable wrapping
- Enclosing class:
GuiPaintContext
public static record GuiPaintContext.TextOptions(GuiFont font, RenderColor color, float textScalePixels, float letterSpacing, float lineHeightMultiplier, float opacity, boolean shadow, GuiShadow effectShadow, GuiGlow effectGlow, float maxWidth)
extends Record
Immutable text drawing and measurement options.
-
Constructor Summary
ConstructorsConstructorDescriptionTextOptions(GuiFont font, RenderColor color, float textScalePixels, float letterSpacing, float lineHeightMultiplier, float opacity, boolean shadow, GuiShadow effectShadow, GuiGlow effectGlow, float maxWidth) Creates an instance of aTextOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncolor()Returns the value of thecolorrecord component.static GuiPaintContext.TextOptionsdefaults()Returns the value of theeffectGlowrecord component.Returns the value of theeffectShadowrecord component.final booleanIndicates whether some other object is "equal to" this one.font()Returns the value of thefontrecord component.final inthashCode()Returns a hash code value for this object.floatReturns the value of theletterSpacingrecord component.floatReturns the value of thelineHeightMultiplierrecord component.floatmaxWidth()Returns the value of themaxWidthrecord component.static GuiPaintContext.TextOptionsof(RenderColor color, float textScalePixels) floatopacity()Returns the value of theopacityrecord component.booleanshadow()Returns the value of theshadowrecord component.floatReturns the value of thetextScalePixelsrecord component.final StringtoString()Returns a string representation of this record class.withColor(RenderColor color) withEffectGlow(GuiGlow glow) withEffectShadow(GuiShadow shadow) withLetterSpacing(float pixels) withLineHeight(float multiplier) withMaxWidth(float maxWidth) withOpacity(float opacity) withShadow(boolean shadow) withTextScale(float pixels)
-
Constructor Details
-
TextOptions
public TextOptions(GuiFont font, RenderColor color, float textScalePixels, float letterSpacing, float lineHeightMultiplier, float opacity, boolean shadow, GuiShadow effectShadow, GuiGlow effectGlow, float maxWidth) Creates an instance of aTextOptionsrecord class.- Parameters:
font- the value for thefontrecord componentcolor- the value for thecolorrecord componenttextScalePixels- the value for thetextScalePixelsrecord componentletterSpacing- the value for theletterSpacingrecord componentlineHeightMultiplier- the value for thelineHeightMultiplierrecord componentopacity- the value for theopacityrecord componentshadow- the value for theshadowrecord componenteffectShadow- the value for theeffectShadowrecord componenteffectGlow- the value for theeffectGlowrecord componentmaxWidth- the value for themaxWidthrecord component
-
-
Method Details
-
defaults
-
of
-
withFont
-
withColor
-
withTextScale
-
withLetterSpacing
-
withLineHeight
-
withOpacity
-
withShadow
-
withEffectShadow
-
withEffectGlow
-
withMaxWidth
-
effectShadow
Returns the value of theeffectShadowrecord component.- Returns:
- the value of the
effectShadowrecord component
-
effectGlow
Returns the value of theeffectGlowrecord component.- Returns:
- the value of the
effectGlowrecord 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. -
font
-
color
-
textScalePixels
public float textScalePixels()Returns the value of thetextScalePixelsrecord component.- Returns:
- the value of the
textScalePixelsrecord component
-
letterSpacing
public float letterSpacing()Returns the value of theletterSpacingrecord component.- Returns:
- the value of the
letterSpacingrecord component
-
lineHeightMultiplier
public float lineHeightMultiplier()Returns the value of thelineHeightMultiplierrecord component.- Returns:
- the value of the
lineHeightMultiplierrecord component
-
opacity
-
shadow
-
maxWidth
-