Mouse enter/exit events?

How can I determine when the mouse enters or exits the application window?
For example, in Processing, there are APIs for mouseEntered() and mouseExited()
Thank you.

I don’t see such events at https://guide.openrndr.org/#/07_Interaction/C00MouseAndKeyboardEvents
Related is this: https://guide.openrndr.org/#/03_Program_basics/C01_ProgramConfiguration?id=window-unfocus-behaviour which lets you slow down the frame rate when the window is unfocused. So there must be a way to tap into that information. Maybe @ricardo has an idea?

It seems that the hook is there, but it is not implemented:

These events have been added and will be available in the upcoming OPENRNDR 0.3.40 release.

2 Likes

Fantastic! Thank you for adding these.

Now it’s available :slight_smile:

        mouse.entered.listen {
            println("mouse in")
        }
        mouse.left.listen {
            println("mouse out")
        }
2 Likes