Skip to content

IScreen ​

com.jsmacrosce.jsmacros.client.api.classes.render.IScreen

Since1.2.7

A script-created screen combines IDraw2D drawing with interactive widgets and screen input callbacks. Create one with Hud.createScreen and open it with Hud.openScreen; call reloadScreen() to clear and rebuild its elements by rerunning its init callback.

The game initializes a screen when it opens and when it is reloaded. Initialization clears elements added outside the init callback, so build the screen's contents in setOnInit(MethodWrapper).

Each input callback setter replaces the previous callback of that kind. Mouse positions use the same screen coordinates as drawing elements.

js
const screen = Hud.createScreen("my screen", true);  
screen.setOnInit(JavaWrapper.methodToJava(function (self) {
 self.addText("something to read", 10, 40, Color.rgb(0xFF, 0xFF, 0xFF), true);  
 self.addButton(10, 20, 100, 20, "a button", JavaWrapper.methodToJava(function (button) {
   Chat.log("clicked");  
 }));  
}));  
Hud.openScreen(screen);

Methods ​

addButton ​

addButton(int x, int y, int width, int height, String text, MethodWrapper<ClickableWidgetHelper<?, ?>, IScreen, Object, ?> callback): ClickableWidgetHelper<?, ?>Since1.0.5#
Adds a clickable button at the given screen position and size. Its callback receives the button helper.

Parameters:

  • x: screen x, the button's left edge
  • y: screen y, the button's top edge
  • width: how wide the button is
  • height: how tall the button is
  • text: the label on the button
  • callback: calls your method as a Consumer<ClickableWidgetHelper>
Returns: the button, as a helper
addButton(int x, int y, int width, int height, int zIndex, String text, MethodWrapper<ClickableWidgetHelper<?, ?>, IScreen, Object, ?> callback): ClickableWidgetHelper<?, ?>Since1.4.0#
Adds a clickable button ordered against other screen elements by zIndex.

Parameters:

  • x: screen x, the button's left edge
  • y: screen y, the button's top edge
  • width: how wide the button is
  • height: how tall the button is
  • zIndex: the z-index of the button against this screen's other elements
  • text: the label on the button
  • callback: calls your method as a Consumer<ClickableWidgetHelper>
Returns: the button, as a helper

addCheckbox ​

addCheckbox(int x, int y, int width, int height, String text, boolean checked, boolean showMessage, MethodWrapper<CheckBoxWidgetHelper, IScreen, Object, ?> callback): CheckBoxWidgetHelperSince1.8.4#
Adds a checkbox whose callback runs when its checked state changes. The showMessage parameter is currently ignored.

Parameters:

  • x: the x position of the checkbox
  • y: the y position of the checkbox
  • width: the width of the checkbox
  • height: the height of the checkbox
  • text: the text to display next to the checkbox
  • checked: whether the checkbox is checked or not
  • showMessage: ignored; does not change label visibility
  • callback: called when the checkbox state changes
Returns: a CheckBoxWidgetHelper for the given input.
addCheckbox(int x, int y, int width, int height, String text, boolean checked, MethodWrapper<CheckBoxWidgetHelper, IScreen, Object, ?> callback): CheckBoxWidgetHelperSince1.8.4#
Adds a checkbox whose callback runs when its checked state changes.
const screen = Hud.createScreen("a screen", true);
screen.setOnInit(JavaWrapper.methodToJava(function (self) {
  self.addCheckbox(10, 20, 20, 20, "enabled", false, JavaWrapper.methodToJava(function (box) {
    Chat.log(`now ${box.isChecked()}`);
  }));
}));
Hud.openScreen(screen);

Parameters:

  • x: the x position of the checkbox
  • y: the y position of the checkbox
  • width: the width of the checkbox
  • height: the height of the checkbox
  • text: the text to display next to the checkbox
  • checked: the initial checked state
  • callback: calls your method as a Consumer<CheckBoxWidgetHelper>
Returns: a CheckBoxWidgetHelper for the given input.
addCheckbox(int x, int y, int width, int height, int zIndex, String text, boolean checked, MethodWrapper<CheckBoxWidgetHelper, IScreen, Object, ?> callback): CheckBoxWidgetHelperSince1.8.4#
Adds a checkbox ordered against other screen elements by zIndex.

