Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!ulysses!allegra!mit-eddie!bloom-beacon!think!ames!pasteur!ucbvax!CORY.BERKELEY.EDU!dillon From: dillon@CORY.BERKELEY.EDU.UUCP Newsgroups: comp.sys.amiga Subject: Re: Scrolling SuperBitMaps Message-ID: <8801231940.AA12667@cory.Berkeley.EDU> Date: 23 Jan 88 19:40:08 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 41 Posted: Sat Jan 23 14:40:08 1988 :In A-Talk Plus I do that in the Zoom for the Tek4014 emulator. I have two :horizontal and vertical scrolling gadgets that control a 1024 x 780 :superbitmap. When I get a GADGETDOWN, I smooth-scroll until the gadget is :released looping for INTUITICKS messages. A little voodoo with ModifyIDCMP :is also needed. I recall that the source code for the Lines Workbench demo :(probably by Bart) does just that. An easier way would be to set the FOLLOWMOUSE flag for the prop gadget. Then you get mouse movement events *while* the person is sliding the gadget around. The example code below will also handle the update as fast as the program can take it (that is, it uses only the very latest mousemove). This is a somewhat different effect than INTUITICKS in that if you have an extremely fast display update it will look smoother. while (mess = GetMsg(win->UserPort)) { switch(mess->Class) { GADGETDOWN: if (mess->IAddress == (APTR)&MySliderGadget) sgisdown = 1; ModifyTheStuff(mess->MouseY); break; GADGETUP: if (mess->IAddress == (APTR)&MySliderGadget) sgisdown = 0; ModifyTheStuff(mess->MouseY); break; MOUSEMOVE: MouseMovedFlag = 1; MouseX = mess->MouseX; MouseY = mess->MouseY; break; etc.... } ReplyMsg(mess); } if (MouseMovedFlag) { MouseMovedFlag = 0; if (sgisdown) ModifyTheStuff(MouseY); /* do other stuff */ }