Tweet your mood
The final task in this mission is to combine tweeting with the mood faces we created earlier to tell the world how we currently feel. We extend the GUI section of our Smilie-O-Mat with a button and implement a status update method that doesn't just tweet a text message, but also uploads our current smiley.
Engage Thrusters
Let's tweet our mood:
Open the Smilie-O-Mat sketch from task 2, Let me change it.
The first thing we are going to add is a button to tweet the face, so let's reduce the size of the sliders to make room for it. Change the
drawSliders()
method like this:void drawSliders() { fill(0); strokeWeight(1); rect( 20,315,width-130,2 ); rect( 15 + map( mouth, 0, 1024, 0, width-130 ), 310, 10, 12 ); rect( 20,345,width-130,2 ); rect( 15 + map( eye, 0, 1024, 0, width-130 ), 340, 10, 12 ); rect( 20,375,width-130,2 ); rect( 15 + map( col, 0, 1024, 0, width-130 ), 370, 10, 12 ); }
We also need to adjust our
mousePressed()
andmouseDragged()
methods to make...