Parameters:

  • x: the x position of the checkbox
  • y: the y position of the checkbox
  • width: the width of the checkbox
  • height: the height of the checkbox
  • zIndex: the z-index of the checkbox
  • text: the text to display next to the checkbox
  • checked: whether the checkbox is checked or not
  • callback: calls your method as a Consumer<CheckBoxWidgetHelper>
Returns: a CheckBoxWidgetHelper for the given input.
addCheckbox(int x, int y, int width, int height, int zIndex, String text, boolean checked, boolean showMessage, MethodWrapper<CheckBoxWidgetHelper, IScreen, Object, ?> callback): CheckBoxWidgetHelperSince1.8.4#
Adds a checkbox ordered by zIndex whose callback runs when its checked state changes. The showMessage parameter is currently ignored.

Parameters:

  • x: the x position of the checkbox
  • y: the y position of the checkbox
  • width: the width of the checkbox
  • height: the height of the checkbox
  • zIndex: the z-index of the checkbox
  • text: the text to display next to the checkbox
  • checked: whether the checkbox is checked or not
  • showMessage: ignored; does not change label visibility
  • callback: called when the checked state changes
Returns: a CheckBoxWidgetHelper for the given input.

addCyclingButton ​

addCyclingButton(int x, int y, int width, int height, String[] values, String initial, MethodWrapper<CyclingButtonWidgetHelper<?>, IScreen, Object, ?> callback): CyclingButtonWidgetHelper<?>Since1.8.4#
Adds a button that cycles through the supplied values when clicked.
const screen = Hud.createScreen("a screen", true);
screen.setOnInit(JavaWrapper.methodToJava(function (self) {
  self.addCyclingButton(10, 20, 100, 20, ["low", "medium", "high"], "low",
    JavaWrapper.methodToJava(function (button) {
      Chat.log(`now ${button.getValue()}`);
    }));
}));
Hud.openScreen(screen);

Parameters:

  • x: the x position of the cycling button
  • y: the y position of the cycling button
  • width: the width of the cycling button
  • height: the height of the cycling button
  • values: the values to cycle through
  • initial: the initial value of the cycling button
  • callback: called when the value changes Consumer<CyclingButtonWidgetHelper>
Returns: CyclingButtonWidgetHelper for the given input.
addCyclingButton(int x, int y, int width, int height, int zIndex, String[] values, String initial, MethodWrapper<CyclingButtonWidgetHelper<?>, IScreen, Object, ?> callback): CyclingButtonWidgetHelper<?>Since1.8.4#
Adds a cycling button ordered against the screen's other elements by zIndex.

Parameters:

  • x: the x position of the cycling button
  • y: the y position of the cycling button
  • width: the width of the cycling button
  • height: the height of the cycling button
  • zIndex: the z-index of the cycling button
  • values: the values to cycle through
  • initial: the initial value
  • callback: called when the value changes
Returns: the added cycling button
addCyclingButton(int x, int y, int width, int height, int zIndex, String[] values, String[] alternatives, String initial, String prefix, MethodWrapper<CyclingButtonWidgetHelper<?>, IScreen, Object, ?> callback): CyclingButtonWidgetHelper<?>Since1.8.4#
Adds a cycling button with alternate display values, ordered by zIndex.

Parameters:

  • x: the x position of the cycling button
  • y: the y position of the cycling button
  • width: the width of the cycling button
  • height: the height of the cycling button
  • zIndex: the z-index of the cycling button
  • values: the values to cycle through
  • alternatives: the alternative values to cycle through
  • initial: the initial value of the cycling button
  • prefix: the prefix of the values
  • callback: called when the value changes
Returns: the added cycling button
addCyclingButton(int x, int y, int width, int height, int zIndex, String[] values, String[] alternatives, String initial, String prefix, MethodWrapper<?, ?, Boolean, ?> alternateToggle, MethodWrapper<CyclingButtonWidgetHelper<?>, IScreen, Object, ?> callback): CyclingButtonWidgetHelper<?>Since1.8.4#
Adds a cycling button with alternate display values and a callback-selected alternate list.

Parameters:

  • x: the x position of the cycling button
  • y: the y position of the cycling button
  • width: the width of the cycling button
  • height: the height of the cycling button
  • zIndex: the z-index of the cycling button
  • values: the values to cycle through
  • alternatives: the alternative values to cycle through
  • initial: the initial value of the cycling button
  • prefix: the prefix of the values
  • alternateToggle: selects which value list is active
  • callback: called when the value changes
