Class: GUIImage

GUIImage(parentDiv, url, altText, doAlignCenteropt)

Wrapper for elements placed in the GUI.

Constructor

new GUIImage(parentDiv, url, altText, doAlignCenteropt)

Creates a new GUI image element.

Parameters:
Name Type Attributes Default Description
parentDiv p5.Element

The parent element to attach the image to.

url string

The URL of the image.

altText string

The alt text for the image.

doAlignCenter boolean <optional>
true

Whether to center the image in its container.

Source:

Extends

Methods

hide()

Hides this field by setting its display to 'none'.

Overrides:
Source:

isHidden() → {boolean}

Checks if this field is currently hidden.

Overrides:
Source:
Returns:

True if the field is hidden, false otherwise.

Type
boolean

setText(text)

Sets the text content of this field.

Parameters:
Name Type Description
text string

The new text content for the field.

Overrides:
Source:

setTooltip(tooltip)

Sets the tooltip text for this field.

Parameters:
Name Type Description
tooltip string

The tooltip text to set.

Overrides:
Source:

show()

Shows this field by setting its display to '' (default).

Overrides:
Source: