1. text mode mouse routines
- Posted by Thys de Jong <thys at SCSINTERNET.COM> Jan 02, 1999
- 395 views
Thanks to all who answered my previous queeries. Your help is greatly appreciated. I've been attempting the mouse routines and so far have only managed to show a mouse pointer while at generatinging ex.err files. what I'm trying to do is: wait for a key response with wait_key() and at the same time allow a left mouse click to be that response: say if at position(12,25) my screen shows: A My Mahjongg and pressing A takes me to play mymah.ex how do I make the screen area 12, 25 to 35 respond to a left mouse click and have it convert this click to have the same meaning as pressing A? thanks for any help you can give me. Thys de Jong
2. Re: text mode mouse routines
- Posted by Patrick Quist <quistnet at HOTMAIL.COM> Jan 02, 1999
- 377 views
Thys de Jong Wrote : >what I'm trying to do is: > >wait for a key response with wait_key() and at the same time allow a > left mouse click to be that response: Don't use wait_key(). ( machine_func(26,0) ) Use get_key() ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
3. Re: text mode mouse routines
- Posted by Irv Mullins <irv at ELLIJAY.COM> Jan 02, 1999
- 374 views
On Sat, 2 Jan 1999 09:50:46 +0000, Thys de Jong <thys at SCSINTERNET.COM> wrote: >Thanks to all who answered my previous queeries. > >Your help is greatly appreciated. > >I've been attempting the mouse routines and so far have only managed >to show a mouse pointer while at generatinging ex.err files. > >what I'm trying to do is: > >wait for a key response with wait_key() and at the same time allow a > left mouse click to be that response: -- This routine will scan keyboard and mouse - build upon it include get.e include mouse.e constant ESC = 27 object key, mouse mouse_pointer(1) key = -1 while key != ESC do mouse = get_mouse() if not atom(mouse) then position(1,1) printf(1,"event=%02d x=%03d y=%03d",mouse) end if key = get_key() end while You can convert the x and y coordinates to row/column by dividing. Irv