Hier erstmal, dass es nach dem Ende weiterläuft:
Code: Alles auswählen
InitSprite()
InitKeyboard()
OpenScreen(1024, 768, 32, "Lauftext")
Procedure CreateLauftext(file.s, font.s, size.l)
Shared LauftextX.f, Lauftext_Text.s
LauftextX = -1024
LoadFont(0, "font", size, #PB_Font_Italic)
If ReadFile(111, file)
Lauftext_Text = ReadString()
CloseFile(111)
ProcedureReturn 1
EndIf
ProcedureReturn 0
EndProcedure
Procedure ZeicheLauftext(Speed.f, y.w, color.l)
Shared LauftextX.f, Lauftext_Text.s
StartDrawing(ScreenOutput())
DrawingFont(UseFont(0))
DrawingMode(1)
FrontColor(Red(color), Green(color), Blue(color))
Locate(-LauftextX, y)
LauftextX + Speed
DrawText(Lauftext_Text)
If LauftextX > TextLength(Lauftext_Text) - 1000
LauftextX = -1024
EndIf
StopDrawing()
EndProcedure
If CreateLauftext("lauftext.txt", "Courir", 100) = 0 : End : EndIf
Repeat
ExamineKeyboard()
ClearScreen(0,0,0)
ZeicheLauftext(3.5, 10, $FF0000)
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)