Returns: the added cycling button

addLockButton ​

addLockButton(int x, int y, MethodWrapper<LockButtonWidgetHelper, IScreen, Object, ?> callback): LockButtonWidgetHelperSince1.8.4#
Adds a lock button at its fixed size. Its callback runs when clicked.
const screen = Hud.createScreen("a screen", true);
screen.setOnInit(JavaWrapper.methodToJava(function (self) {
  self.addLockButton(10, 20, JavaWrapper.methodToJava(function (button) {
    Chat.log(`locked: ${button.isLocked()}`);
  }));
}));
Hud.openScreen(screen);

Parameters:

Returns: LockButtonWidgetHelper for the given input.
addLockButton(int x, int y, int zIndex, MethodWrapper<LockButtonWidgetHelper, IScreen, Object, ?> callback): LockButtonWidgetHelperSince1.8.4#
Adds a fixed-size lock button ordered against other screen elements by zIndex.

Parameters:

  • x: the x position of the lock button
  • y: the y position of the lock button
  • zIndex: the z-index of the lock button
  • callback: calls your method as a Consumer<LockButtonWidgetHelper>
Returns: LockButtonWidgetHelper for the given input.

addSlider ​

addSlider(int x, int y, int width, int height, String text, double value, int steps, MethodWrapper<SliderWidgetHelper, IScreen, Object, ?> callback): SliderWidgetHelperSince1.8.4#
Adds a slider whose value ranges from 0 to 1. The step count includes both ends; counts below 2 are raised to 2. Overloads without a step count use a continuous slider.
const screen = Hud.createScreen("a screen", true);
screen.setOnInit(JavaWrapper.methodToJava(function (self) {
  self.addSlider(10, 20, 100, 20, "volume", 0.5, 10, JavaWrapper.methodToJava(function (slider) {
    Chat.log(`now ${slider.getValue()}`);
  }));
}));
Hud.openScreen(screen);

Parameters:

  • x: the x position of the slider
  • y: the y position of the slider
  • width: the width of the slider
  • height: the height of the slider
  • text: the text to be displayed inside the slider
  • value: the initial value on the 0-to-1 scale
  • steps: the number of steps the slider should have
  • callback: calls your method as a Consumer<SliderWidgetHelper>
Returns: a SliderWidgetHelper for the given input.
addSlider(int x, int y, int width, int height, int zIndex, String text, double value, int steps, MethodWrapper<SliderWidgetHelper, IScreen, Object, ?> callback): SliderWidgetHelperSince1.8.4#
Adds a stepped slider ordered against other screen elements by zIndex.

Parameters:

  • x: the x position of the slider
  • y: the y position of the slider
  • width: the width of the slider
  • height: the height of the slider
  • zIndex: the z-index of the slider
  • text: the text to be displayed inside the slider
  • value: the initial value of the slider
  • steps: the number of steps the slider should have
  • callback: calls your method as a Consumer<SliderWidgetHelper>
Returns: a SliderWidgetHelper for the given input.
addSlider(int x, int y, int width, int height, String text, double value, MethodWrapper<SliderWidgetHelper, IScreen, Object, ?> callback): SliderWidgetHelperSince1.8.4#
Adds a continuous slider whose value ranges from 0 to 1.

Parameters:

  • x: the x position of the slider
  • y: the y position of the slider
  • width: the width of the slider
  • height: the height of the slider
  • text: the text to be displayed inside the slider
  • value: the initial value of the slider
  • callback: calls your method as a Consumer<SliderWidgetHelper>
Returns: a SliderWidgetHelper for the given input.
addSlider(int x, int y, int width, int height, int zIndex, String text, double value, MethodWrapper<SliderWidgetHelper, IScreen, Object, ?> callback): SliderWidgetHelperSince1.8.4#
Adds a continuous slider ordered against other screen elements by zIndex; its value ranges from 0 to 1.

Parameters:

  • x: the x position of the slider
  • y: the y position of the slider
  • width: the width of the slider
  • height: the height of the slider
  • zIndex: the z-index of the slider
  • text: the text to be displayed inside the slider
  • value: the initial value of the slider
  • callback: calls your method as a Consumer<SliderWidgetHelper>
Returns: a SliderWidgetHelper for the given input.

