JoystickD.dpr 562 B

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