Jump to content

Implementing mouse presses?


Recommended Posts

Posted

You need to register the listener to your script. Right now you basically made it but didn't attach it to anything.

I don't see anything to add key listener.

Op I do know in keyboard class you can grab the key Listener class.so use that instance to do want you need

Posted (edited)
getBot().getCanvas().addKeyListener(new KeyListener() {						@Override			public void keyTyped(KeyEvent e) {							}						@Override			public void keyReleased(KeyEvent e) {							}						@Override			public void keyPressed(KeyEvent e) {							}		});

Oh nice op seeing as you already implemented the interface. Just do in the onStart getBot().getCanvas().addKeyListener(this);

Edited by josedpay

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...