Re: Титры
вот фрагмент реалдьного кода
Function ShowAbout()
chm=PlayMusic("music/about.wav")
e=ReadFile("тут_файл_из_которого_надо_считать_инфу .ткст")
i=1
about_line(i)=Application+" v. "+Version
While Not Eof(e)
i=i+1
about_line(i)=ReadLine(e)
Wend
cnt=i
dy=600
; myfont=LoadFont_("Times New Roman Cyr",24,1,0,0,0,2,0)
; SetImageFont myfont
likosoft=CreateImageEx(LoadTexture("gfx/likosoft.png"),width,150*800/width,FI_NONE)
While Not KeyDown(1)
Cls
RenderWorld
dy=dy-1
StartDraw
For i=1 To cnt
ty=(i*25)+dy
If ty>-20 And ty<height
dcl#=1
If ty>height-100 Then dcl#=Float(height-ty)/100.0
If ty<80 Then dcl#=Float(ty+20)/100.0
SetColor 250*(dcl),240*dcl,200*dcl
DrawText(about_line(i),width*0.5,ty,1,0)
EndIf
Next
SetColor 255,255,255
SetBlend FI_LIGHTBLEND
DrawImageEx(likosoft,0,0)
EndDraw
While MilliSecs()-a<20
Wend
a=MilliSecs()
Flip 0
If dy<-cnt*25 Then Exit
Wend
While KeyDown(1) : Wend
FlushKeys()
MoveMouse 350,10
; FreeFont_ myfont
StopChannel chm
End Function
само сабой понятно, что массив надо объявить зарание и он должен быть строкового типа.
|