GuiButton - Comcraft Mod Loader API

API Docs for: 0.6
Show:

GuiButton Class

Extends GuiElement
Module: Comcraft Mod Loader

Constructor

GuiButton

(
  • id
  • xPos
  • yPos
  • [displayString]
)

Parameters:

  • id Number

    ID of the button element

  • xPos Number

    X position on the screen. 0 is left.

  • yPos Number

    Y position on the screen. 0 is top.

  • [displayString] String optional

    Text to display on the button.

Item Index

Methods

Methods

buttonHeight

() Number static

Get the height of the button. Varies by the mobile screen size.

Returns:

Number:

the height

buttonWidth

() Number static

Get the width of the button. Varies by the mobile screen size.

Returns:

Number:

the width

getId

() Number

Get the ID of the button.

Returns:

Number:

the button ID