Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-15-2009, 03:33 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Disable scrolling in guiscrollcontrols

I'm not sure if there is a way, but there should be a way to disable default scrolling on guiscrolls. I've seen a lot of people that would like to see this, and this would help some of us script our own scrolling systems.

Even if vscrollbar and hscrollbar are alwaysOff, you can still scroll with mousewheel...
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #2  
Old 05-15-2009, 03:42 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Arrow keys work as well.
Reply With Quote
  #3  
Old 05-15-2009, 06:54 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
You can accomplish it like so..

PHP Code:
// In your GuiScrollCtrl put in a couple variables..
this.disabled true;
this.lastspos = {0,0};

// Then have the onScrolled function for that Ctrl
function yourScrollObj.onScrolled() {
  
temp.lastpos yourScrollObj.lastspos[0SPC yourScrollObj.lastspos[1];
  if (
yourScrollObj.scrollpos == lastpos) return; // To prevent unneeded changes.
  
if (yourScrollObj.disabled) {
    
temp.spos yourScrollObj.lastspos// Scroll's Last Scroll Position
    
yourScrollObj.scrollto(spos[0], spos[1]);
  }
  else 
yourScrollObj.lastspos yourScrollObj.scrollpos.tokenize();

I'm sure you could implement a generic event for it using catchevent and whatnot

Edit: Added a statement to prevent unneeded looping.
__________________
Quote:

Last edited by fowlplay4; 05-15-2009 at 11:07 PM..
Reply With Quote
  #4  
Old 05-15-2009, 07:21 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
scrollto() also triggers onScrolled(), so really you'd be ending up with a loop. I don't think it'd be unreasonable to have a flag that disables default scrolling.
Reply With Quote
  #5  
Old 05-15-2009, 07:56 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by fowlplay4 View Post
You can accomplish it like so..
Not really, what if I wanted to script custom scrolling to where if you scroll on the horizontal scroll bar it will scroll sideways and if you scroll anywhere else it will scroll vertically? You can't really do that without disabling every single part of the default scrolling, because it'll always scroll vertically.

Additionally, if I even tried scripting a workaround, it would end up getting really sloppy and needlessly complex.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #6  
Old 05-15-2009, 08:42 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Tried making the profile of the scroll control non-modal ?
Reply With Quote
  #7  
Old 05-15-2009, 08:57 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Stefan View Post
Tried making the profile of the scroll control non-modal ?
Not being able to click inside/interact with the control is a huge disadvantage.
Reply With Quote
  #8  
Old 05-15-2009, 10:14 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Well the goal was to not let the user scroll anymore with mouse or keyboard. When you make the scroll control non-modal then the controls inside the scroll control can still remain modal.
Reply With Quote
  #9  
Old 05-16-2009, 09:30 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Stefan View Post
Well the goal was to not let the user scroll anymore with mouse or keyboard. When you make the scroll control non-modal then the controls inside the scroll control can still remain modal.
Oh, I wasn't aware of that. Quite interesting.
Reply With Quote
  #10  
Old 05-16-2009, 06:41 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by Stefan View Post
Well the goal was to not let the user scroll anymore with mouse or keyboard. When you make the scroll control non-modal then the controls inside the scroll control can still remain modal.
That's pretty interesting, I'll try that, thanks.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #11  
Old 05-16-2009, 06:47 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
What is this non-modal thing?
Reply With Quote
  #12  
Old 05-16-2009, 07:11 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by DustyPorViva View Post
What is this non-modal thing?
PHP Code:
useOwnProfile true;
profile.modal false
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:36 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.