@Override
	public void paintComponent(Graphics g)
	{
		super.paintComponent(g);
		this.draw(g);

		// temp
		if (this.editMode == EditMode.MODE_OBJECT_EDIT || this.showObjects)
		{
			if (this.level != null)
			{
				for (GameObject curObj : this.level.getObjectList())
				{
					Graphics2D g2d = (Graphics2D)g;

					if (curObj.getDirection())
						g2d.drawImage(curObj.getTile(1), curObj.getX() + curObj.getOffsetRightX(), curObj.getY() + curObj.getOffsetRightY(), null);
					else
						g2d.drawImage(curObj.getTile(0), curObj.getX() + curObj.getOffsetLeftX(), curObj.getY() + curObj.getOffsetLeftY(), null);

					if (this.editMode == EditMode.MODE_OBJECT_EDIT)
					{
						if (curObj == this.selectedObject)
							g2d.setColor(Color.GREEN);
						else
							g2d.setColor(Color.RED);

						// draw rectangle
						g2d.drawLine(curObj.getX(), curObj.getY(), curObj.getX() + curObj.getW(), curObj.getY());
						g2d.drawLine(curObj.getX(), curObj.getY() + curObj.getH(), curObj.getX() + curObj.getW(), curObj.getY() + curObj.getH());
						g2d.drawLine(curObj.getX(), curObj.getY(), curObj.getX(), curObj.getY() + curObj.getH());
						g2d.drawLine(curObj.getX() + curObj.getW(), curObj.getY(), curObj.getX() + curObj.getW(), curObj.getY() + curObj.getH());
	//					// draw diagonal line
	//					if (curObj.getDirection())
	//						g2d.drawLine(curObj.getX(), curObj.getY(), curObj.getX() + curObj.getTileW(), curObj.getY() + curObj.getTileH());
	//					else
	//						g2d.drawLine(curObj.getX() + curObj.getTileW(), curObj.getY(), curObj.getX(), curObj.getY() + curObj.getTileH());
					}
				}
			}
		}
	}