• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java TextDrawAlign类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中net.gtaun.shoebill.constant.TextDrawAlign的典型用法代码示例。如果您正苦于以下问题:Java TextDrawAlign类的具体用法?Java TextDrawAlign怎么用?Java TextDrawAlign使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

TextDrawAlign类属于net.gtaun.shoebill.constant包,在下文中一共展示了TextDrawAlign类的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: PlayerTextdraw

点赞 3

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
public PlayerTextdraw(Player player) {
	this.player = player;
	playerTextdraw = null;
	text = allText = "";
	color = Color.WHITE;
	backgroundColor = boxColor = Color.BLACK;
	alignment = TextDrawAlign.LEFT;
	font = TextDrawFont.FONT2;
	position = new Vector2D();
	letterSize = new Vector2D(0.5f, 1.0f);
	textSize = null;
	proportional = true;
	useBox = selectable = shown = false;
	outlineSize = 0;
	shadowSize = 1;
	boxEnabled = -1;
	TextdrawSystem.getPlayerTextdraws().add(this);
}
 

开发者ID:Alf21,
项目名称:textdraw-system,
代码行数:19,
代码来源:PlayerTextdraw.java

示例2: Box

点赞 3

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
protected Box(Container container, Color color, String name) {
	super(container, AttachmentAlignment.TOP_LEFT, name);

	playerTextdraw = PlayerTextdraw.create(getPlayer(), 0f, 0f, "_");
	playerTextdraw.setAlignment(TextDrawAlign.LEFT);
	playerTextdraw.setBackgroundColor(new Color(0,0,0,255));
	playerTextdraw.setFont(TextDrawFont.FONT2);
	playerTextdraw.setLetterSize(0.5f, 1.0f);
	playerTextdraw.setColor(new Color(255,255,255,255));
	playerTextdraw.setOutlineSize(0);
	playerTextdraw.setProportional(true);
	playerTextdraw.setShadowSize(1);
	playerTextdraw.setSelectable(false);
	playerTextdraw.setUseBox(true);
	playerTextdraw.setBoxColor(color);
	playerTextdraw.setTextSize(-4.0f, -4.0f);
}
 

开发者ID:Alf21,
项目名称:textdraw-system,
代码行数:18,
代码来源:Box.java

示例3: Label

点赞 3

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
private Label(Container container, String text, String name) {
	super(container, AttachmentAlignment.TOP_LEFT, name);
	if(text.isEmpty() || text.replaceAll(" ", "").isEmpty())
		text = "_";

	playerTextdraw = PlayerTextdraw.create(getPlayer(), 0f, 0f, text);
	playerTextdraw.setAlignment(TextDrawAlign.RIGHT);
	playerTextdraw.setBackgroundColor(new Color(0,0,0,255));
	playerTextdraw.setFont(TextDrawFont.get(1));
	playerTextdraw.setLetterSize(0.280000f, 1.000000f);
	playerTextdraw.setColor(new Color(255,255,255,255));
	playerTextdraw.setOutlineSize(0);
	playerTextdraw.setProportional(true);
	playerTextdraw.setShadowSize(1);
	playerTextdraw.setSelectable(false);
}
 

开发者ID:Alf21,
项目名称:textdraw-system,
代码行数:17,
代码来源:Label.java

示例4: ClickableTextdraw

点赞 3

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
private ClickableTextdraw(Container container, float x, float y, float width, float height, Color color, String name) {
	super(container, ComponentAlignment.TOP_LEFT, name);

	playerTextdraw = PlayerTextdraw.create(super.getPlayer(), x, y, "_");
	playerTextdraw.setAlignment(TextDrawAlign.get(2));
	playerTextdraw.setBackgroundColor(new Color(0,0,0,255));
	playerTextdraw.setFont(TextDrawFont.get(1));
	playerTextdraw.setLetterSize(0.280000f, Calculation.heightToLetterHeight(height));
	playerTextdraw.setOutlineSize(0);
	playerTextdraw.setProportional(true);
	playerTextdraw.setShadowSize(0);
	playerTextdraw.setUseBox(true);
	playerTextdraw.setBoxColor(color);
//	playerTextdraw.setTextSize(10.0f, width);
	playerTextdraw.setBox(width, height);
	playerTextdraw.setSelectable(true);

	clicked = false;
}
 

开发者ID:Alf21,
项目名称:textdraw-system,
代码行数:20,
代码来源:ClickableTextdraw.java

示例5: Text

点赞 3

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
protected Text(Container container, float x, float y, float width, String text, String name) {
	super(container, ComponentAlignment.TOP_LEFT, name);
	playerTextdraw = PlayerTextdraw.create(super.getPlayer(), x, y, text);
//	playerTextdraw.setUseBox(true);
	//TODO
//	if(width != Float.NaN)
//		width = Calculation.getBoxSize(width);
//  calc width from pos

	playerTextdraw.setAlignment(TextDrawAlign.LEFT);
	playerTextdraw.setBackgroundColor(new Color(0,0,0,255));
	playerTextdraw.setFont(TextDrawFont.get(1));
	playerTextdraw.setLetterSize(0.280000f, 1.000000f);
	playerTextdraw.setColor(new Color(255,255,255,255));
	playerTextdraw.setOutlineSize(0);
	playerTextdraw.setProportional(true);
	playerTextdraw.setShadowSize(1);
	playerTextdraw.setSelectable(false);
}
 

