public static int getAdvColorRGB(int colorIndex, int plrIndex) { if (colorIndex > advancedColorRGBs.length) { return getColorRGB(plrIndex); } return advancedColorRGBs[colorIndex]; }
/** * Used to determine the color that should be used to indicate ECM effects * for a given player * * @param player * @return */ public static Color getECMColor(IPlayer player) { final int alpha = GUIPreferences.getInstance().getInt( GUIPreferences.ADVANCED_ECM_TRANSPARENCY); Color tint; if (player != null) { tint = new Color(PlayerColors.getColorRGB(player.getColorIndex())); } else { tint = Color.gray; } // Create a new color by adding transparency to the tint return new Color(tint.getRed(), tint.getGreen(), tint.getBlue(), alpha); }
public String getPlayerColor() { if (onlyDetectedBySensors()) { return "C0C0C0"; } else { return Integer.toHexString(PlayerColors.getColorRGB(entity .getOwner().getColorIndex())); } }
public void loadPreviewImage(JLabel bp, Entity entity, IPlayer player) { Image camo = null; if (entity.getCamoFileName() != null) { camo = bv.getTilesetManager().getEntityCamo(entity); } else { camo = bv.getTilesetManager().getPlayerCamo(player); } int tint = PlayerColors.getColorRGB(player.getColorIndex()); Image icon = bv.getTilesetManager().loadPreviewImage(entity, camo, tint, bp); if (icon != null) { bp.setIcon(new ImageIcon(icon)); } else { bp.setIcon(null); } }
public void loadPreviewImage(JLabel bp, Entity entity, IPlayer player) { Image camo = null; if (entity.getCamoFileName() != null) { camo = bv.getTilesetManager().getEntityCamo(entity); } else { camo = bv.getTilesetManager().getPlayerCamo(player); } int tint = PlayerColors.getColorRGB(player.getColorIndex()); bp.setIcon(new ImageIcon(bv.getTilesetManager().loadPreviewImage( entity, camo, tint, bp))); }
private Image getImageFor(Unit u, Component c) { if(null == mt) { return null; } Image base = mt.imageFor(u.getEntity(), c, -1); int tint = PlayerColors.getColorRGB(u.campaign.getColorIndex()); EntityImage entityImage = new EntityImage(base, tint, getCamo(u), c); return entityImage.loadPreviewImage(); }
int tint = PlayerColors.getColorRGB(player.getColorIndex());
g2.setColor(new Color(PlayerColors.getColorRGB( entity.getOwner().getColorIndex()))); g2.fill(form); PlayerColors.getColorRGB(entity.getOwner().getColorIndex())); g.setColor(pColor); g.fillOval(baseX - radius, baseY - radius, dia, dia); PlayerColors.getColorRGB(entity.getOwner().getColorIndex())); g.setColor(pColor); g.fillPolygon(xPoints, yPoints, xPoints.length);
cp = allP.nextElement(); if (board.isLegalDeployment(c, cp.getStartingPos())) { Color bC = new Color(PlayerColors.getColorRGB(cp.getColorIndex())); drawHexBorder(g, getHexLocation(c), bC, (bThickness+2)
protected Image getImageFor(Unit u) { if(null == icons.getMechTiles()) { return null; } Image base = icons.getMechTiles().imageFor(u.getEntity(), this, -1); if (null == base) { return null; } int tint = PlayerColors.getColorRGB(u.campaign.getColorIndex()); EntityImage entityImage = new EntityImage(base, tint, getCamo(u), this); return entityImage.loadPreviewImage(); }
private Image getImageFor(Unit u, Component c) { if(null == icons.getMechTiles()) { return null; } Image base = icons.getMechTiles().imageFor(u.getEntity(), c, -1); int tint = PlayerColors.getColorRGB(u.campaign.getColorIndex()); EntityImage entityImage = new EntityImage(base, tint, getCamo(u), c); return entityImage.loadPreviewImage(); }
addToTT("Unit", NOBR, Integer.toHexString(PlayerColors.getColorRGB(entity.getOwner().getColorIndex())), entity.getChassis(), entity.getOwner().getName());
txt.append(Integer.toHexString(PlayerColors.getColorRGB(cp.getColorIndex()))); txt.append("> "); //$NON-NLS-1$ txt.append(cp.getName());
Integer.toHexString(PlayerColors.getColorRGB( entity.getOwner().getColorIndex())), entity.getChassis(),