Mirage Source
Scrolling Code - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: Scrolling Code (/showthread.php?tid=2472)



Scrolling Code - Tony - 03-01-2009

Yes, I'm creating my own scrolling code. Currently practicing with my object editor.

So I have a problem, yes it scrolls but the lazyness isn't working

Code:
Case Dir_Right
            If ViewX < TotalWidth Then
                TempV = ViewX + ScrollAmount
                Do Until ViewX = TempV
                    ViewX = ViewX + Lazyness
                Sleep 1
                DoEvents
                Loop
            End If

Lazyness is what's going to make it scroll lately smoothly kinda like a drag effect. But it just jumps to the scrollamount.

Any ideas why it doesn't loop? Like ViewX = + 1, ViewX = + 1, ViewX = + 1, ViewX = + 1


Re: Scrolling Code - GIAKEN - 03-01-2009

Change Lazyness to 1?


Re: Scrolling Code - Tony - 03-01-2009

GIAKEN Wrote:Change Lazyness to 1?

It is 1.


Re: Scrolling Code - Labmonkey - 03-01-2009

instead of looping, maybe break for the sub?