Using Switch in a If if condition

I doubt it; you also never seem to assign a value to buttonState, so buttonState will always be 0.