CGPdocs

inputs_mouse_parameters

Mouse state (inputs.mouse) with the cursor position, the buttons, the scroll and the GUI flag.

module 15_input_devicessource: input_devices.hpp

Fields and methods

Members of the struct inputs_mouse_parameters. Most of what you do with a CGP type goes through the free functions listed below.

Fields

inputs_mouse_cursor_position_parameters positionCursor position in relative window coordinates in [-1,1], with position.current and position.previous (the value before the last move).
inputs_mouse_cursor_click_parameters clickMouse button state: click.left and click.right are true while the button is held, click.last_action is the last button change.
float scroll = 0Scroll offset received during the current frame, reset to 0 after each frame.
bool on_gui = falseTrue when the cursor is over the ImGui window; the scene mouse callbacks are then not called.

Functions taking a inputs_mouse_parameters

None.

Functions returning a inputs_mouse_parameters

None.

Operators

None.

CGP - Computer Graphics Programming.