Mouse - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

Mouse input is supported both directly through events as well as through functions.

How mouse input is handled

Mouse events

Mouse functions

Mouse position, mouse_x and mouse_y

The variables mouse_x and mouse_y gives the position of the mouse relative to the room or the current view. In general, they are updated at least once a step, namely at the end of the draw step.

In regards to the specifics, mouse position updating is done by two functions: screen_refresh and io_handle. screen_refresh is automatically called at the end of screen_redraw, unless set_automatic_draw has been set to false. If you turn off automatic drawing, you will have to call either screen_refresh or io_handle in order to update the mouse position.

General input functions

For general input functions, see Input#General_input_functions.