Added button function system

Added ability to add functions to buttons in gui.py.