Constructor
new EnvelopeButtons(_sketch, _buttonsStruct, _containerDimensions)
Create a new instance of EnvelopeButtons
Parameters:
Name | Type | Description |
---|---|---|
_sketch |
p5 | A p5.js sketch instance |
_buttonsStruct |
Object | An object representing the buttons to be created |
_containerDimensions |
Object | An object with width and height properties that represent the dimensions of the button container |
Extends
Methods
draw()
Draws the buttons on the sketch.
- Overrides:
touch_check(envEd)
Check if a button has been touched
Parameters:
Name | Type | Description |
---|---|---|
envEd |
Object | An object representing the visual envelope editor |
touch_check_helper() → {object}
Helper function for touch_check() method in Buttons class. Determines if a button has been clicked and which one it is.
- Overrides:
Returns:
Object with "click" and "index" properties indicating if a button has been clicked and which button was clicked, respectively. "click" is a boolean and "index" is an integer.
- Type
- object