package com.betato.gamedisplay;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;

public class InputListener implements KeyListener, MouseListener, MouseMotionListener, MouseWheelListener{

	@Override
	public void keyPressed(KeyEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void keyReleased(KeyEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void keyTyped(KeyEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseWheelMoved(MouseWheelEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseDragged(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseMoved(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseClicked(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseEntered(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseExited(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mousePressed(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseReleased(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}
	
}

@@ -26,16 +26,43 @@
 splay;%0A%0A
+import java.awt.MouseInfo;%0A
 import j
@@ -427,191 +427,961 @@
 er%7B%0A
-%0A%09@Override%0A%09public void keyPressed(KeyEvent e) %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09%0A%09%7D%0A%0A%09@Override%0A%09public void keyReleased(KeyEvent e) %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09
+%09%0A%09// Keyboard%0A%09public boolean%5B%5D keyState = new boolean%5B256%5D;%0A%09public boolean%5B%5D keyDown = new boolean%5B256%5D;%0A%09public boolean%5B%5D keyUp = new boolean%5B256%5D;%0A%09%0A%09// Mouse%0A%09public int mouseX;%0A%09public int mouseY;%0A%09public int mouseWheel;%0A%09public boolean%5B%5D mouseState = new boolean%5BMouseInfo.getNumberOfButtons()%5D;%0A%09public boolean%5B%5D mouseDown = new boolean%5BMouseInfo.getNumberOfButtons()%5D;%0A%09public boolean%5B%5D mouseUp = new boolean%5BMouseInfo.getNumberOfButtons()%5D;%0A%09%0A%09public void clear() %7B%0A%09%09// Clear keyboard%0A%09%09for (int i = 0; i %3C keyUp.length; i++)%0A%09%09%7B%0A%09%09%09keyDown%5Bi%5D = false;%0A%09%09%09keyUp%5Bi%5D = false;%0A%09%09%7D%0A%09%09%0A%09%09// Clear mouse%0A%09%09for (int i = 0; i %3C mouseUp.length; i++)%0A%09%09%7B%0A%09%09%09mouseDown%5Bi%5D = false;%0A%09%09%09mouseUp%5Bi%5D = false;%0A%09%09%7D%0A%09%7D%0A%09%0A%09@Override%0A%09public void keyPressed(KeyEvent e) %7B%0A%09%09keyDown%5Be.getKeyCode()%5D = true;%0A%09%09keyState%5Be.getKeyCode()%5D = true;%0A%09%7D%0A%0A%09@Override%0A%09public void keyReleased(KeyEvent e) %7B%0A%09%09keyUp%5Be.getKeyCode()%5D = true;%0A%09%09keyState%5Be.getKeyCode()%5D = false;
 %0A%09%7D%0A
@@ -1539,45 +1539,42 @@
 %7B%0A%09%09
-// TODO Auto-generated method stub%0A%09%09
+mouseWheel = e.getWheelRotation();
 %0A%09%7D%0A
@@ -2115,143 +2115,204 @@
 %7B%0A%09%09
-// TODO Auto-generated method stub%0A%09%09%0A%09%7D%0A%0A%09@Override%0A%09public void mouseReleased(MouseEvent e) %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09
+mouseDown%5Be.getButton()%5D = true;%0A%09%09mouseState%5Be.getButton()%5D = true;%0A%09%7D%0A%0A%09@Override%0A%09public void mouseReleased(MouseEvent e) %7B%0A%09%09mouseUp%5Be.getButton()%5D = true;%0A%09%09mouseState%5Be.getButton()%5D = false;
 %0A%09%7D%0A

Add mouse and key state tracking to InputListener