// remove old widgets
clear(player);
// add bg
GenericGradient gradient = new GenericGradient();
gradient.setAnchor(WidgetAnchor.TOP_LEFT);
gradient.setTopColor(new Color(0.0F, 0.0F, 0.0F, 0.4F)); // (order is Red, Green, Blue, Alpha)
gradient.setBottomColor(new Color(0.0F, 0.0F, 0.0F, 0.0F));
gradient.setHeight(statsOffset.get(1) + 4).setWidth((int)(statsOffset.get(0)));
player.getMainScreen().attachWidget(War.war, gradient);
// border in color of team
GenericGradient teamGradient = new GenericGradient();
teamGradient.setAnchor(WidgetAnchor.TOP_LEFT);
Team team = Team.getTeamByPlayerName(playerName);
Color spoutColor = new Color(250.0F, 250.0F, 250.0F, 1.0F);
if (team != null) {
spoutColor = team.getKind().getSpoutColor();
}
spoutColor.setAlpha(0.5F);
teamGradient.setY(2 + LINE_HEIGHT_WITH_MARGIN);
teamGradient.setTopColor(spoutColor);
teamGradient.setBottomColor(new Color(256, 256, 256, 1.0F));
teamGradient.setHeight(2).setWidth((int)(statsOffset.get(0)));
player.getMainScreen().attachWidget(War.war, teamGradient);
// update stats panel
drawStats(player, statsLines);