Implement the three button states.