@Override
	public void render(float interpolation) {
		
		Renderer.drawRect(pos, dim, 0x000000, 1.0f);
		Renderer.drawLineRect(pos, dim, 0xffffff, 1.0f);
		
		String s = prefix+text;
		if(!s.equals(""))
		{
			int[] size = Fonts.get("Arial").getStringDim(s, fontsize);
			while(size[0] > dim.x-20)
			{
				s = s.substring(1, s.length());
				size = Fonts.get("Arial").getStringDim(s, fontsize);
			}
		}
		
		s = s+((isSelected && blink) ? "|" : "")+" ";
		int fh = Fonts.get("Arial").getStringDim(s, fontsize)[1];
		float yPos = pos.y+dim.y/2-fh/2;
		Fonts.get("Arial").drawString(s, pos.x+10, yPos, fontsize, 0xffffff);
		if(text.equals("") && !isSelected)
			Fonts.get("Arial").drawString(defaultText, pos.x+10, yPos, fontsize, 0x777777);
	}