/**
 * WL Common Library
 * Copyright (C) 2013 MK124
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package net.gtaun.wl.common.textdraw;

import org.apache.commons.lang3.StringUtils;

import net.gtaun.shoebill.SampObjectFactory;
import net.gtaun.shoebill.object.Player;
import net.gtaun.shoebill.object.PlayerTextdraw;

public final class TextDrawUtils
{
	public static PlayerTextdraw createPlayerText(SampObjectFactory f, Player player, float x, float y, String text)
	{
		PlayerTextdraw textdraw = f.createPlayerTextdraw(player, x, (y-50)/1.075f+50, text);
		return textdraw;
	}
	
	public static PlayerTextdraw createPlayerTextBG(SampObjectFactory f, Player player, float x, float y, float w, float h)
	{
		int lines = Math.round((h - 5) / 5.0f);
		PlayerTextdraw textdraw = f.createPlayerTextdraw(player, x+4, (y-50)/1.075f+50, StringUtils.repeat("~n~", lines));
		textdraw.setUseBox(true);
		textdraw.setLetterSize(0.1f, 0.5f);
		textdraw.setTextSize(x+w-4, h-7);
		return textdraw;
	}
	
	
	private TextDrawUtils()
	{
		
	}
}

@@ -1614,16 +1614,341 @@
 w;%0A%09%7D%0A%09%0A
+%09public static String convertCharacters(String src)%0A%09%7B%0A%09%09String dest = src;%0A%09%09dest = dest.replace('%C3%84', '%C6%92');%0A%09%09dest = dest.replace('%C3%A4', '%C5%A1');%0A%09%09dest = dest.replace('%C3%96', '%E2%80%98');%0A%09%09dest = dest.replace('%C3%B6', '%C2%A8');%0A%09%09dest = dest.replace('%C3%9C', '%E2%80%A2');%0A%09%09dest = dest.replace('%C3%BC', '%C2%AC');%0A%09%09dest = dest.replace('%C3%9F', '%E2%80%93');%0A%09%09return dest;%0A%09%7D%0A
 %09%0A%09priva

Add TextDrawUtils.convertCharacters().