Hovering and clicking


show more Hovering and clicking provides you with in-depth training on Developer. Taught by Barton Poulson as part of the Interactive Data Visualization with Processing show less
please wait ...

Hovering and clicking

Another very common form of interaction with the mouse is to hover over an object and have it change or to click on the object and have it change, and in this I want to show you how both of those are going to work in Processing. I'm going to start with a comment here, and then I am going to start by putting in a palette. Come back to my list of palettes here. I think I'll use this one, copy that, and paste it back where I was.

And then I am going to create a few different variables that it will be using as part of the mouse interaction. What it is is I am going to be drawing two shapes. I'm giong to be drawing a circle and a square, and I am going to be changing the colors of them depending on whether we hover or click on them. So what I am going to do is create an integer variable here for the fill of the left shape, so left fill, lf. And that one is going to be the index number 2 in the palette. Then I am going to do a similar thing.

I am just going to copy that an...

Hovering and clicking
Video duration: 11m 16s 7h 43m Beginner

Viewers:

Hovering and clicking provides you with in-depth training on Developer. Taught by Barton Poulson as part of the Interactive Data Visualization with Processing

Subjects:
Developer IT
Software:
Processing
Author:
please wait ...