If you are using events, you have to get them first. You can read a detailed information about how to use events in the
tutorial.
What you use in your code is "real-time input", but as far as I can see, the buttons do not overlap, so it is not a problem with the if-statements.
Your error is a pretty annoying one to find: (ping.h, lines 74-77)
Down.left = 730;
Down.top = 190;
Down.width = 20;
Down.width = 20;
What height does this button have?
Besides, header files should only contain declarations!