开发者ID:Alf21,
项目名称:textdraw-system,
代码行数:20,
代码来源:Text.java

示例6: getSlot

点赞 3

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
public Vector2D getSlot(Content content, int row, int col, int maxRows, int maxCols) {
	PlayerTextdraw contentBackground = content.getContentBackground();
	float iXMax, iXMin, iYMax, iYMin;
	Vector2D position = contentBackground.getPosition().clone();
	float startPositionX = position.x, startPositionY = position.y;
	float width = Calculation.getWidth(contentBackground), height = Calculation.getBoxHeight(contentBackground);
	if(contentBackground.getAlignment() == TextDrawAlign.CENTER)
		startPositionX -= width / 2.0f;

	iXMax = width / ((float) maxCols / 2.0f);
	iXMin = iXMax / 2.0f;
	iYMax = height / ((float) maxRows / 2.0f);
	iYMin = iYMax / 2.0f;

	return new Vector2D(
			startPositionX + (iXMax - iXMin) / 2.0f + (iXMax - iXMin) * ((float) col - 1.0f),
			startPositionY + (iYMax - iYMin) / 2.0f + (iYMax - iYMin) * ((float) row - 1.0f)
	);
}
 

开发者ID:Alf21,
项目名称:textdraw-system,
代码行数:20,
代码来源:Form.java

示例7: getWidth

点赞 3

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
public static Vector2D getWidth(PlayerTextdraw playerTextdraw, double maxProcess, double process) {
	float widthX, widthY;
	if(playerTextdraw.getAlignment() == TextDrawAlign.CENTER) {
		widthY = playerTextdraw.getTextSize().y;
		widthY /= maxProcess;
		widthY *= process;
		widthX = playerTextdraw.getTextSize().x;
	}
	else {
		widthX = playerTextdraw.getTextSize().x;
		widthX /= maxProcess;
		widthX *= process;
		widthY = playerTextdraw.getTextSize().y;
	}
	return new Vector2D(widthX, widthY);
}
 

开发者ID:Alf21,
项目名称:textdraw-system,
代码行数:17,
代码来源:Calculation.java

示例8: createHealthBar

点赞 3

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
private void createHealthBar() {
	BoxHeight boxHeight = new BoxHeight(maxSpeed>=100?532:534, 385, 435, 0.5f, -0.5f, 5, vehicleData.getVehicle().getHealth(), 1000);
	
	healthBar = PlayerTextdraw.create(player, boxHeight.getPosition());
	healthBar.setText("_");
	healthBar.setAlignment(TextDrawAlign.CENTER);
	healthBar.setBackgroundColor(Color.BLACK);
	healthBar.setFont(TextDrawFont.get(1));
	healthBar.setLetterSize(boxHeight.getLetterSize());
	healthBar.setColor(Color.WHITE);
	healthBar.setOutlineSize(0);
	healthBar.setProportional(true);
	healthBar.setShadowSize(1);
	healthBar.setUseBox(true);
	healthBar.setBoxColor(Calculation.getBoxColor(COLOR_RED, COLOR_GREEN, vehicleData.getVehicle().getHealth(), 1000));
	healthBar.setTextSize(0, 11);
	healthBar.setSelectable(false);
}
 

开发者ID:Alf21,
项目名称:vehicle-system,
代码行数:19,
代码来源:IndividuelRealTacho.java

示例9: createTankBar

点赞 3

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
private void createTankBar() {
	BoxHeight boxHeight = new BoxHeight(maxSpeed>=100?592:594, 385, 435, 0.5f, -0.5f, 5, (float) vehicleData.getTank(), (float) vehicleData.getMaxTankSize());
	
	tankBar = PlayerTextdraw.create(player, boxHeight.getPosition());
	tankBar.setText("_");
	tankBar.setAlignment(TextDrawAlign.CENTER);
	tankBar.setBackgroundColor(Color.BLACK);
	tankBar.setFont(TextDrawFont.get(1));
	tankBar.setLetterSize(boxHeight.getLetterSize());
	tankBar.setColor(Color.WHITE);
	tankBar.setOutlineSize(0);
	tankBar.setProportional(true);
	tankBar.setShadowSize(1);
	tankBar.setUseBox(true);
	tankBar.setBoxColor(Calculation.getBoxColor(COLOR_RED, COLOR_GREEN, (float) vehicleData.getTank(), (float) vehicleData.getMaxTankSize()));
	tankBar.setTextSize(0, 11);
	tankBar.setSelectable(false);
}
 

开发者ID:Alf21,
项目名称:vehicle-system,
代码行数:19,
代码来源:IndividuelRealTacho.java

