Contents

TwMouseMotion (function)

int TwMouseMotion(int mouseX, int mouseY)

Description

Call this function to inform AntTweakBar that the mouse has moved.

AntTweakBar interprets this event and acts consequently. So TwMouseMotion has to be called each time your app receives a mouse motion event that is not handled directly by your app.

If you are using SDL, GLUT, GLFW or Windows (DirectX), the library provides some helper functions to handle events. See the section how to integrate for more details.

Parameters

mouseX

The new X position of the mouse, relative to the left border of the graphics window.

mouseY

The new Y position of the mouse, relative to the top border of the graphics window.

Return value

See also

TwMouseButton, TwMouseWheel, TwKeyPressed, How to integrate