Hi,
I’m experimenting on using mouse in my jPCT applet following, as trace, your way to map keys in your Bounce applet example; so I’ve initialized a variable:
private boolean click=false;
I’ve definited the following method:
public boolean mouseClick(Event e, int key) {
ProcessKey(key,true);
return (true);
}
in ProcessKey I’ve added the following “case”:
case (MouseEvent.MOUSE_CLICKED): {wire=event; break;}
where ‘wire’ is the the wireframe mode, here just as example. At last, I’ve added the following ‘if’ in the timer():
if (wire) {
wireframe=!wireframe;
}
but, running the applet, nothing happens (using the 1 key, for example, the wireframe mode works, so the problem is just on the mouse event).
I’ve to add a mouse listener….. or something else?
Bye and thanks