Files

1.8 KiB

UIComponent.y

← UIComponent · ← Master

Parça 6/7 · önceki · sonraki

public UIComponent rh(float value)

Set height relative in percents to parent component. Passed value should be 0..1, where 0 is element will be 0% of parent component's height, and 1 is 100% of parent's component height.

rh

public UIComponent rh(float value, int offset)

Set height relative in percents to parent component with offset. Passed value should be 0..1, where 0 is element will be 0% of parent component's height, and 1 is 100% of parent's component height.

Parameters: value - Percentage of how tall relative to parent component. offset - Offset in pixels (can be negative).

xy

public UIComponent xy(int x, int y)

Set X and Y in pixels relative to parent component.

rxy

public UIComponent rxy(float x, float y)

Set X and Y in pixels in percentage relative to parent component.

wh

public UIComponent wh(int w, int h)

Set width and height in pixels.

rwh

public UIComponent rwh(float w, float h)

Set relative width and height in percentage relative to parent component.

anchor

public UIComponent anchor(float anchor)

Set horizontal and vertical alignment anchor.

Parameters: anchor - Horizontal and vertical anchor.

anchor

public UIComponent anchor(float anchorX, float anchorY)

Set horizontal and vertical alignment anchor.

Parameters: anchorX - Horizontal anchor. anchorY - Vertical anchor.

anchorX

public UIComponent anchorX(float anchor)

Set horizontal alignment anchor.

anchorY

public UIComponent anchorY(float anchor)

Set vertical alignment anchor.

updateDelay

public UIComponent updateDelay(int updateDelay)

Set update delay in milliseconds (1000 = 1 second).