MouseMove
From LoTROInterface Wiki
API Reference > Turbine.UI.Control.MouseMove()
Event fired when the mouse moves.
Syntax
Lua | |
---|---|
function Control:MouseMove(sender, args); |
Parameters
sender
Type: table
The event sender.
args
Type: table
The event arguments
- args.X, args.Y: Integers. Contain the coordinates of the mouse event relative to the upper-left corner of
sender
.
Remarks
Note that if you are dragging the window with your mouse, so that the position of the window is changing, that args.X
and args.Y
are the coordinates from the current position of the window, not the original position.
Here is some sample code to drag a window Window
around the screen.
Lua | |
---|---|
Window.MouseDown = function(sender, args) Window.MouseMove = function(sender, args) Window.MouseUp = function(sender, args)
|
If you omit sender.shiftX
and sender.shiftY
, it will still work, but the upper-left corner of the window will remain under the pointer regardless of where you clicked on it initially.