Code: Select all
FrameLimit 40
back=MakeImage(ScreenWidth(),ScreenHeight())
back2=MakeImage(ScreenWidth(),ScreenHeight())
fontti=LoadFont("ahsdouhg3u5asidug",30)
fontti2=LoadFont("ahsdouhg3u5asidug",15)
Repeat
SetWindow "FPS:"+FPS()
For i=1 To ScreenHeight()
DrawToImage back
Color r,g,b
Line x,0,x,ScreenHeight()
If x<ScreenWidth() then x=x+1
If x<ScreenWidth() Then x=x+1
i=i+1
If r<255 Then r+1
If g<255 Then g+1
If b<255 Then b+1
DrawToScreen
Next i
DrawImage back,0,0
SetFont fontti
Color 0,255,90
CenterText ScreenWidth()/2,10,"Über Siisti Peli!"
SetFont fontti2
If SiistiButtoni (30,90,"SINGLEPLAYER") Then liikkuu=1
if SiistiButtoni (30,120,"MULTIPLAYER") Then liikkuu=1
if SiistiButtoni (30,150,"HIGHSCORES") Then liikkuu=1
if SiistiButtoni (30,180,"EXIT GAME") Then End
Color 0,255,90
CenterText ScreenWidth()/2,ScreenHeight()-20,"Pikapelivalikko by Eur0-5isu"
If liikkuu Then
Color cbblack
Box x2,0,leveys,ScreenHeight()
DrawImage back,leveys,0
If leveys<ScreenWidth() Then
leveys+10
Wait 100
Else
MakeError "Tässä kohtaa pitäisi tapahtua jotain."
EndIf
EndIf
DrawScreen
Forever
Function SiistiButtoni(Xs,Xy,teksti$)
Color 255,255,255
Line Xs,Xy,Xs,Xy+TextHeight(teksti$)+4
Line Xs,Xy,Xs+TextWidth(teksti$)+12,Xy
Line Xs,Xy+TextHeight(teksti$)+4,Xs+TextWidth(teksti$)+ScreenWidth()-(0+Xs),Xy+TextHeight(teksti$)+4
Text Xs+2,Xy+2,Teksti$
If MouseX()>Xs And MouseX()<Xs+TextWidth(teksti$) And MouseY()>Xy And MouseY()<Xy+TextHeight(teksti$)+4
Color 12,160,30
Line Xs,Xy,Xs,Xy+TextHeight(teksti$)+4
Line Xs,Xy,Xs+TextWidth(teksti$)+12,Xy
Line Xs,Xy+TextHeight(teksti$)+4,Xs+TextWidth(teksti$)+ScreenWidth()-(0+Xs),Xy+TextHeight(teksti$)+4
If MouseDown(1)
Color 0,255,0
Line Xs,Xy,Xs,Xy+TextHeight(teksti$)+4
Line Xs,Xy,Xs+TextWidth(teksti$)+12,Xy
Line Xs,Xy+TextHeight(teksti$)+4,Xs+TextWidth(teksti$)+ScreenWidth()-(0+Xs),Xy+TextHeight(teksti$)+4
lol=0
ElseIf MouseUp(1) Then
lol=1
EndIf
EndIf
Return lol
EndFunction