December 04, 2020, 10:19:56 AM

Author Topic: [bmx] MouseXSpeed, MouseYSpeed and MouseZSpeed by Perturbatio [ 1+ years ago ]  (Read 605 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
Title : MouseXSpeed, MouseYSpeed and MouseZSpeed
Author : Perturbatio
Posted : 1+ years ago

Description : For help with B3D users converting to BMax

Code :
Code: BlitzMax
  1. Function MouseXSpeed:Int()
  2.         Global lastX:Int =0
  3.         Local result:Int = MouseX()-lastX
  4.         lastX = MouseX()       
  5.         Return result
  6. End Function
  7.  
  8.  
  9. Function MouseYSpeed:Int()
  10.         Global lastY:Int =0
  11.         Local result:Int = MouseY()-lastY
  12.         lastY = MouseY()       
  13.         Return result
  14. End Function
  15.  
  16.  
  17. Function MouseZSpeed:Int()
  18.         Global lastZ:Int =0
  19.         Local result:Int = MouseZ()-lastZ
  20.         lastZ = MouseZ()       
  21.         Return result
  22. End Function


Comments :


*(Posted 1+ years ago)

 Doesnt work with movemouse like the Blitz3d version does.


Yan(Posted 1+ years ago)

 Add a reset flag to X/Y functions and 'overload' movemouse to also call the X/Y functions with the reset flag set.??


Ked(Posted 1+ years ago)

 See here: <a href="../Community/postsa7c0-2.html?topic=82710" target="_blank">http://www.blitzbasic.com/Community/posts.php?topic=82710[/url]


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal