Skip to content
Riemann edited this page Nov 20, 2013 · 5 revisions

This is the button class. When sent a path to an image and a starting point on the screen, x and y coordinates, it creates a button. Once a button is instantiated, it can be printed to the screen calling the drawButton method. When sent the coordinates of the location of the mouse on screen in the update loop, the button class also returns a boolean of whether or not the mouse is over the button. This simplifies checking if a button is clicked.

Class created by Ben Stein

See: Source

Clone this wiki locally