I'm mad at my ex for hitting on me
Why did that make you mad at your ex?
Because I didn't want to have sex with her.
Your ex may still have feelings for you and think it is okay to hit on you. But people should not hit on their ex. Plus you should not get involved with your ex unless you want to get back together with them.
Seems like you understand where I'm coming from.
I do understand, but I wouldn't put too much thought into it. Focusing on it could prove stressful for you. I would recommend forgetting about it and moving on.