Here is a sample of what I do. It might not seem very obvious at first, but a lot has to happen in the correct order to handle multi-touch and over-lapping buttons and windows.
the way you are using global variables may not work the way you expect if there is more than one active touch going on...
I use a Family called SpriteButtons that has family instance variables to describe what each button does. When I have over-lapping windows/menus, I use a family member that is not Type "Button" to act as a shield to make buttons under it not accessible.
in this sample there are three buttons, the Home button changes the background colour. The Pause button disables/re-enables the Home and Settings buttons. The Settings button calls up a dialog that mostly covers the three buttons so you can see how the buttons below get blocked, except for the parts not covered. The dialog box can be dragged around and has a close button.
To make a button do something, you click on it. But if you change your mind and slide the mouse (or touch) off the button, then nothing will happen. If you touch someplace not over a button and slide the touch onto a button, nothing will happen. Or if you click on one button and slide to another button, nothing will happen.
if you click and hold down a button, but then another touch disables that button, the first button will not activate when you let go. You can't have two touches trying to use the same button... and plenty of other weird multi-touch scenarios you might not expect but your users will accidentally do.
Each button has an instance variable that tells what function should be called when it is clicked. So, to add new buttons, all you have to do is add the sprite to the SpriteButtons family, and create a function for what you want the button to do. You don't have to change any of the core Touch Start/Is in touch/Touch End code. (Buttons need Up, Hover, Down, and Disabled animations)
This is the first time I have done this in C3. In C2 it is easy to call a function from text in an instance variable - in C3 you have to remember to set up a mapping for that unless I am missing something... I also think I have found a multi-touch bug in C3 - a new Touch that hasn't moved at all seems to sometimes prevent other touches from updating properly. I will test that out a little more to make sure it isn't my fault and may submit a bug report.
https://www.rieperts.com/games/forum/MyButtons.c3p