示例10: createHealthBar

点赞 3

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
private void createHealthBar() {
	BoxHeight boxHeight = new BoxHeight(526.5f, 399.85f, 423.85f, 0.5f, 0.85f, 3.5f, vehicleData.getVehicle().getHealth(), 1000);
	
	healthBar = PlayerTextdraw.create(player, boxHeight.getPosition());
	healthBar.setText("_");
	healthBar.setAlignment(TextDrawAlign.CENTER);
	healthBar.setBackgroundColor(Color.BLACK);
	healthBar.setFont(TextDrawFont.get(1));
	healthBar.setLetterSize(boxHeight.getLetterSize());
	healthBar.setColor(Color.WHITE);
	healthBar.setOutlineSize(0);
	healthBar.setProportional(true);
	healthBar.setShadowSize(1);
	healthBar.setUseBox(true);
	healthBar.setBoxColor(Calculation.getBoxColor(COLOR_RED, COLOR_GREEN, vehicleData.getVehicle().getHealth(), 1000));
	healthBar.setTextSize(0, -68);
	healthBar.setSelectable(false);
}
 

开发者ID:Alf21,
项目名称:vehicle-system,
代码行数:19,
代码来源:BlockBarTacho.java

示例11: createTankBar

点赞 3

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
private void createTankBar() {
	BoxHeight boxHeight = new BoxHeight(593.5f, 399.85f, 423.85f, 0.5f, 0.85f, 3.5f, (float) vehicleData.getTank(), (float) vehicleData.getMaxTankSize());
	
	tankBar = PlayerTextdraw.create(player, boxHeight.getPosition());
	tankBar.setText("_");
	tankBar.setAlignment(TextDrawAlign.CENTER);
	tankBar.setBackgroundColor(Color.BLACK);
	tankBar.setFont(TextDrawFont.get(1));
	tankBar.setLetterSize(boxHeight.getLetterSize());
	tankBar.setColor(Color.WHITE);
	tankBar.setOutlineSize(0);
	tankBar.setProportional(true);
	tankBar.setShadowSize(1);
	tankBar.setUseBox(true);
	tankBar.setBoxColor(Calculation.getBoxColor(COLOR_RED, COLOR_GREEN, (float) vehicleData.getTank(), (float) vehicleData.getMaxTankSize()));
	tankBar.setTextSize(0, -68);
	tankBar.setSelectable(false);
}
 

开发者ID:Alf21,
项目名称:vehicle-system,
代码行数:19,
代码来源:BlockBarTacho.java

示例12: createHealthBar

点赞 3

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
private void createHealthBar() {
	BoxHeight boxHeight = new BoxHeight(534, 385, 435, 0.5f, -0.5f, 5, vehicleData.getVehicle().getHealth(), 1000);
	
	healthBar = PlayerTextdraw.create(player, boxHeight.getPosition());
	healthBar.setText("_");
	healthBar.setAlignment(TextDrawAlign.CENTER);
	healthBar.setBackgroundColor(Color.BLACK);
	healthBar.setFont(TextDrawFont.get(1));
	healthBar.setLetterSize(boxHeight.getLetterSize());
	healthBar.setColor(Color.WHITE);
	healthBar.setOutlineSize(0);
	healthBar.setProportional(true);
	healthBar.setShadowSize(1);
	healthBar.setUseBox(true);
	healthBar.setBoxColor(Calculation.getBoxColor(COLOR_RED, COLOR_GREEN, vehicleData.getVehicle().getHealth(), 1000));
	healthBar.setTextSize(0, 11);
	healthBar.setSelectable(false);
}
 

开发者ID:Alf21,
项目名称:vehicle-system,
代码行数:19,
代码来源:RealTacho.java

示例13: createTankBar

点赞 3

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
private void createTankBar() {
	BoxHeight boxHeight = new BoxHeight(584, 385, 435, 0.5f, -0.5f, 5, (float) vehicleData.getTank(), (float) vehicleData.getMaxTankSize());
	
	tankBar = PlayerTextdraw.create(player, boxHeight.getPosition());
	tankBar.setText("_");
	tankBar.setAlignment(TextDrawAlign.CENTER);
	tankBar.setBackgroundColor(Color.BLACK);
	tankBar.setFont(TextDrawFont.get(1));
	tankBar.setLetterSize(boxHeight.getLetterSize());
	tankBar.setColor(Color.WHITE);
	tankBar.setOutlineSize(0);
	tankBar.setProportional(true);
	tankBar.setShadowSize(1);
	tankBar.setUseBox(true);
	tankBar.setBoxColor(Calculation.getBoxColor(COLOR_RED, COLOR_GREEN, (float) vehicleData.getTank(), (float) vehicleData.getMaxTankSize()));
	tankBar.setTextSize(0, 11);
	tankBar.setSelectable(false);
}
 

开发者ID:Alf21,
项目名称:vehicle-system,
代码行数:19,
代码来源:RealTacho.java

