Contents

TwMouseButton (function)

int TwMouseButton(TwMouseAction action, TwMouseButtonID button)

Description

Call this function to inform AntTweakBar that a mouse button is pressed.

AntTweakBar interprets this event and acts consequently. So TwMouseButton has to be called each time your app receives a mouse button 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

action

Tells if the button is pressed or released. It is one of the TwMouseAction constants.

button

Tells which button is pressed. It is one of the TwMouseButtonID constants.

Return value

See also

TwMouseAction, TwMouseButtonID, TwMouseMotion, TwMouseWheel, TwKeyPressed, How to integrate