@Override
	public void render(float interpolation) {
		
		Vector2 pos = Interpolator.linearInterpolate(oldPos, this.pos, interpolation);
		
		Renderer.drawRect(pos, new Vector2(dim.x,20), isSelected ? windowTopColor : windowMainColor, 1.0f);
		Renderer.drawRect(pos.add(new Vector2(0,20)), dim, windowMainColor, 1.0f);
		if(hoverX)
			Renderer.drawRect(new Vector2(pos.x+dim.x-20,pos.y), new Vector2(20), 0x000000, 1);
		Renderer.drawLineRect(new Vector2(pos.x+dim.x-20,pos.y), new Vector2(20), 0x000000, 1);
		Renderer.drawLine(new Vector2(pos.x+dim.x-20,pos.y), new Vector2(pos.x+dim.x,pos.y+20), 0xffffff, 1);
		Renderer.drawLine(new Vector2(pos.x+dim.x,pos.y), new Vector2(pos.x+dim.x-20,pos.y+20), 0xffffff, 1);
		Fonts.get("Arial").drawString(title, pos.x+10, pos.y+1, 20, 0xffffff);
		Renderer.startScissor(new Vector2(pos.x,pos.y+20), dim);
		
		Renderer.pushMatrix();
			Renderer.translate(new Vector2(pos.x,pos.y+20));
			renderContents(interpolation);
			for(int x=0;x<buttonList.size();x++)
				buttonList.get(x).render(interpolation);
			Renderer.translate(new Vector2(-pos.x,-pos.y-20));
		Renderer.popMatrix();
		
		Renderer.endScissor();
		
		
		Renderer.drawLineRect(pos, dim.add(new Vector2(0,20)), 0x000000, 1.0f);
		Renderer.drawLine(new Vector2(pos.x, pos.y+20),new Vector2(pos.x+dim.x, pos.y+20),0.4f,0.4f,0.4f,1.0f);
		
		if(canResize())
		{
			Renderer.drawLine(new Vector2(pos.x+dim.x-15,pos.y+dim.y+20), new Vector2(pos.x+dim.x,pos.y+dim.y+5), 0x000000, 1);
			Renderer.drawLine(new Vector2(pos.x+dim.x-9,pos.y+dim.y+20), new Vector2(pos.x+dim.x,pos.y+dim.y+11), 0x000000, 1);
		}
	}