I'm doing an editor right now, and I need to do a clickable button on BGI (it has to be on it).
Right now I did something like using outtextxy
, gave the coordinates then I made an if
using coordinates got by mousex
and mousey
, if it is equal to the coordinates from the outtext
, it does its job.
It is still not good enough for me, I want to create a function that when I use the outtext
, it creates at the same time the if
condition that I made (manually putting an if
condition for each outtext
is a massive coding job).
Can someone help me by showing me how can I do this function?