92 lines
1.5 KiB
Markdown
92 lines
1.5 KiB
Markdown
# Graphic.Graphic
|
|
|
|
[← Graphic](index.md) · [← Master](../../wiki.md)
|
|
|
|
Parça 4/4 · [önceki](Graphic-3.md)
|
|
|
|
public Graphic xy(int x,
|
|
int y)
|
|
|
|
Set X and Y in pixels relative to parent component.
|
|
|
|
rxy
|
|
|
|
|
|
|
|
public Graphic rxy(float x,
|
|
float y)
|
|
|
|
Set X and Y in pixels in percentage relative to parent component.
|
|
|
|
wh
|
|
|
|
public Graphic wh(int w,
|
|
int h)
|
|
|
|
Set width and height in pixels.
|
|
|
|
rwh
|
|
|
|
public Graphic rwh(float w,
|
|
float h)
|
|
|
|
Set relative width and height in percentage relative to parent component.
|
|
|
|
anchor
|
|
|
|
public Graphic anchor(float anchor)
|
|
|
|
Set both X and Y anchor point of this graphic object.
|
|
|
|
anchor
|
|
|
|
public Graphic anchor(float x,
|
|
float y)
|
|
|
|
Set X and Y anchor point of this graphic object individually.
|
|
|
|
anchorX
|
|
|
|
public Graphic anchorX(float x)
|
|
|
|
Set X anchor point of this graphic object.
|
|
|
|
Parameters:
|
|
x - A factor 0..1, where 0 is the left edge, 1 is the right edge.
|
|
|
|
anchorY
|
|
|
|
public Graphic anchorY(float y)
|
|
|
|
Set Y anchor point of this graphic object.
|
|
|
|
Parameters:
|
|
y - A factor 0..1, where 0 is the top edge, 1 is the bottom edge.
|
|
|
|
hoverOnly
|
|
|
|
public Graphic hoverOnly()
|
|
|
|
Set this graphic to display only when when mouse is over it.
|
|
|
|
draw
|
|
|
|
public final void draw(GuiContext context,
|
|
Area elementArea)
|
|
|
|
drawGraphic
|
|
|
|
protected abstract void drawGraphic(Area area)
|
|
|
|
serializeNBT
|
|
|
|
public NBTTagCompound serializeNBT()
|
|
|
|
serializeNBT
|
|
|
|
public void serializeNBT(NBTTagCompound tag)
|
|
|
|
deserializeNBT
|
|
|
|
public void deserializeNBT(NBTTagCompound tag)
|