Resource[] resources = Resource.values();
Image img;
Map<Resource, BigDecimal> resourceMap = GameData.getSelectedColony()
.getResources();
Technology t = null;
if (uiTechnology != null) {
t = uiTechnology.getTechnology();
}
Map<Resource, BigDecimal> costMap = null;
if (t != null) {
costMap = t.getCost();
}
int y = sy + height - 100;
int x = sx + 45;
final int rsx = x;
for (Resource r : resources) {
UIHelper.drawDarkBox(g, x, y += 3, 24, 20);
img = ImageManager.getGfx(r.getGfxBase() + "-small");
img.draw(x + 3, y, r.getColor());
String value = resourceMap.get(r).toString();
Label lbl = this.storeLabels.get(r);
final int zoneHeight = 15;
UIHelper.drawDarkBox(g, x + 24, y, lbl.getWidth() + 4, zoneHeight);
lbl.setPosition(x + 24, y);
lbl.setText(value);
lbl.setVisible(true);
x += lbl.getWidth() + 15;
String costValue = "";
if (costMap != null) {
costValue = costMap.get(r).toString();
}
Label costLbl = this.costLabels.get(r);
UIHelper.drawDarkBox(g, x + 24, y, costLbl.getWidth() + 4,
zoneHeight);
costLbl.setPosition(x + 24, y);
costLbl.setText(costValue);
costLbl.setVisible(true);
y += 20;
x = rsx;
}
if (t != null) {
Font font = FontHelper.getFont(FontHelper.HEMI_HEAD, Color.white,
25);
font.drawString(sx + 10, sy + 10, t.getName());
technologyDescription.setText(t.getDescription());
technologyDescription.setPosition(sx + 10, sy += 35);
} else {
technologyDescription.setText("");
}