Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Fixed scrolling intervals(GuiScrollCtrl)? (https://forums.graalonline.com/forums/showthread.php?t=77927)

projectigi 12-14-2007 10:13 PM

Fixed scrolling intervals(GuiScrollCtrl)?
 
Hi,

is there a way to make GuiScrollCtrl to scroll at fixed intervals? e.g. 16 pixels instead of 1?

gemini2 12-14-2007 10:28 PM

PHP Code:

wheelscrolllines integer

Nearest I could find

DustyPorViva 12-14-2007 11:16 PM

You could probably script it... I made my editor resize at integers. Try this:
PHP Code:

function ScrollGUI.onScrolled(newx,newy) {
  
temp.newscrollx=int(newx/16)*16;
  
temp.newscrolly=int(newy/16)*16;
  
ScrollGUI.scrollpos={temp.newscrollx,temp.newscrolly};


Not really sure how this will work though.

coreys 12-15-2007 12:41 AM

I'm pretty sure there's a built in variable. I believe what Gemini suggested is it.

DustyPorViva 12-15-2007 12:59 AM

That's only for controlling the integers the scrollwheel scrolls at.

projectigi 12-15-2007 01:13 AM

Quote:

Originally Posted by DustyPorViva (Post 1363853)
That's only for controlling the integers the scrollwheel scrolls at.

well problem is onScrolled triggers even while you are still "pulling" the scrollbar xD
i guess i know how i can do intervals at 16px, will require 1-2 more guictrl's but i dont know any other way


All times are GMT +2. The time now is 01:22 AM.

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