Class: Button

Button(pos, width, height-, text, bg_color)

Class UI.Button class

Constructor

new Button(pos, width, height-, text, bg_color)

Constructor for the button class
Parameters:
Name Type Description
pos p5.Vector Position of the top left of the button
width float The width of the button
height- float The height of the button
text string The text to display on the button
bg_color p5.Color The background color
Source:

Methods

draw()

Draws the button
Source:

isPressed() → {Boolean}

Determines if the button is pressed
Source:
Returns:
- If the button is pressed
Type
Boolean

tick()

Ticks the button
Source:

untick()

Unticks the button
Source:

Documentation generated by JSDoc 4.0.2 on Wed Oct 29 2025 23:51:02 GMT-0700 (Pacific Daylight Time)