Button implement slider touch event

How do I implement a button that listens for click and slide events, similar to the fire button in PUBG, but also changes the direction of the character’s fire