Circle Onclick?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 3
- Joined: Tue Aug 20, 2013 7:50 am
Circle Onclick?
Well, i have a bit of a problem . I'm gonna make a quick overview of the situation i have an image in the shape of a circle if i click on it i want it to preform an action it's as simple as that. I get how i do it with retangels. But how on earth are you supposed to it with circles. Sorry for the somewhat noobish question i went trough the whole forum but simply couldn't find an awnser maybe an onclick command with a drable would be superhandy. thanks in advance micheal
Re: Circle Onclick?
You can use a distance function, There's a snippet for one here. I attached an example.
The example uses love.graphics.circle, So the x and y values represent the center of the circle. If you're using an image the x and y would represent the top left corner. keep that in mind.
The example uses love.graphics.circle, So the x and y values represent the center of the circle. If you're using an image the x and y would represent the top left corner. keep that in mind.
- Attachments
-
- circle.love
- (438 Bytes) Downloaded 165 times
-
- Prole
- Posts: 3
- Joined: Tue Aug 20, 2013 7:50 am
Re: Circle Onclick?
Wow thanks guys it worked perfectly thanks
Who is online
Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Bing [Bot], TurboYeti and 1 guest