Package net.minecraft.client.gui
Class Font.PreparedTextBuilder
java.lang.Object
net.minecraft.client.gui.Font.PreparedTextBuilder
- All Implemented Interfaces:
Font.PreparedText,FormattedCharSink
- Enclosing class:
Font
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate floatprivate final intprivate floatprivate floatprivate floatprivate floatprivate final intprivate final booleanprivate List<BakedGlyph.Effect> (package private) final List<BakedGlyph.GlyphInstance> private floatprivate floatprivate float(package private) float(package private) float -
Constructor Summary
ConstructorsConstructorDescriptionPreparedTextBuilder(float x, float y, int color, boolean dropShadow) PreparedTextBuilder(float x, float y, int color, int backgroundColor, boolean dropShadow) -
Method Summary
Modifier and TypeMethodDescriptionbooleanAccepts a single code point from aFormattedCharSequence.private voidaddEffect(BakedGlyph.Effect effect) private voidaddGlyph(BakedGlyph.GlyphInstance glyph) bounds()private intgetShadowColor(Style style, int textColor) private intgetTextColor(TextColor textColor) private voidmarkBackground(float x, float y, float advance) private voidmarkSize(float left, float top, float right, float bottom) voidvisit(Font.GlyphVisitor visitor)
-
Field Details
-
drawShadow
private final boolean drawShadow -
color
private final int color -
backgroundColor
private final int backgroundColor -
x
float x -
y
float y -
left
private float left -
top
private float top -
right
private float right -
bottom
private float bottom -
backgroundLeft
private float backgroundLeft -
backgroundTop
private float backgroundTop -
backgroundRight
private float backgroundRight -
backgroundBottom
private float backgroundBottom -
glyphs
-
effects
-
-
Constructor Details
-
PreparedTextBuilder
public PreparedTextBuilder(float x, float y, int color, boolean dropShadow) -
PreparedTextBuilder
public PreparedTextBuilder(float x, float y, int color, int backgroundColor, boolean dropShadow)
-
-
Method Details
-
markSize
private void markSize(float left, float top, float right, float bottom) -
markBackground
private void markBackground(float x, float y, float advance) -
addGlyph
-
addEffect
-
accept
Accepts a single code point from aFormattedCharSequence.- Specified by:
acceptin interfaceFormattedCharSink- Parameters:
positionInCurrentSequence- Contains the relative position of the character in the current sub-sequence. If multiple formatted char sequences have been combined, this value will reset to0after each sequence has been fully consumed.- Returns:
trueto accept more characters,falseto stop traversing the sequence.
-
visit
- Specified by:
visitin interfaceFont.PreparedText
-
getTextColor
-
getShadowColor
-
bounds
- Specified by:
boundsin interfaceFont.PreparedText
-