JoystickDemo.dpr 572 B

12345678910111213141516171819202122
  1. {: Using the TJoystick to retrieve joystick position.
  2. The component make it fairly easy to get this info. The first method is to use
  3. the events, the second it use its properties.
  4. I've tried to put both methods at use in this sample :<ul>
  5. <li>spheres on the right are adjusted when button are pressed/depressed
  6. <li>the 3D stick position is read in the rendering loop
  7. </ul>
  8. }
  9. program JoystickDemo;
  10. uses
  11. Forms,
  12. Unit1 in 'Unit1.pas' {Form1};
  13. {$R *.RES}
  14. begin
  15. Application.Initialize;
  16. Application.CreateForm(TForm1, Form1);
  17. Application.Run;
  18. end.