How do I check if a button is clicked?