Code: Select all
SCREEN 640,480,0,cbfullscreen
arial = LoadFont("arial", 65, 1,1,1)
coolb = LoadFont("coolb", 20)
mouse = MakeImage(16,16)
DrawToImage mouse
Color cbDarkRed
Line 16,0,0,16
Line 0,0,0,16
Line 0,0,16,0
DrawToScreen
ShowMouse mouse
Repeat
SetFont arial
Color cbred
Text 250,10,"ihQpeli"
r=Rand(0,255)
Color r,r,r
Circle 0,0,201,0
Line 100,100,100+Sin(Timer()/10)*100,100+Cos(Timer()/10)*100
SetFont coolb
If painike(325,120,"UUSI PELI") Then End
If painike(325,180,"LOPETA") Then End
Color cbgreen
Box 50, 400, 150, 50, 0
Text 52, 402, "FPS: "+FPS()
Text 52, 422, "Made by TheDuck"
DrawScreen
Forever
Function painike(x,y,txt$)
If MouseX()>x-10 And MouseX()<x+TextWidth(txt$)+20 And MouseY()>y-10 And MouseY()<y+TextHeight(txt$)+20 Then
Color cbred
If MouseHit(1) Then Return 1
Else
Color cbdarkred
EndIf
Box x-10,y-10,TextWidth(txt$)+20,TextHeight(txt$)+20,0
If MouseX()>x-10 And MouseX()<x+TextWidth(txt$)+20 And MouseY()>y-10 And MouseY()<y+TextHeight(txt$)+20 Then
Color 220,0,0
Else
Color cbred
EndIf
Box x-9,y-9,TextWidth(txt$)+18,TextHeight(txt$)+18,1
Color cbblack
Text x,y,txt$
EndFunction