本文整理汇总了Java中net.gtaun.shoebill.data.Color类的典型用法代码示例。如果您正苦于以下问题:Java Color类的具体用法?Java Color怎么用?Java Color使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Color类属于net.gtaun.shoebill.data包,在下文中一共展示了Color类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: PlayerTextdraw
import net.gtaun.shoebill.data.Color; //导入依赖的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
import net.gtaun.shoebill.data.Color; //导入依赖的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
import net.gtaun.shoebill.data.Color; //导入依赖的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
import net.gtaun.shoebill.data.Color; //导入依赖的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: init
import net.gtaun.shoebill.data.Color; //导入依赖的package包/类
private void init() {
clicked = System.currentTimeMillis();
unselectedListItemColor = list.getUnselectedListItemColor();
unselectedListItemBgColor = list.getUnselectedListItemBgColor();
selectedListItemColor = list.getSelectedListItemColor();
selectedListItemBgColor = list.getSelectedListItemBgColor();
selected = disableAutoColoring = false;
playerTextdraw = PlayerTextdraw.create(list.getPlayer(), list.getPosition().x, list.getPosition().y + 15.0f * list.getListItems().size(), getText());
playerTextdraw.setBackgroundColor(new Color(0, 0, 0, 255));
playerTextdraw.setFont(TextDrawFont.get(1));
playerTextdraw.setLetterSize(new Vector2D(0.5f, 1.0f));
playerTextdraw.setColor(unselectedListItemColor);
playerTextdraw.setOutlineSize(0);
playerTextdraw.setProportional(true);
playerTextdraw.setShadowSize(0);
playerTextdraw.setUseBox(true);
playerTextdraw.setBoxColor(unselectedListItemBgColor);
playerTextdraw.setTextSize(new Vector2D(list.getPosition().x + list.getMaxWidth() - list.getListBar().getWidth() - 6f, Calculation.letterHeightToHeight(1.0f)));
playerTextdraw.setSelectable(true);
}
开发者ID:Alf21,项目名称:textdraw-system,代码行数:24,代码来源:ListItem.java
示例6: Input
import net.gtaun.shoebill.data.Color; //导入依赖的package包/类
private Input(Container container, float x, float y, float width, String placeholder, InputType inputType, String name) {
super(container, ComponentAlignment.TOP_LEFT, name);
if(placeholder.replaceAll(" ", "").isEmpty())
placeholder = Dialog.TEXT_EMPTY;
this.placeholder = placeholder;
this.inputType = inputType;
if(Float.isNaN(width))
width = 125f;
playerTextdraw = PlayerTextdraw.create(super.getPlayer(), x, y, placeholder);
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(0);
playerTextdraw.setUseBox(true);
playerTextdraw.setBoxColor(container.getDialog().getInputColor());
playerTextdraw.setTextSize(x-4+width, 10.000000f);
playerTextdraw.setSelectable(true);
playerTextdraw.setAllText(placeholder);
}
开发者ID:Alf21,项目名称:textdraw-system,代码行数:25,代码来源:Input.java
示例7: Text
import net.gtaun.shoebill.data.Color; //导入依赖的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
示例8: create
import net.gtaun.shoebill.data.Color; //导入依赖的package包/类
public void create(Dialog dialog) {
dialog.setCloseIcon(closeIcon);
dialog.setContent(new Content(dialog, contentBackground, contentText));
if (dialog instanceof Panel) {
((Panel) dialog).setLeftButton(leftButton);
((Panel) dialog).setLeftButtonBackground(leftButtonBackground);
((Panel) dialog).setRightButton(rightButton);
((Panel) dialog).setRightButtonBackground(rightButtonBackground);
}
dialog.setPanelBackground(panelBackground);
dialog.setProcess(process);
dialog.setTitle(title);
dialog.setTitleBackground(titleBackground);
dialog.setHoverColor(new Color(150,0,0,255));
dialog.setInputColor(new Color(255,255,255,50));
dialog.setMarkerColor(new Color(150,0,0,50));
}
开发者ID:Alf21,项目名称:textdraw-system,代码行数:18,代码来源:DialogStyle.java
示例9: joinEvent
import net.gtaun.shoebill.data.Color; //导入依赖的package包/类
/**
* let player join event
* @param player the player
* @param eventData the event
*/
private static void joinEvent(Player player, EventData eventData) {
playerPlayerData = EventSystem.getInstance().getPlayerLifecycleHolder().getObject(player, PlayerData.class);
playerPlayerData.setCurrentEvent(eventData);
eventData.getPlayerList().add(player);
if(eventData.getMap() != null) {
if(eventData.getZone() != null)
eventData.getZone().show(player, new Color(255,255,255,102));
}
eventData.getOwner().sendMessage(Color.YELLOW, localizedStringSet.format(eventData.getOwner(), "Event.Join.Joined", player.getName()));
for(Player player2 : eventData.getPlayerList()) {
player2.sendMessage(Color.YELLOW, localizedStringSet.format(player2, "Event.Join.Joined", player.getName()));
}
try {
((Event) eventData.getClz().newInstance()).onPlayerJoin(player, eventData);
} catch (InstantiationException | IllegalAccessException e) {
System.out.println(e);
e.printStackTrace();
}
}
开发者ID:Alf21,项目名称:event-system,代码行数:28,代码来源:EventBase.java
示例10: PlayerData
import net.gtaun.shoebill.data.Color; //导入依赖的package包/类
public PlayerData(EventManager manager, Player p) {
super(manager, p);
player = p;
vehicleHealth = -1;
eventPoints = 0;
eventScore = 0;
playerWeapons = new ArrayList<>();
color = new Color(0,0,0,0);
lastUpdate = 0;
damage = 0;
aFK = false;
health = 100f;
armour = 0f;
traitorShop = new HashMap<>();
rangeLabels = new ArrayList<>();
}
开发者ID:Alf21,项目名称:event-system,代码行数:17,代码来源:PlayerData.java
示例11: createHealthBar
import net.gtaun.shoebill.data.Color; //导入依赖的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
示例12: createTankBar
import net.gtaun.shoebill.data.Color; //导入依赖的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
示例13: createHealthBar
import net.gtaun.shoebill.data.Color; //导入依赖的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
示例14: createTankBar
import net.gtaun.shoebill.data.Color; //导入依赖的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
示例15: createHealthBar
import net.gtaun.shoebill.data.Color; //导入依赖的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
示例16: createTankBar
import net.gtaun.shoebill.data.Color; //导入依赖的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
示例17: updateBoxColors
import net.gtaun.shoebill.data.Color; //导入依赖的package包/类
/**
* update the boxcolors from the event textdraws
* @param eventData the event
*/
private static void updateBoxColors(Player player, EventData eventData) {
if(!eventData.getEventTextdraws().isEmpty()) {
Shoebill.get().runOnSampThread(() -> {
for(Player runner : eventData.getDataPlayerArray()) {
Color color = getBoxColor(runner, getNearestHunter(runner, eventData), eventData);
EventTextdraw eventTextdraw = EventFunctions.getEventTextdraw(eventData, runner.getName());
if (eventTextdraw != null) {
eventTextdraw.setColor(color);
for(Player all : EventFunctions.getAllPlayers(eventData)) {
eventTextdraw.hide(all);
eventTextdraw.show(all);
}
}
}
});
}
}
开发者ID:Alf21,项目名称:event-system,代码行数:22,代码来源:Catching.java
示例18: onPlayerDeath
import net.gtaun.shoebill.data.Color; //导入依赖的package包/类
@Override
public void onPlayerDeath(Player player) {
playerLifecycle = EventSystem.getInstance().getPlayerLifecycleHolder().getObject(player, PlayerData.class);
EventData eventData = playerLifecycle.getCurrentEvent();
if(eventData.getState() == EventState.RUNNING) {
player.sendMessage(Color.YELLOW, "[" + localizedStringSet.get(player, "Event.Class.TTT.Abbr") + "] " + Color.WHITE.toEmbeddingString() + localizedStringSet.get(player, "Event.Class.TTT.Death.Disqualified"));
if(eventData.getDataPlayerArray().contains(player)) {
eventData.getDataPlayerArray().remove(player);
tDInnocent.hide(player);
}
else if(eventData.getDataPlayerArray2().contains(player)){
eventData.getDataPlayerArray2().remove(player);
tDTraitor.hide(player);
}
TTTDeadBody deadBody = new TTTDeadBody(eventData, player);
eventData.getDeadBodies().add(deadBody);
eventData.getSpectators().add(player);
checkFinish(eventData);
}
}
开发者ID:Alf21,项目名称:event-system,代码行数:23,代码来源:TTT.java
示例19: EventTextdraw
import net.gtaun.shoebill.data.Color; //导入依赖的package包/类
public EventTextdraw(String text, int count, String type, int score) {
this.count = count;
this.type = type;
color = new Color(218, 172, 5, 102);
textdraw = createTextdraw(text);
scoreTextdraw = createScoreTextdraw(String.valueOf(score));
}
开发者ID:Alf21,项目名称:event-system,代码行数:8,代码来源:EventTextdraw.java
示例20: createBackground
import net.gtaun.shoebill.data.Color; //导入依赖的package包/类
private void createBackground() {
leftBackgroundTextdraw = PlayerTextdraw.create(player, 75.000000f, 114.000000f, "_");
leftBackgroundTextdraw.setBackgroundColor(new Color(0, 0, 0, 255));
leftBackgroundTextdraw.setFont(TextDrawFont.get(1));
leftBackgroundTextdraw.setLetterSize(new Vector2D(0.500000f, 32.000000f));
leftBackgroundTextdraw.setColor(new Color(255, 255, 255, 255));
leftBackgroundTextdraw.setOutlineSize(0);
leftBackgroundTextdraw.setProportional(true);
leftBackgroundTextdraw.setShadowSize(1);
leftBackgroundTextdraw.setUseBox(true);
leftBackgroundTextdraw.setBoxColor(new Color(0, 0, 0, 150));
leftBackgroundTextdraw.setTextSize(new Vector2D(490.000000f, 0.000000f));
leftBackgroundTextdraw.setSelectable(false);
rightBackgroundTextdraw = PlayerTextdraw.create(player, 495.000000f, 114.000000f, "_");
rightBackgroundTextdraw.setBackgroundColor(new Color(0, 0, 0, 255));
rightBackgroundTextdraw.setFont(TextDrawFont.get(1));
rightBackgroundTextdraw.setLetterSize(new Vector2D(0.500000f, 32.000000f));
rightBackgroundTextdraw.setColor(new Color(255, 255, 255, 255));
rightBackgroundTextdraw.setOutlineSize(0);
rightBackgroundTextdraw.setProportional(true);
rightBackgroundTextdraw.setShadowSize(1);
rightBackgroundTextdraw.setUseBox(true);
rightBackgroundTextdraw.setBoxColor(new Color(0, 0, 0, 150));
rightBackgroundTextdraw.setTextSize(new Vector2D(565.000000f, 0.000000f));
rightBackgroundTextdraw.setSelectable(false);
}
开发者ID:Alf21,项目名称:textdraw-system,代码行数:28,代码来源:ColorPicker.java
注:本文中的net.gtaun.shoebill.data.Color类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论