i just can't figure out how to make a a script that allows a person to draw on a GUI(screen and surface)
i don't understand how its done.
i just can't figure out how to make a a script that allows a person to draw on a GUI(screen and surface)
i don't understand how its done.
The way I would approach this problem is to simply clone small dots repeatedly when the mouse is held down. This creates a lot of GUI objects, which probably isn't the best thing for performance, but I don't know how else to do this. You might need some math, and things could get tricky if you wanted to smooth out the drawing, especially when the cursor is moved fast.
The general concept is fairly simple: just create small dots via many image labels when the user holds their mouse down.
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
i thought there would be a better way, but okay
To reduce the amount of elements created you could avoid creating another element until the mouse is a minimum distance away from the previous element, as there's no need to be placing 5 frames on top of each other for example
as long as you don't have overlapping instances, more instances means higher definition drawings