I think everyone comes up with great responses when they have a little more time to think about things.

Other responses that would have been good in your situation:
a)Do you know that your underwear is showing?
b)Do you know that your hat is on backwards?
c)Do you know that your pants are several sizes too big?

I think your response was the best one, though.
I prefer to give people an education.