示例14: createTitle

点赞 2

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
private void createTitle() {
	titleTextdraw = PlayerTextdraw.create(player, 320.000000f, 100.000000f, "Color Picker");
	titleTextdraw.setAlignment(TextDrawAlign.get(2));
	titleTextdraw.setBackgroundColor(new Color(0, 0, 0, 255));
	titleTextdraw.setFont(TextDrawFont.get(1));
	titleTextdraw.setLetterSize(new Vector2D(0.500000f, 1.000000f));
	titleTextdraw.setColor(new Color(255, 255, 255, 255));
	titleTextdraw.setOutlineSize(1);
	titleTextdraw.setProportional(true);
	titleTextdraw.setShadowSize(0);
	titleTextdraw.setUseBox(true);
	titleTextdraw.setBoxColor(new Color(0, 0, 0, 150));
	titleTextdraw.setTextSize(new Vector2D(0.000000f, 490.000000f));
	titleTextdraw.setSelectable(false);
}
 

开发者ID:Alf21,
项目名称:textdraw-system,
代码行数:16,
代码来源:ColorPicker.java

示例15: PlayersTextdraw

点赞 2

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
public PlayersTextdraw(ArrayList<Player> players) {
	this.players = players;
	playersTextdraw = null;
	text = allText = "";
	color = Color.WHITE;
	backgroundColor = boxColor = Color.BLACK;
	alignment = TextDrawAlign.LEFT;
	font = TextDrawFont.FONT2;
	position = letterSize = textSize = new Vector2D();
	proportional = true;
	useBox = selectable = shown = false;
	outlineSize = 0;
	shadowSize = 1;
	TextdrawSystem.getPlayersTextdraws().add(this); //TODO
}
 

开发者ID:Alf21,
项目名称:textdraw-system,
代码行数:16,
代码来源:PlayersTextdraw.java

示例16: Button

点赞 2

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
private Button(Container container, float x, float y, float width, String text, String name) {
	super(container, ComponentAlignment.TOP_LEFT, name);
	if(text.replaceAll(" ", "").isEmpty())
		text = "_";
	if(Float.isNaN(width))
		width = 125f;

	activationColor = TextdrawSystem.SELECT_COLOR;
	activationBgColor = TextdrawSystem.SELECT_BG_COLOR;
	deactivationColor = TextdrawSystem.UNSELECT_COLOR;
	deactivationBgColor = TextdrawSystem.UNSELECT_BG_COLOR;

	playerTextdraw = PlayerTextdraw.create(super.getPlayer(), x, y, text);
	playerTextdraw.setAlignment(TextDrawAlign.get(2));
	playerTextdraw.setBackgroundColor(new Color(0,0,0,255));
	playerTextdraw.setFont(TextDrawFont.get(1));
	playerTextdraw.setLetterSize(0.280000f, 1.000000f);
	playerTextdraw.setColor(deactivationColor);
	playerTextdraw.setOutlineSize(0);
	playerTextdraw.setProportional(true);
	playerTextdraw.setShadowSize(0);
	playerTextdraw.setUseBox(true);
	playerTextdraw.setBoxColor(deactivationBgColor);
	playerTextdraw.setTextSize(10.0f, width);
	playerTextdraw.setSelectable(true);

	activated = false;
	toggleActivationEffect = true;
}
 

开发者ID:Alf21,
项目名称:textdraw-system,
代码行数:30,
代码来源:Button.java

示例17: NormalProcess

点赞 2

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
private NormalProcess(Dialog dialog) {
	super(dialog);

	processBarBackground = PlayerTextdraw.create(dialog.getPlayer(), 320.000000f, 133.500000f, "_");
	processBarBackground.setAlignment(TextDrawAlign.get(2));
	processBarBackground.setBackgroundColor(new Color(0, 0, 0, 255));
	processBarBackground.setFont(TextDrawFont.get(1));
	processBarBackground.setLetterSize(new Vector2D(0.500000f, -0.300000f));
	processBarBackground.setColor(new Color(255, 255, 255, 255));
	processBarBackground.setOutlineSize(0);
	processBarBackground.setProportional(true);
	processBarBackground.setShadowSize(1);
	processBarBackground.setUseBox(true);
	processBarBackground.setBoxColor(new Color(255, 255, 255, 50));
	processBarBackground.setTextSize(new Vector2D(0.000000f, max_width));
	processBarBackground.setSelectable(false);

	processBar = PlayerTextdraw.create(dialog.getPlayer(), 320.000000f, 133.500000f, "_");
	processBar.setAlignment(TextDrawAlign.get(2));
	processBar.setBackgroundColor(new Color(0, 0, 0, 255));
	processBar.setFont(TextDrawFont.get(1));
	processBar.setLetterSize(new Vector2D(0.500000f, -0.300000f));
	processBar.setColor(new Color(255, 255, 255, 255));
	processBar.setOutlineSize(0);
	processBar.setProportional(true);
	processBar.setShadowSize(1);
	processBar.setUseBox(true);
	processBar.setBoxColor(new Color(0, 255, 0, 255));
	processBar.setTextSize(new Vector2D(0.000000f, max_width));
	processBar.setSelectable(false);
}
 

