Files

97 lines
1.9 KiB
Markdown

# UIGraphicsComponent.text
[← UIGraphicsComponent](index.md) · [← Master](../../wiki.md)
Parça 4/5 · [önceki](text-3.md) · [sonraki](text-5.md)
color - ARGB text's font color.
anchorX - Horizontal anchor (0..1).
anchorY - Vertical anchor (0..1).
icon
public Graphic icon(java.lang.String icon,
int x,
int y,
int color)
Draw a McLib icon relative to graphics component's frame.
Most of the icons are 16x16 so keep that in mind.
Parameters:
color - ARGB color that used to render an icon.
icon
public Graphic icon(java.lang.String icon,
int x,
int y,
int color,
float anchorX,
float anchorY)
Draw a McLib icon with an anchor relative to graphics component's frame.
Parameters:
color - ARGB color that used to render an icon.
anchorX - Horizontal anchor (0..1).
anchorY - Vertical anchor (0..1).
shadow
public Graphic shadow(int primary,
int secondary,
int offset)
Draw a drop shadow.
Parameters:
primary - ARGB color that fills inside.
secondary - ARGB color that fills outside.
offset - Fading shadow's distance from the given box using x, y, w, and h arguments.
shadow
public Graphic shadow(int x,
int y,
int w,
int h,
int primary,
int secondary,
int offset)
Draw a drop shadow.
Parameters:
w - Width of the rectangle.
h - Height of the rectangle.
primary - ARGB color that fills inside.
secondary - ARGB color that fills outside.
offset - Fading shadow's distance from the given box using x, y, w, and h arguments.
create
public GuiElement create(Minecraft mc,
UIContext context)
Specified by:
create in class UIComponent
applyProperty
protected void applyProperty(UIContext context,
java.lang.String key,
GuiElement element)
Overrides:
applyProperty in class UIComponent
serializeNBT
public void serializeNBT(NBTTagCompound tag)
Overrides:
serializeNBT in class UIComponent