icyboxs
1
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?
Maybe I should implement it in ActionListener and AnalogListener?
If anyone has any ideas please reply to me in this post! thank
codex
2
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
else
primary box corner pos = null
detach selection box geometry
I hope that helps!
1 Like
pspeed
3
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:
http://jmonkeyengine-contributions.github.io/Lemur/javadoc/Lemur/com/simsilica/lemur/input/Axis.html#MOUSE_X
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 …
codex
5
Lemur Gems #1 explains how to use the InputMapper.
3 Likes