开发者ID:Alf21,
项目名称:textdraw-system,
代码行数:32,
代码来源:NormalProcess.java

示例18: LightProcess

点赞 2

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
private LightProcess(Dialog dialog) {
	super(dialog);

	processBarBackground = PlayerTextdraw.create(dialog.getPlayer(), 320.000000f, 138.000000f, "_");
	processBarBackground.setAlignment(TextDrawAlign.get(2));
	processBarBackground.setBackgroundColor(new Color(0, 0, 0, 255));
	processBarBackground.setFont(TextDrawFont.get(1));
	processBarBackground.setLetterSize(new Vector2D(0.500000f, -0.300000f));
	processBarBackground.setColor(new Color(255, 255, 255, 255));
	processBarBackground.setOutlineSize(0);
	processBarBackground.setProportional(true);
	processBarBackground.setShadowSize(1);
	processBarBackground.setUseBox(true);
	processBarBackground.setBoxColor(new Color(255, 255, 255, 50));
	processBarBackground.setTextSize(new Vector2D(0.000000f, max_width));
	processBarBackground.setSelectable(false);

	processBar = PlayerTextdraw.create(dialog.getPlayer(), 320.000000f, 138.000000f, "_");
	processBar.setAlignment(TextDrawAlign.get(2));
	processBar.setBackgroundColor(new Color(0, 0, 0, 255));
	processBar.setFont(TextDrawFont.get(1));
	processBar.setLetterSize(new Vector2D(0.500000f, -0.300000f));
	processBar.setColor(new Color(255, 255, 255, 255));
	processBar.setOutlineSize(0);
	processBar.setProportional(true);
	processBar.setShadowSize(1);
	processBar.setUseBox(true);
	processBar.setBoxColor(new Color(150, 0, 0, 255));
	processBar.setTextSize(new Vector2D(0.000000f, max_width));
	processBar.setSelectable(false);
}
 

开发者ID:Alf21,
项目名称:textdraw-system,
代码行数:32,
代码来源:LightProcess.java

示例19: createValue

点赞 2

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
private void createValue(int i) {
	float r = 56;
	Vector2D vector2d = new Vector2D(maxSpeed>=100?562:564, 415);
	double angle = getDotAngle(r, vector2d, i*speedSteps);
	
	TextDrawAlign align = TextDrawAlign.CENTER;
	if(angle <= 70.0) 
		align = TextDrawAlign.RIGHT;
	else if(angle >= 110.0)
		align = TextDrawAlign.LEFT;
	else {
		if(angle > 90)
			angle += 4;
		else if(angle < 90)
			angle -= 4;
	}
	
	PlayerTextdraw value = PlayerTextdraw.create(player, getDotVector2dFromAngle(r, vector2d, angle), String.valueOf(i*speedSteps));		
	value.setAlignment(align);
	value.setBackgroundColor(Color.BLACK);
	value.setFont(TextDrawFont.get(2));
	value.setLetterSize(0.2f, 0.8f);
	value.setColor(Color.WHITE);
	value.setOutlineSize(1);
	value.setProportional(true);
	value.setSelectable(false);
	values.add(value);
}
 

开发者ID:Alf21,
项目名称:vehicle-system,
代码行数:29,
代码来源:IndividuelRealTacho.java

示例20: createTextdraw

点赞 2

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
private void createTextdraw(float x, float y) {
	textdraw = PlayerTextdraw.create(player, 630+x, 385-15*slot+y);
	textdraw.setText(text);
	textdraw.setAlignment(TextDrawAlign.RIGHT);
	textdraw.setBackgroundColor(Color.BLACK);
	textdraw.setFont(TextDrawFont.get(1));
	textdraw.setLetterSize(0.5f, 1);
	textdraw.setColor(Color.WHITE);
	textdraw.setOutlineSize(1);
	textdraw.setProportional(true);
	textdraw.setSelectable(false);
}
 

开发者ID:Alf21,
项目名称:event-system,
代码行数:13,
代码来源:ChatMessage.java

示例21: createTextdraw

点赞 2

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
private Textdraw createTextdraw(String text) {
/*
	Textdraw textdraw = Textdraw.create(79, 106+20*count);
	textdraw.setText(text);
	textdraw.setAlignment(TextDrawAlign.CENTER);
	textdraw.setBackgroundColor(new Color(0,0,0,0));
	textdraw.setFont(TextDrawFont.get(1));
	textdraw.setLetterSize(0.39f, 1.9f);
	textdraw.setColor(Color.WHITE);
	textdraw.setOutlineSize(1);
	textdraw.setProportional(true);
	textdraw.setUseBox(true);
	textdraw.setBoxColor(color);
	textdraw.setTextSize(50, 140);
	textdraw.setSelectable(false);
*/
	Textdraw textdraw = Textdraw.create(68, 120+13*count);
	textdraw.setText(text);
	textdraw.setAlignment(TextDrawAlign.CENTER);
	textdraw.setBackgroundColor(new Color(0,0,0,0));
	textdraw.setFont(TextDrawFont.FONT2);
	textdraw.setLetterSize(0.24f, 1f);
	textdraw.setColor(Color.BLACK);
	textdraw.setOutlineSize(0);
	textdraw.setProportional(true);
	textdraw.setShadowSize(1);
	textdraw.setUseBox(true);
	textdraw.setBoxColor(color);
	textdraw.setTextSize(4, 128);
	textdraw.setSelectable(false);
	return textdraw;
}
 

