Sergey Plis
Thu, 04 Aug 2005 10:01:50 -0700
Thank you!
Here is the problem I have. My code
\ here I have x y mouse positions which I got with the CODE: field of
glcanvas in theseus
DOPRESS
\ some variables initialization
0 framew ! 0 frameh !
\ record new mouse position since I use it to paint
2dup
yclicked ! xclicked !
\ throw away everything except the last x y coordinates
2swap 2drop 2swap 2drop
\ repaint glcanvas
gear-task @ IF make-gear-task THEN
When I click on the glcanvas the procedure starts (I look what's on the stack before DOPRESS gets called) and does nothing. Even my mouse is up already when I move it away from glcanvas to a button DOPRESS starts working (again I see what's on the stack). Except the latest x y coordinates are on the button, not where I raised the mouse on the stack. What I do wrong? Thanks in advance. -- Sergey On Thu, Aug 04, 2005 at 10:25:25AM +0200, Bernd Paysan wrote: > On Wednesday 03 August 2005 23:20, Sergey Plis wrote: > > Hello, > > > > I'm trying to follow mouse coordinates while it is pressed inside > > GLcanvas. Thus far I know how to detect mouse press and mouse release > > event. How to know mouse coordinates while it is pressed? > > Look at the DOPRESS iterator (WIDGET VIEW DOPRESS in MINOS vocabulary). This > will call the remainder of the word with a new x y mouse coordinate > whenever the mouse moves (as long as the button is pressed). The DOPRESS > iterator also passes two arbitrary parameters it got to the remainder of > the word (underneath the current x and y), usually the start X and Y of the > mouse (e.g. for selection rectangle). > > -- > Bernd Paysan > "If you want it done right, you have to do it yourself" > http://www.jwdt.com/~paysan/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]