Files

1.7 KiB

IMappetUIBuilder.textbox

← IMappetUIBuilder · ← Master

Parça 1/6 · sonraki

textbox(java.lang.String text, int maxLength) UITextboxComponent Create and insert a textbox UI component into UI, with default value filled and maximum length, being

built by this builder. default toggle(java.lang.String label) UIToggleComponent Create and insert a toggle UI component into UI being built by this builder. UIToggleComponent toggle(java.lang.String label, boolean state)

Create and insert a toggle UI component into UI, with default toggled state, being built by this builder. default trackpad() UITrackpadComponent Create and insert a trackpad UI component into UI being built by this builder. UITrackpadComponent trackpad(double value)

Create and insert a trackpad UI component into UI, with default filled value, being built by this builder.

Method Detail getCurrent

UIComponent getCurrent()

Get current UI component on to which it adds children components.

It's useful only after using layout(), column(int), row(int), and grid(int) to being able to position layout element.

background

IMappetUIBuilder background()

Enable default background (subtle gradient of two half transparent dark colors).

notClosable

default IMappetUIBuilder notClosable()

Disable an ability for players to manually close opened screens built with an API by pressing escape.

BEWARE: players will get stuck if you won't provide a way to close your custom UI manually. ProTip: use IScriptPlayer.closeUI() to close player's screen.

function main(c) { var ui = mappet.createUI(c, "handler").notClosable().background(); var close = ui.icon("close").id("exit");