Mouse Position

by Kaiochao
Get the position of the mouse in the screen or the world. [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Kaiochao.MousePosition##version=3

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Kaiochao.MousePosition##version=3

427 downloads
Version 3
Date added: Jun 23 2017
Last updated: May 1 2019
1 fan
The following procs are provided by a /mouse_position datum given to /client:
  • X()
  • Y()
  • WorldX()
  • WorldY()
  • ScreenLoc()
  • IsOverMap()
  • Moved()

Changelog

8/24/18
  • Changed how client.mouse_position is initialized, for easier overriding. Maybe you want to initialize it to some child of /mouse_position with your own Moved() override. Or something like that.
  • Added IsOverMap() so you can tell if the mouse is actually over a map.
  • Added ScreenLoc().
  • Added Moved(), a callback for when the mouse moves. This is one proc that gets called whenever the mouse moves over the map. Without this, you'd have to override client.MouseMove(), MouseDrag(), and MouseEntered() in order to catch every time the mouse moves.