Dies ist eigentlich ein einfaches Thema, aber erscheint irgendwie 'schwierig wegen Basic' oder so.
Code:
LoadFont1,"topaz.font",11
FindScreen1
WBStartup
SetErr:End:End SetErr
DEFTYPE.l
DEFTYPE.w y,stp,tpos
Window1,0,0,ScreenWidth,ScreenHeight,$140F,"win scroll test",2,1
Gosub refwin
ttext$=" Evil Midan, tyrant of the highest order, lies hidden deep within his underground lair. Allied security forces demand"
ttext$+" his reign to cease. one man is needed. that man is YOU. "
Repeat
ev=Event ;we don't wait...
Delay_1 ;...here we do!
Gosub winscroll
If ev=$2 Then Gosub refwin
Until ev=$200
End
.winscroll:
WScroll 1,y.w,InnerWidth,y+12,1,0,0:stp+1
;note: the Topaz font has a width of 8 pixl for each char
If stp>7 ;fonts char with-1
stp=0
tpos.w+1:If tpos>Len(ttext$) Then tpos=0
tchar$=Mid$(ttext$,tpos,1)
; WLocate InnerWidth-8,y:Print tchar$
Else
WLocate InnerWidth-stp,y:Print tchar$
EndIf
Return
.refwin
WCls
y=InnerHeight/2
Wline 0,y-2,InnerWidth,y-2,1
Wline 0,y+14,InnerWidth,y+14,1
stp.w=0
tpos.w=0
Return