Would it be possible to get the last mouse position in Cosmos? #1766
Unanswered
elkaamee326
asked this question in
Q&A
Replies: 3 comments 2 replies
-
Does anyone know how to make a working paint app that runs on Cosmos? Or a reference of a project that might work? Thanks :) |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can simply store two variables, |
Beta Was this translation helpful? Give feedback.
2 replies
-
I like events, they do the job. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I know that
MouseManager.X
andY
updates everytime the mouse moves (when you invoke it duringRun();
). How could I capture the last position that the mouse was in and use those values when drawing a line. This would be useful because I am currently working on a Paint Widget but I don't know how to get the last position. This is my current code:https://user-images.githubusercontent.com/69808082/117737999-08da5000-b1c9-11eb-832a-ef8951ac7d35.mp4
(The lag at the end and throughout the video was just produced from filming... Not the actual code... (Almost 0 lag in the code...))
Also, how could I draw those pixels onto the screen because when I run the code, it draws a line which follows my cursor position (this is a lazer) but how can I draw lines onto the screen (specifically onto the form)?
Thanks :)
Beta Was this translation helpful? Give feedback.
All reactions