Files

1.5 KiB

UILayoutComponent.width

← UILayoutComponent · ← Master

Parça 3/3 · önceki

horizontal.button("Top left").xy(10, 10).wh(100, 20); horizontal.button("Middle").x(size / 2 - 50).ry(0.5, -10).wh(100, 20); horizontal.button("Bottom right").x(size - 110).ry(1, -30).wh(100, 20);

ui.label("Horizontal scroll").background(0x88000000).rx(0.75).ry(0.5, -120).wh(100, 20).anchorX(0.5).labelAnchor(0.5, 0);

c.getSubject().openUI(ui); }

horizontal

public UILayoutComponent horizontal()

Enables horizontal mode. This usable when scroll() is enabled.

width

public UILayoutComponent width(int width)

Per component width (in pixels) that should be sustained within IMappetUIBuilder.grid(int) layout type. This doesn't work with any other component than grid.

items

public UILayoutComponent items(int items)

How many components per row that should be placed within IMappetUIBuilder.grid(int) layout type. This option doesn't work with any other component than grid.

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 UIParentComponent

deserializeNBT

public void deserializeNBT(NBTTagCompound tag)

Overrides: deserializeNBT in class UIParentComponent