开发者ID:Alf21,
项目名称:event-system,
代码行数:33,
代码来源:EventTextdraw.java

示例22: createScoreTextdraw

点赞 2

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
private Textdraw createScoreTextdraw(String score) {
/*
	Textdraw textdraw = Textdraw.create(169, 106+13*count);
	textdraw.setText(score);
	textdraw.setAlignment(TextDrawAlign.CENTER);
	textdraw.setBackgroundColor(new Color(0,0,0,0));
	textdraw.setFont(TextDrawFont.get(1));
	textdraw.setLetterSize(0.39f, 1.9f);
	textdraw.setColor(Color.WHITE);
	textdraw.setOutlineSize(1);
	textdraw.setProportional(true);
	textdraw.setUseBox(true);
	textdraw.setBoxColor(color);
	textdraw.setTextSize(50, 40);
	textdraw.setSelectable(false);
*/
	Textdraw textdraw = Textdraw.create(154, 120+13*count);
	textdraw.setText(score);
	textdraw.setAlignment(TextDrawAlign.CENTER);
	textdraw.setBackgroundColor(new Color(0,0,0,0));
	textdraw.setFont(TextDrawFont.PRICEDOWN);
	textdraw.setLetterSize(0.51f, 1f);
	textdraw.setColor(Color.WHITE);
	textdraw.setOutlineSize(0);
	textdraw.setProportional(true);
	textdraw.setShadowSize(1);
	textdraw.setUseBox(true);
	textdraw.setBoxColor(new Color(color.getR(),color.getG(),color.getB(),color.getA()*2>255?255:color.getA()*2));
	textdraw.setTextSize(0, -44);
	textdraw.setSelectable(false);
	return textdraw;
}
 

开发者ID:Alf21,
项目名称:event-system,
代码行数:33,
代码来源:EventTextdraw.java

示例23: getAlignment

点赞 2

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
public TextDrawAlign getAlignment() {
	return alignment;
}
 

开发者ID:Alf21,
项目名称:textdraw-system,
代码行数:4,
代码来源:PlayerTextdraw.java

示例24: setAlignment

点赞 2

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
public void setAlignment(TextDrawAlign alignment) {
	if(playerTextdraw != null && !playerTextdraw.isDestroyed())
		playerTextdraw.setAlignment(alignment);
	this.alignment = alignment;
}
 

开发者ID:Alf21,
项目名称:textdraw-system,
代码行数:6,
代码来源:PlayerTextdraw.java

示例25: setAlignment

点赞 2

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
public void setAlignment(TextDrawAlign alignment) {
	if(playersTextdraw != null && !playersTextdraw.isDestroyed())
		playersTextdraw.setAlignment(alignment);
	this.alignment = alignment;
}
 

开发者ID:Alf21,
项目名称:textdraw-system,
代码行数:6,
代码来源:PlayersTextdraw.java

示例26: ListBar

