Added ButtonPressed Function

Added ButtonPressed function into Functions class.