@Override
	public void update() {
		this.evtSrv.dispatchEvent(new MouseUpdateEvent(Mouse.getX(), Mouse.getY()));

		for (int i = 0; i < this.buttons.length; ++i) {
			if (Mouse.isButtonDown(i)) {
				if (!this.buttons[i]) {
					this.buttons[i] = true;
					this.evtSrv.dispatchEvent(new MouseButtonPressedEvent(Mouse.getX(), Mouse.getY(), i));
				}
			} else if (this.buttons[i]) {
				this.buttons[i] = false;
				this.evtSrv.dispatchEvent(new MouseButtonReleasedEvent(Mouse.getX(), Mouse.getY(), i));
			}
		}
		
		int dWheel = Mouse.getDWheel();
		if (dWheel != 0) {
			this.evtSrv.dispatchEvent(new MouseWheelEvent(dWheel));			
		}
	}