addhook.bmx 377 B

1234567891011121314151617181920212223242526
  1. 'This function will be automagically called every Flip
  2. Function MyHook:Object( id,data:Object,context:Object )
  3. Global count
  4. count:+1
  5. If count Mod 10=0 Print "Flips="+count
  6. End Function
  7. 'Add our hook to the system
  8. AddHook FlipHook,MyHook
  9. 'Some simple graphics
  10. Graphics 640,480,0
  11. While Not KeyHit( KEY_ESCAPE )
  12. Cls
  13. DrawText MouseX()+","+MouseY(),0,0
  14. Flip
  15. Wend