; Rect Example ; ------------ Graphics 640,480,0,2 SetBuffer BackBuffer() health=75 While Not KeyDown(1) Cls ; Space damages the player, H heals If KeyHit(57) And health>0 Then health=health-10 If KeyHit(35) And health<100 Then health=health+10 If health<0 Then health=0 ; Filled Rect: the red health bar (2 pixels wide per point) Color 200,30,30 Rect 220,220,health*2,30,1 ; Outline Rect: the bar frame (solid flag 0) Color 255,255,255 Rect 218,218,204,34,0 Text 0,0,"Space: take damage H: heal Esc: exit" Text 0,20,"Rect 220,220,"+(health*2)+",30,1 (filled) Rect 218,218,204,34,0 (outline)" Text 300,260,health+" / 100" Flip Wend End