Questions about Lemur Mouse Listeners

I found out how to make a multi-select box from here

CursorEventControl.addListenersToSpatial(simpleApp.getRootNode().getChild("MapNode"), new DefaultCursorListener() {}

I’m using this code which causes the mouse to not detect off-map triggers.

Is there any way in Lemur to make a callback without touching anything?
Base Profile 2023.10.17 -

Maybe I should implement it in ActionListener and AnalogListener?

If anyone has any ideas please reply to me in this post! thank

Yeah, if you want your selection box independent of other geometries, you should use a standard input system.

Pseudo code:

analog input:
    if primary box corner pos != null
        second box corner pos = mouse position
        update selection box geometry
state input:
    if mouse button is down
        primary box corner pos = mouse position
        attach selection box geometry
        primary box corner pos = null
        detach selection box geometry

I hope that helps!

1 Like

Even through Lemur you can listen to the raw mouse buttons and mouse axis movements.

InputMapper (lemur 1.15.0 API)…-

Mapped to things l like:

But yeah, these things are always going to be pretty manual.

1 Like

Do you have a demo of how to use InputMapper? I might need it, there is only a description in the documentation, I tried to use it but failed … :sob:

Lemur Gems #1 explains how to use the InputMapper.



1 Like