Assignment 3: Buttons
For this assignment, I created a drawing program that uses buttons that change the pen size and color in response to user input. In essence, the three size buttons on top each store a size value that is assigned to the “lineSize” variable on click. Similarly, each color button changes the “lineColor” variable to the button’s color value on click. The “lineSize” and “lineColor” variables are then passed to a function that tracks the “mouseX”, “mouseY”, “pmouseX”, and “pmouseY” to draw a line using the “mousePressed” function.
The buttons’ x and y confines are also passed through arguments to create hover effects to add depth and tactility to the buttons.
For the second part of the assignment, to find an example of gratifying buttons on the web, I found that the Chrome browser’s button effects are some of the most tactile, gratifying, and memorable that I’ve found. The combo of hover effects and color variations really make the bookmarks, tabs, and navigation buttons feel like buttons.
Check it out here.