addTextInput ​

addTextInput(int x, int y, int width, int height, String message, MethodWrapper<String, IScreen, Object, ?> onChange): TextFieldWidgetHelperSince1.0.5#
Adds a text field; its message is shown as a placeholder while empty.

Parameters:

  • x: the field's left edge
  • y: the field's top edge
  • width: the field width
  • height: the field height
  • message: the placeholder text
  • onChange: called with the changed text
Returns: the added text field
addTextInput(int x, int y, int width, int height, int zIndex, String message, MethodWrapper<String, IScreen, Object, ?> onChange): TextFieldWidgetHelperSince1.0.5#
A box the player can type into. The message is what it shows while nothing has been typed, not a label beside it, and the callback is given the current text and this screen on each change. The field is not usable until the screen is opened, and it is emptied along with the rest of the screen by an init, so anything typed into it is lost if the screen is reloaded.
const screen = Hud.createScreen("a screen", true);
screen.setOnInit(JavaWrapper.methodToJava(function (self) {
  self.addTextInput(10, 20, 100, 20, 0, "type a name", JavaWrapper.methodToJava(function (text) {
    Chat.log(`so far: ${text}`);
  }));
}));
Hud.openScreen(screen);

Parameters:

  • x: screen x, the field's left edge
  • y: screen y, the field's top edge
  • width: how wide the field is
  • height: how tall the field is
  • zIndex: the z-index of the field against this screen's other elements
  • message: the placeholder shown while the field is empty
  • onChange: calls your method as a Consumer<String>
Returns: the field, as a helper

buttonBuilder ​

buttonBuilder(): ButtonWidgetHelper.ButtonBuilderSince1.8.4#
Returns a button builder bound to this screen. Its build() adds the button to this screen; button height is fixed at 20.
const screen = Hud.createScreen("a screen", true);
screen.setOnInit(JavaWrapper.methodToJava(function (self) {
  self.buttonBuilder()
     .pos(10, 20)
     .size(100, 20)
     .message("press me")
     .action(JavaWrapper.methodToJava(function (button) {
       Chat.log("clicked");
     }))
     .build();
}));
Hud.openScreen(screen);
Returns: a new builder for buttons.

checkBoxBuilder ​

checkBoxBuilder(): CheckBoxWidgetHelper.CheckBoxBuilderSince1.8.4#
Returns a checkbox builder bound to this screen. Its build() adds the checkbox here; this overload starts unchecked.
const screen = Hud.createScreen("a screen", true);
screen.setOnInit(JavaWrapper.methodToJava(function (self) {
  self.checkBoxBuilder()
     .pos(10, 20)
     .size(20, 20)
     .message("enabled")
     .build();
}));
Hud.openScreen(screen);
Returns: a new builder for checkboxes.
checkBoxBuilder(boolean checked): CheckBoxWidgetHelper.CheckBoxBuilderSince1.8.4#
Returns a checkbox builder bound to this screen, initialized to checked.
const screen = Hud.createScreen("a screen", true);
screen.setOnInit(JavaWrapper.methodToJava(function (self) {
  self.checkBoxBuilder(true)
     .pos(10, 20)
     .size(20, 20)
     .message("on by default")
     .build();
}));
Hud.openScreen(screen);

Parameters:

  • checked: whether the checkbox should be checked by default
Returns: a new builder for checkboxes.

close ​

close(): voidSince1.1.9#
Closes this screen, invoking its close handling and returning to its parent if set.
const screen = Hud.createScreen("a screen", true);
screen.setOnInit(JavaWrapper.methodToJava(function (self) {
  self.addButton(10, 20, 100, 20, "close", JavaWrapper.methodToJava(function (button) {
    self.close();
  }));
}));
Hud.openScreen(screen);

cyclicButtonBuilder ​

cyclicButtonBuilder(MethodWrapper<Object, ?, TextHelper, ?> valueToText): CyclingButtonWidgetHelper.CyclicButtonBuilder<?>Since1.8.4#
Returns a cycling-button builder bound to this screen. The converter supplies the text displayed for each value; it allows values other than strings.
const screen = Hud.createScreen("a screen", true);
screen.setOnInit(JavaWrapper.methodToJava(function (self) {
  self.cyclicButtonBuilder(JavaWrapper.methodToJava(function (value) {
    return Chat.createTextHelperFromString(String(value));
  }))
     .pos(10, 20)
     .size(100, 20)
     .values(["low", "medium", "high"])
     .initially("low")
     .build();
}));
Hud.openScreen(screen);

