# GameClubButton

The game club button. The user will be directed to the game club of the Mini Game after tapping this button. For more information, see the user guide to Game Club.

# Properties

# string icon

The icon of the game club button, which is valid only when the type parameter is set to image.

Valid values of icon

Value Description Minimum Version
green Green icon
white White icon
dark White icon with black rounded background
light Green icon with white rounded background

# string type

The button type.

Valid values of type

Value Description Minimum Version
text A button that can be configured with background color and text
image A button that can only be configured with background image. The background image is stretched to fit the button.

# string text

The text on the button. It is valid only when type is text.

# string image

The background image of the button. It is valid only when type is image.

# Object style

The button style.

Property Type Description
left number The x-coordinate of the top-left corner
top number The y-coordinate of the top-left corner
width number Width
height number Height
backgroundColor string Background color
borderColor string The color of the border
borderWidth number The width of the border
borderRadius number The radius of the rounded corner on the border
textAlign string Text alignment method
fontSize number Font size
lineHeight number The line height of the text

Valid values of style.textAlign

Value Description Minimum Version
left Left
center Center
right Right

# Methods

# GameClubButton.show()

Shows the game club button.

# GameClubButton.hide()

Hides the game club button.

# GameClubButton.destroy()

Deletes the game club button.

# GameClubButton.onTap(function callback)

Listens on the event of tapping the game club button.

# GameClubButton.offTap(function callback)

Un-listens on the event of tapping the game club button.