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 pX, float pY, int pColor, boolean pDropShadow) PreparedTextBuilder(float pX, float pY, int pColor, int pBackgroundColor, boolean pDropShadow) -
Method Summary
Modifier and TypeMethodDescriptionbooleanAccepts a single code point from aFormattedCharSequence.private voidaddEffect(BakedGlyph.Effect pEffect) private voidaddGlyph(BakedGlyph.GlyphInstance pGlyph) bounds()private intgetShadowColor(Style pStyle, int pTextColor) private intgetTextColor(TextColor pTextColor) private voidmarkBackground(float pX, float pY, float pAdvance) private voidmarkSize(float pLeft, float pTop, float pRight, float pBottom) voidvisit(Font.GlyphVisitor pVisitor)
-
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 pX, float pY, int pColor, boolean pDropShadow) -
PreparedTextBuilder
public PreparedTextBuilder(float pX, float pY, int pColor, int pBackgroundColor, boolean pDropShadow)
-
-
Method Details
-
markSize
private void markSize(float pLeft, float pTop, float pRight, float pBottom) -
markBackground
private void markBackground(float pX, float pY, float pAdvance) -
addGlyph
-
addEffect
-
accept
Accepts a single code point from aFormattedCharSequence.- Specified by:
acceptin interfaceFormattedCharSink- Parameters:
pPositionInCurrentSequence- 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
-