; SetFont Example ; --------------- Graphics 640,480,0,2 SetBuffer BackBuffer() ; Two menu fonts plus a small one for the info overlay menu_font=LoadFont("Arial",24) pick_font=LoadFont("Arial",32,True,True) info_font=LoadFont("Arial",14) ; A little game menu Dim item$(3) item$(0)="Start Game" item$(1)="Options" item$(2)="High Scores" item$(3)="Quit" choice=0 While Not KeyDown(1) ; Up/Down move the highlight If KeyHit(200) And choice>0 Then choice=choice-1 If KeyHit(208) And choice<3 Then choice=choice+1 Cls For i=0 To 3 ; SetFont picks the font that all following Text commands use: ; the highlighted item gets the big bold italic font If i=choice Then SetFont pick_font Color 255,220,80 Else SetFont menu_font Color 160,160,160 End If Text 320,140+i*60,item$(i),True,True Next ; Switch to the small font for the overlay SetFont info_font Color 255,255,255 Text 0,0,"Up/Down: move highlight Esc: exit" Text 0,20,"SetFont swaps fonts freely between Text calls" Flip Wend End