Announcement

Collapse
No announcement yet.

Fast window scrolling

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Fast window scrolling

    How to window scrolling with high speed?

    I tried with this code works but is very slow. If scrollDistance I set with high value, then scrolling could be faster but image window looks truncated. How to solve the problem, Thank you.

    Code:
    func scrollWindow(var windowHandle, var scrollDirection)
        if(scrollDirection == TO_DOWN)
            if(scrollDistance >= -(TOUCH_AREA_HEIGHT))
                scrollDistance -= 10;
            else
                scrollDistance := TOUCH_AREA_HEIGHT;
            endif
        else if(scrollDirection == TO_UP)
            if(scrollDistance <= TOUCH_AREA_HEIGHT)
                scrollDistance += 10;
            else
                scrollDistance := -TOUCH_AREA_HEIGHT;
            endif
        endif
        gfx_ClipWindow(0, HEADER_HEIGHT, TOUCH_AREA_WIDTH, TOUCH_AREA_HEIGHT);
        gfx_Clipping(ON);
    
        img_SetPosition(windowHandle, 0, 0, scrollDistance);
        img_Enable(windowHandle, 0);
        img_Show(windowHandle, 0);
    endfunc
    Best Regards

    Edha

  • #2
    I found the last solution to call this function when the window is moved, not released. Note: Roll up window that has a single image will not cause flicker. But when a lot of pictures(dat/gci) on the window, will result in flicker. Better to use a hardware scroll like this http://forum.4dsystems.com.au/forum/...multiple-pages
    Last edited by edha; 21st April 2015, 03:00 AM. Reason: Add comment
    Best Regards

    Edha

    Comment

    Working...
    X