skimboarder / hfoss-finalproject

GNU General Public License v2.0
1 stars 0 forks source link

Convert Button class to be an object #2

Closed skimboarder closed 6 years ago

skimboarder commented 6 years ago

The button class should be an object that takes its text, postion, and callback func as parameters.

There should be a function to draw the button that will be called inside of the game loop.

Class: Button var msg - text to display on button var x - x co-ord of button var y - y co-ord of button var h - height of button var w - width of button var callback - function in Game object to call when button is clicked drawButton() - will draw the button at its location on the game screen