点赞 2

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
protected ListBar(List list) {
	this.list = list;
	width = 8.0f;
	Player player = list.getPlayer();
	Vector2D position = list.getPosition();
	float maxWidth = list.getMaxWidth(), maxHeight = list.getMaxHeight();

	previous = PlayerTextdraw.create(player, position.x + maxWidth - width, position.y, "~u~");
	previous.setBackgroundColor(new Color(0, 0, 0, 255));
	previous.setFont(TextDrawFont.get(1));
	previous.setLetterSize(new Vector2D(0.5f, 1.0f));
	previous.setColor(new Color(255, 255, 255, 255));
	previous.setOutlineSize(0);
	previous.setProportional(true);
	previous.setShadowSize(1);
	previous.setUseBox(true);
	previous.setBoxColor(new Color(255, 255, 255, 50));
	previous.setTextSize(new Vector2D(position.x + maxWidth, Calculation.letterHeightToHeight(1.0f)));
	previous.setSelectable(true);

	barbg = PlayerTextdraw.create(player, position.x + maxWidth - width / 2, position.y + 15.0f, "_");
	barbg.setAlignment(TextDrawAlign.get(2));
	barbg.setBackgroundColor(new Color(0, 0, 0, 255));
	barbg.setFont(TextDrawFont.get(1));
	barbg.setLetterSize(new Vector2D(0.5f, 11.4f));
	barbg.setColor(new Color(255, 255, 255, 255));
	barbg.setOutlineSize(0);
	barbg.setProportional(true);
	barbg.setShadowSize(1);
	barbg.setUseBox(true);
	barbg.setBoxColor(new Color(255, 255, 255, 50));
	barbg.setTextSize(new Vector2D(11.4f, width));
	barbg.setSelectable(false);

	bar = PlayerTextdraw.create(player, position.x + maxWidth - width / 2, position.y + 15.0f, "_");
	bar.setAlignment(TextDrawAlign.get(2));
	bar.setBackgroundColor(new Color(0, 0, 0, 255));
	bar.setFont(TextDrawFont.get(1));
	bar.setLetterSize(new Vector2D(0.5f, 11.4f));
	bar.setColor(new Color(255, 255, 255, 255));
	bar.setOutlineSize(0);
	bar.setProportional(true);
	bar.setShadowSize(1);
	bar.setUseBox(true);
	bar.setBoxColor(new Color(255, 255, 255, 50));
	bar.setTextSize(new Vector2D(11.4f, width));
	bar.setSelectable(false);

	next = PlayerTextdraw.create(player, position.x + maxWidth - width, position.y + maxHeight - 15.0f, "~d~");
	next.setBackgroundColor(new Color(0, 0, 0, 255));
	next.setFont(TextDrawFont.get(1));
	next.setLetterSize(new Vector2D(0.5f, 1.0f));
	next.setColor(new Color(255, 255, 255, 255));
	next.setOutlineSize(0);
	next.setProportional(true);
	next.setShadowSize(1);
	next.setUseBox(true);
	next.setBoxColor(new Color(255, 255, 255, 50));
	next.setTextSize(new Vector2D(position.x + maxWidth, Calculation.letterHeightToHeight(1.0f)));
	next.setSelectable(true);

	currentIndex = -1;
}
 

开发者ID:Alf21,
项目名称:textdraw-system,
代码行数:64,
代码来源:ListBar.java

示例27: prepare

点赞 2

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
/**
 * prepare the event
 * @param eventData the event
 */
public static void prepare(EventData eventData) {
	eventData.setState(EventState.PREPARE);
	
	tDTraitor = Textdraw.create(376, 410);
	tDTraitor.setText("Traitor");
	tDTraitor.setAlignment(TextDrawAlign.CENTER);
	tDTraitor.setBackgroundColor(Color.RED);
	tDTraitor.setFont(TextDrawFont.get(2));
	tDTraitor.setLetterSize(0.9f, 3.2f);
	tDTraitor.setColor(Color.BLACK);
	tDTraitor.setOutlineSize(1);
	tDTraitor.setProportional(true);
	tDTraitor.setUseBox(true);
	tDTraitor.setBoxColor(Color.BLACK);
	tDTraitor.setTextSize(18, -209);
	tDTraitor.setSelectable(false);
	
	tDInnocent = Textdraw.create(376, 410);
	tDInnocent.setText("Innocent");
	tDInnocent.setAlignment(TextDrawAlign.CENTER);
	tDInnocent.setBackgroundColor(Color.GREEN);
	tDInnocent.setFont(TextDrawFont.get(2));
	tDInnocent.setLetterSize(0.9f, 3.2f);
	tDInnocent.setColor(Color.BLACK);
	tDInnocent.setOutlineSize(1);
	tDInnocent.setProportional(true);
	tDInnocent.setUseBox(true);
	tDInnocent.setBoxColor(Color.BLACK);
	tDInnocent.setTextSize(18, -209);
	tDInnocent.setSelectable(false);
	
	countdownTextdraw = Textdraw.create(320, 9);
	countdownTextdraw.setAlignment(TextDrawAlign.CENTER);
	countdownTextdraw.setBackgroundColor(Color.BLACK);
	countdownTextdraw.setFont(TextDrawFont.get(2));
	countdownTextdraw.setLetterSize(0.33f, 1);
	countdownTextdraw.setColor(Color.WHITE);
	countdownTextdraw.setOutlineSize(0);
	countdownTextdraw.setProportional(true);
	countdownTextdraw.setUseBox(true);
	countdownTextdraw.setBoxColor(Color.BLACK);
	countdownTextdraw.setTextSize(0, 51);
	countdownTextdraw.setSelectable(false);
	
	EventMapBase eventMapBase = eventData.getMap();
	mapTextdraw = Zone.create(eventMapBase.getMinX()-500, eventMapBase.getMinY()-500, eventMapBase.getMaxX()+500, eventMapBase.getMaxY()+500);
	
	Color color = new Color(0,0,0,0);
	for(Player player : EventFunctions.getAllPlayers(eventData)) {
		PlayerData playerData = EventSystem.getInstance().getPlayerLifecycleHolder().getObject(player, PlayerData.class);
		player.setColor(color);
		player.giveWeapon(WeaponModel.DEAGLE, 14); //TODO if not online -> Packetloss
		mapTextdraw.show(player, Color.BLACK);
		for(Player all : EventFunctions.getAllPlayers(eventData)) {
			all.markerForPlayer(player, color);
		}
		playerData.setCount(30);
	}
	createTextdraws(eventData);
}
 