Parameters:

  • valueToText: turns a value into the text shown on the button
Returns: a new builder for cycling buttons.

getButtonWidgets ​

getButtonWidgets(): List<ClickableWidgetHelper<?, ?>>Since1.0.5#
Returns helpers for script-added clickable widgets and Button widgets among the screen's children. Script-added helpers are reused; other buttons receive new wrappers on each call.
Returns: an immutable list snapshot of the matching widget helpers

getOnClose ​

getOnClose(): MethodWrapper<IScreen, Object, Object, ?>Since1.2.7#
Returns the close callback, or null if none was set. This is the callback itself; invoking it manually runs the callback but does not itself close the screen.
Returns: the close callback, or null if there is none

getScreenClassName ​

getScreenClassName(): StringSince1.2.7#
Returns this screen's simple Java class name, not its title.
Returns: the simple class name of this screen

getTextFields ​

getTextFields(): List<TextFieldWidgetHelper>Since1.0.5#
Returns helpers for script-added text fields and EditBox widgets among the screen's children. Script-added helpers are reused; other fields receive new wrappers on each call.
Returns: an immutable list snapshot of the matching text-field helpers

getTitleText ​

getTitleText(): TextHelperSince1.0.5#
Returns this screen's title as rich text.
Returns: the title of this screen

Note: TextHelper since 1.9.3

isAltDown ​

isAltDown(): booleanSince1.8.4#
Returns: whether the alt key is pressed.

isCtrlDown ​

isCtrlDown(): booleanSince1.8.4#
Returns: whether the control key is pressed.

isShiftDown ​

isShiftDown(): booleanSince1.8.4#
Returns: whether the shift key is pressed.

lockButtonBuilder ​

lockButtonBuilder(): LockButtonWidgetHelper.LockButtonBuilderSince1.8.4#
Returns a lock-button builder bound to this screen. Its button starts unlocked and has a fixed size.
Returns: a new builder for lock buttons.
lockButtonBuilder(boolean locked): LockButtonWidgetHelper.LockButtonBuilderSince1.8.4#
Returns a lock-button builder bound to this screen, with the initial locked state set by locked. The button has a fixed size.

Parameters:

  • locked: whether the lock button should be locked by default
Returns: a new builder for lock buttons.

reloadScreen ​

reloadScreen(): IScreenSince1.2.7#
Reinitializes this screen, clearing its elements and running the callback set with setOnInit(MethodWrapper). Elements added outside that callback are cleared too. Reinitialization is scheduled on the client thread.
const screen = Hud.createScreen("a screen", true);
screen.setOnInit(JavaWrapper.methodToJava(function (self) {
  self.addText("rebuilt", 10, 10, Color.rgb(0xFF, 0xFF, 0xFF), true);
}));
Hud.openScreen(screen);
// the widgets are laid out again from scratch
screen.reloadScreen();
Returns: self for chaining

setOnCharTyped ​

setOnCharTyped(MethodWrapper<Character, Integer, Object, ?> onCharTyped): IScreenSince1.8.4#
Runs when a key produces a character, receiving that character and the modifier-key bitmask. Use this rather than setOnKeyPressed(MethodWrapper) for text input; the character reflects the active keyboard layout and modifiers.
const screen = Hud.createScreen("a screen", true);
screen.setOnCharTyped(JavaWrapper.methodToJava(function (chr, modifiers) {
  Chat.log(`typed ${chr}`);
}));
Hud.openScreen(screen);

Parameters:

Returns: self for chaining

setOnClose ​

setOnClose(MethodWrapper<IScreen, Object, Object, ?> onClose): IScreenSince1.2.7#
Runs when this screen closes, receiving the screen being closed. It is a notification; it does not prevent the close or change which screen is restored.
const screen = Hud.createScreen("a screen", true);
screen.setOnClose(JavaWrapper.methodToJava(function (closing) {
  Chat.log(`closed ${closing.getTitleText()}`);
}));
Hud.openScreen(screen);

Parameters:

Returns: self for chaining

setOnKeyPressed ​

