
.Init_Menu
setupscreen ()
Global GraphicsWidth
Global GraphicsHeight
Global GraphicsByte
Global WinType
Global curText$
Global destText$
Global numSimbol%, maxSimbols%
Global cam = CreateCamera()
PositionEntity cam,0,0,-5
CameraRange cam,.1,400
Pivot=CreatePivot(cam)
PositionEntity Pivot,0,0,2
menu=LoadAnimMesh("res\menu1.b3d",Pivot)
selector=FindChild ( menu,"selector")
run=FindChild ( menu,"run")
EntityPickMode run, 2
cred=FindChild ( menu,"cred")
EntityPickMode cred, 2
options=FindChild ( menu,"options")
EntityPickMode options, 2
ext=FindChild ( menu,"exit")
EntityPickMode ext, 2
ExtractAnimSeq( menu,0,10,press_run)
ExtractAnimSeq( menu,10,20,nopress_run)
ExtractAnimSeq( menu,20,30,press_cred)
ExtractAnimSeq( menu,30,40,nopress_cred)
ExtractAnimSeq( menu,40,50,press_opt)
ExtractAnimSeq( menu,50,60,nopress_opt)
ExtractAnimSeq( menu,60,70,press_ext)
ExtractAnimSeq( menu,70,80,nopress_ext)
ExtractAnimSeq( menu,0,1,pokoy)
For i=1 To CountChildren(menu)
child = GetChild(menu,i)
EntityFX child,1
;EntityPickMode( child, 2 )
EntityShininess child,100
Next
.Update_Menu
;While KeyDown(1)=0
While Not KeyDown(1)
Animate menu,3,5,8,6
;EntityAlpha selector,0
ent= CameraPick(Cam,MouseX(),MouseY())
If ent <> 0
If ent = run Then
EntityAlpha selector,1
Animate menu,3,5,2
EndIf
EndIf
If ent <> 0
If ent = ext Then
EntityAlpha selector,1
Animate menu,3,5,7
;End
EndIf
EndIf
If ent <> 0
If ent = cred Then
EntityAlpha selector,1
Animate menu,3,5,3
EndIf
EndIf
If ent <> 0
If ent = options Then
EntityAlpha selector,1
Animate menu,3,5,5
EndIf
EndIf
Flip()
;EndIf
UpdateWorld()
RenderWorld()
.RUN
Flip (1)
Wend
.game:
.Functions
Function setupscreen ()
filein = ReadFile("setup.ini")
GraphicsWidth=ReadLine( filein )
GraphicsHeight=ReadLine( filein )
GraphicsByte=ReadLine( filein )
WinType=ReadLine( filein )
CloseFile( filein )
Graphics3D GraphicsWidth,GraphicsHeight,GraphicsByte,WinType
SetBuffer BackBuffer()
End Function
Function Mouse_point ()
Local x=MouseX()
Local y=MouseY()
;HidePointer()
;SetFont font2
;===================================================================================
;
If x>271 And y>209 ;
If x<321 And y<259 ;
Rect 271,209,52,52,0:Text 334,233,"<run",False,True ;run ;
EndIf ;
EndIf ;- <Button RUN>
;
;If ImageRectCollide (cur,MouseX(),MouseY(),0,271,209,52,52) ;
;Text 400,0,"run!",True,False ;: Goto RUN ;
;EndIf ;
;
;===================================================================================
;===================================================================================
;
If x>271 And y>274 ;
If x<321 And y<324 ;
Rect 270,274,52,52,0 :Text 334,297,"<settings",False,True ;
EndIf ;
EndIf ;- <Button SETTINGS>
;
;If ImageRectCollide (cur,MouseX(),MouseY(),0,271,274,52,52) ;
;Text 400,0,"settings!",True,False ;
;EndIf ;
;
;===================================================================================
;===================================================================================
;
If x>271 And y>339 ;
If x<321 And y<390 ;
Rect 270,339,52,52,0 :Text 334,360,"<exit",False,True;ext ;
EndIf ;
EndIf ;- <Button EXIT>
;
;If ImageRectCollide (cur,MouseX(),MouseY(),0,271,339,52,52) ;
;Text 400,0,"exit!",True,False ;
;EndIf ;
;
;===================================================================================
End Function