Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

what is the fundamentals of drawing on GUIs?

Asked by 4 years ago
Edited 4 years ago

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.

1 answer

Log in to vote
1
Answered by 4 years ago

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.

0
i thought there would be a better way, but okay User#23252 26 — 4y
1
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 turtle2004 167 — 4y
0
as long as you don't have overlapping instances, more instances means higher definition drawings RiskoZoSlovenska 378 — 4y
Ad

Answer this question