public void tick() {
		level.tick();
		if(keys.isKeyPressed(KeyEvent.VK_E)) {
			if(mouseItem != null) {
				inventory.add(mouseItem);
			}
			game.setMenu(null);
		}
		if(mouse.isLeftClickedButton()) {
			int xx = mouse.getxPos();
			int yy = mouse.getyPos();
			
			if(xx < 53 && yy > 48) {
				int ys = (int)((yy - 48) / 26);
				if(ys < inventories.size()) {
					selectedInvName = (String) inventories.keySet().toArray()[ys];
					inventory = inventories.get(selectedInvName);
				}
				return;
			}
			
			xx -= 53;
			yy -= 22;
			int xt = xx / 28;
			int yt = yy / 26;
			if(xt >= inventory.getW() || yt >= inventory.getW() || yt < 0 || xt < 0) return;
			if(mouseItem == null) {
				mouseItem = inventory.getItem(xt, yt);
				inventory.removeItem(xt, yt);
			} else {
				if(inventory.getItem(xt, yt) == null) {
					inventory.setItem(xt, yt, mouseItem);
					mouseItem = null; 
				} else {
					Item tmpItem = mouseItem;
					mouseItem = inventory.getItem(xt, yt);
					inventory.setItem(xt, yt, tmpItem);
				}
			}
		}
	}