I got this Image:
. Global BOX = LoadImage("box.jpg")
Then we have the following Variables:
. Global BOX_X, BOX_Y
. ImageWidth(BOX), ImageHeight(BOX)
. MouseX(), Mouse(Y)
Theres two things I want to do.
#1. Find a way to return the X and Y Values of where
the Mouse Clicked on the image.
For that we need to know the X and Y of the Mouse, the BOX's X and Y, the BOX's Width and Height, to then compare them and make the Math Algo that would return thoses value.
What I'm missign is the Algo to find such thing.
#2. How would I go about making an algo to see if we have clicked on the image or not, without using image overlapsing commands?
Probably by comparing the BOX's X and Y with the Width and Height of the Image but I wonder how I would do such a thing.
I can see it in my mind but I can't seem to come out with thoses codes.
Could anyone assist me with this?
Using clear code that is readable, not suggesting anyone's code is messy, but you know lol.
Thanks for the Help.
. Global BOX = LoadImage("box.jpg")
Then we have the following Variables:
. Global BOX_X, BOX_Y
. ImageWidth(BOX), ImageHeight(BOX)
. MouseX(), Mouse(Y)
Theres two things I want to do.
#1. Find a way to return the X and Y Values of where
the Mouse Clicked on the image.
For that we need to know the X and Y of the Mouse, the BOX's X and Y, the BOX's Width and Height, to then compare them and make the Math Algo that would return thoses value.
What I'm missign is the Algo to find such thing.
#2. How would I go about making an algo to see if we have clicked on the image or not, without using image overlapsing commands?
Probably by comparing the BOX's X and Y with the Width and Height of the Image but I wonder how I would do such a thing.
I can see it in my mind but I can't seem to come out with thoses codes.
Could anyone assist me with this?
Using clear code that is readable, not suggesting anyone's code is messy, but you know lol.
Thanks for the Help.