Thread: GuiScrollCtrl
View Single Post
  #2  
Old 10-20-2010, 10:59 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
There's..

onScrolled(newposx,newposy,deltax,deltay) - either the horizontal or vertical scrollbar has been moved

You could probably use that event and do something like this..

PHP Code:
function scrollgui.onScrolled(newposx,newposy,deltax,deltay) {
  
// Prevent scrolldelta from causing an infinite loop
  
if (this.scrolled) {
    
this.scrolled = false;
    return;
  }
  
this.scrolled = true;
  
// Scroll
  
scrollgui.scrolldelta(0, 16 * (deltay > 0 ? 1 : -1));
} 
Docs: http://wiki.graal.net/index.php/Crea.../GuiScrollCtrl
__________________
Quote:
Reply With Quote