setOnKeyPressed(MethodWrapper<Integer, Integer, Object, ?> onKeyPressed): IScreenSince1.2.7#
Runs when a key is pressed over this screen, receiving the game's key code and the modifier-key bitmask. The key code identifies a key, not a typed character; use KeyBind to refer to named keys. Codes are GLFW key codes on older targets and SDL physical key codes on Minecraft 26.3 and later. Modifier bits remain shift=1, control=2, alt=4, and super=8 on every target. This callback does not consume the key; game handling may still occur.
const screen = Hud.createScreen("a screen", true);
screen.setOnKeyPressed(JavaWrapper.methodToJava(function (key, modifiers) {
  Chat.log(`key ${key} with modifiers ${modifiers}`);
}));
Hud.openScreen(screen);

Parameters:

Returns: self for chaining

setOnMouseDown ​

setOnMouseDown(MethodWrapper<Pos2D, Integer, Object, ?> onMouseDown): IScreenSince1.2.7#
Sets the callback for mouse-button presses over this screen. It receives the mouse position and button number (0 left, 1 right, 2 middle), in screen coordinates. A screen has one of these rather than a list, so setting it again replaces the last one. Returning from it does not stop the click reaching the widgets underneath, so this is for reacting rather than for swallowing.
const screen = Hud.createScreen("a screen", true);
screen.setOnMouseDown(JavaWrapper.methodToJava(function (pos, button) {
  Chat.log(`button ${button} at ${pos}`);
}));
Hud.openScreen(screen);

Parameters:

Returns: self for chaining

setOnMouseDrag ​

setOnMouseDrag(MethodWrapper<Vec2D, Integer, Object, ?> onMouseDrag): IScreenSince1.2.7#
Sets the callback for mouse dragging, which receives a segment from where the drag started to where the mouse is now, plus the button that is down. The segment's two ends are the start of the drag and the current position rather than the last two positions, so it covers the whole drag rather than one step of it. As with every other callback here, setting it again replaces the last one.
const screen = Hud.createScreen("a screen", true);
screen.setOnMouseDrag(JavaWrapper.methodToJava(function (from, button) {
  Chat.log(`dragging with ${button}, now at ${from.getEnd()}`);
}));
Hud.openScreen(screen);

Parameters:

Returns: self for chaining

setOnMouseUp ​

setOnMouseUp(MethodWrapper<Pos2D, Integer, Object, ?> onMouseUp): IScreenSince1.2.7#
Sets the callback for mouse-button releases over this screen, receiving the mouse position and which button came up. It runs whether or not the press started on this screen, so it can be the other half of a drag set up elsewhere.
const screen = Hud.createScreen("a screen", true);
screen.setOnMouseUp(JavaWrapper.methodToJava(function (pos, button) {
  Chat.log(`released ${button} at ${pos}`);
}));
Hud.openScreen(screen);

Parameters:

Returns: self for chaining

setOnScroll ​

setOnScroll(MethodWrapper<Pos2D, Pos2D, Object, ?> onScroll): IScreenSince1.2.7#
Runs when the player scrolls over this screen. The callback receives the mouse position and a second Pos2D containing horizontal and vertical scroll amounts in its x and y coordinates.
const screen = Hud.createScreen("a screen", true);
screen.setOnScroll(JavaWrapper.methodToJava(function (pos, amount) {
  Chat.log(`scrolled by ${amount.getX()} across and ${amount.getY()} up`);
}));
Hud.openScreen(screen);

Parameters:

Returns: self for chaining

sliderBuilder ​

sliderBuilder(): SliderWidgetHelper.SliderBuilderSince1.8.4#
Returns a slider builder bound to this screen. Set its step count and callback on the builder. Its initial position is a step index, clamped using the step count at the time initially is called, then converted to the widget's 0-to-1 value; set steps before initially when configuring both.
Returns: a new builder for sliders.

textFieldBuilder ​

textFieldBuilder(): TextFieldWidgetHelper.TextFieldBuilderSince1.8.4#
Returns a text-field builder bound to this screen and using its font. Its action receives the changed text and this screen, as with addTextInput.
Returns: a new builder for text fields.

texturedButtonBuilder ​

texturedButtonBuilder(): ButtonWidgetHelper.TexturedButtonBuilderSince1.8.4#
Returns a texture-drawn button builder bound to this screen. Supply textures for the enabled, disabled, enabled-focused, and disabled-focused states; no state falls back to another texture.
Returns: a new builder for textured buttons.