Use locale to translate pack names things

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1135 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-08-11 11:57:18 +00:00
parent 351d5b7613
commit 76c3950c89
+3 -4
View File
@@ -108,7 +108,7 @@ void PackTotalsPanel::draw(DC& dc) {
int total = 0;
FOR_EACH(item, game->pack_items) {
int value = amounts[item->name];
drawItem(dc, y, item->name, value);
drawItem(dc, y, tr(*game, item->name, capitalize), value);
total += value;
}
// draw total
@@ -123,11 +123,10 @@ void PackTotalsPanel::draw(DC& dc) {
void PackTotalsPanel::drawItem(DC& dc, int& y, const String& name, int value) {
wxSize size = dc.GetSize();
int w,h;
String cap_name = capitalize(name);
String amount; amount << value;
dc.GetTextExtent(amount,&w,&h);
dc.DrawText(cap_name, 0, y);
dc.DrawText(amount, size.x-w, y);//align right
dc.DrawText(name, 0, y);
dc.DrawText(amount, size.x-w, y);//align right
y += h + 10;
}