开发者ID:Alf21,
项目名称:event-system,
代码行数:65,
代码来源:TTT.java

示例28: onInit

点赞 2

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
@Override
protected void onInit()
{

	checkpointNumber = TextDrawUtils.createPlayerText(player, 0, 435, "0/0");
	checkpointNumber.setAlignment(TextDrawAlign.LEFT);
	checkpointNumber.setFont(TextDrawFont.FONT2);
	checkpointNumber.setLetterSize(0.75f, 2.4f);
	checkpointNumber.setShadowSize(1);
	checkpointNumber.show();

	rankingNumber = TextDrawUtils.createPlayerText(player, 635, 360, "-");
	rankingNumber.setAlignment(TextDrawAlign.RIGHT);
	rankingNumber.setFont(TextDrawFont.FONT2);
	rankingNumber.setLetterSize(1.2f, 3.75f);
	rankingNumber.setShadowSize(2);
	rankingNumber.show();

	timeDiffDraw = TextDrawUtils.createPlayerText(player, 320, 440, "-");
	timeDiffDraw.setAlignment(TextDrawAlign.CENTER);
	timeDiffDraw.setFont(TextDrawFont.PRICEDOWN);
	timeDiffDraw.setLetterSize(1.2f, 3.75f);
	timeDiffDraw.setShadowSize(2);

	bottomInfo = TextDrawUtils.createPlayerText(player, 0, 460, "-");
	bottomInfo.setAlignment(TextDrawAlign.LEFT);
	bottomInfo.setFont(TextDrawFont.FONT2);
	bottomInfo.setLetterSize(0.25f, 0.8f);
	bottomInfo.setShadowSize(1);
	bottomInfo.show();

	progressBarBg = TextDrawUtils.createPlayerTextBG(player, 2, 240, 10, 200);
	progressBarBg.setBoxColor(new Color(0, 0, 0, 128));
	progressBarBg.show();

	timer = Timer.create(100, (factualInterval) -> update());
	timer.start();

	progressBarTimer = Timer.create(500, (factualInterval) -> updateProgressBar());
	progressBarTimer.start();

	addDestroyable(bottomInfo);
	addDestroyable(rankingNumber);
	addDestroyable(checkpointNumber);
	addDestroyable(timeDiffDraw);
	addDestroyable(progressBarBg);
	addDestroyable(timer);
	addDestroyable(progressBarTimer);

	update();
}
 

开发者ID:GTAUN,
项目名称:wl-race,
代码行数:52,
代码来源:RacingHudWidget.java

示例29: onInit

点赞 2

import net.gtaun.shoebill.constant.TextDrawAlign; //导入依赖的package包/类
@Override
protected void onInit()
{
	final LocalizedStringSet stringSet = vehicleManagerService.getLocalizedStringSet();
	
	speedDisplay = TextDrawUtils.createPlayerText(player, 625, 410, "0");
	speedDisplay.setAlignment(TextDrawAlign.RIGHT);
	speedDisplay.setFont(TextDrawFont.PRICEDOWN);
	speedDisplay.setLetterSize(1.2f, 3.75f);
	speedDisplay.setShadowSize(2);
	speedDisplay.show();
	
	unitDisplay = TextDrawUtils.createPlayerText(player, 635, 445, convertCharacters(stringSet.get(player, "Textdraw.VehicleWidget.SpeedUnit")));
	unitDisplay.setAlignment(TextDrawAlign.RIGHT);
	unitDisplay.setFont(TextDrawFont.BANK_GOTHIC);
	unitDisplay.setLetterSize(0.3f, 1.2f);
	unitDisplay.setShadowSize(1);
	unitDisplay.show();
	
	otherInfo = TextDrawUtils.createPlayerText(player, 638, 460, "-");
	otherInfo.setAlignment(TextDrawAlign.RIGHT);
	otherInfo.setFont(TextDrawFont.FONT2);
	otherInfo.setLetterSize(0.25f, 0.8f);
	otherInfo.setShadowSize(1);
	otherInfo.show();
	
	Color healthBarColor = new Color(255, 0, 0, 64);
	
	healthBar = TextDrawUtils.createPlayerText(player, 0, 478, " ");
	healthBar.setUseBox(true);
	healthBar.setBoxColor(healthBarColor);
	healthBar.setLetterSize(1.0f, 0.5f);
	healthBar.show();
	
	timer = Timer.create(100, (factualInterval) ->
	{
		update();
	});
	timer.start();

	addDestroyable(otherInfo);
	addDestroyable(unitDisplay);
	addDestroyable(speedDisplay);
	addDestroyable(healthBar);
	addDestroyable(timer);
	
	update();
}
 

开发者ID:GTAUN,
项目名称:wl-vehicle-manager,
代码行数:49,
代码来源:VehicleWidget.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)