diff --git a/data/chs.mse-locale/locale b/data/chs.mse-locale/locale index 4963a5a4..ad9c0b8a 100644 --- a/data/chs.mse-locale/locale +++ b/data/chs.mse-locale/locale @@ -423,6 +423,7 @@ label: #_ADD pack selection: Pack selection #_ADD pack totals: Totals #_ADD seed: Seed +#_ADD total cards: Total # Open dialogs all files 全部文件 @@ -468,7 +469,7 @@ label: filename format: 格式: filename conflicts: 处理重复文件名: export filenames: 文件名 - cards to export: 导出卡牌 +#_DEL cards to export: 导出卡牌 filename is ignored: (忽略文件名) # apprentice export diff --git a/data/de.mse-locale/locale b/data/de.mse-locale/locale index 356d0ab5..2efe7958 100644 --- a/data/de.mse-locale/locale +++ b/data/de.mse-locale/locale @@ -423,6 +423,7 @@ label: #_ADD pack selection: Pack selection #_ADD pack totals: Totals #_ADD seed: Seed +#_ADD total cards: Total # Open dialogs all files Alle Dateien @@ -468,7 +469,7 @@ label: filename format: &Format: filename conflicts: &Doppelte Dateinamen: export filenames: Dateinamen - cards to export: Exportierte Karten +#_DEL cards to export: Exportierte Karten filename is ignored: (Dateiname wird ignoriert) # apprentice export diff --git a/data/en.mse-locale/locale b/data/en.mse-locale/locale index c33ba4f6..4055bc5f 100644 --- a/data/en.mse-locale/locale +++ b/data/en.mse-locale/locale @@ -423,6 +423,7 @@ label: pack selection: Pack selection pack totals: Totals seed: Seed + total cards: Total # Open dialogs all files All files @@ -468,7 +469,6 @@ label: filename format: &Format: filename conflicts: &Handle duplicating filenames: export filenames: Filenames - cards to export: Cards to export filename is ignored: (filename is ignored) # apprentice export diff --git a/data/es.mse-locale/locale b/data/es.mse-locale/locale index 571fbc78..aaa2cadc 100644 --- a/data/es.mse-locale/locale +++ b/data/es.mse-locale/locale @@ -423,6 +423,7 @@ label: #_ADD pack selection: Pack selection #_ADD pack totals: Totals #_ADD seed: Seed +#_ADD total cards: Total # Open dialogs all files Todos los archivos @@ -468,7 +469,7 @@ label: filename format: &Formato: filename conflicts: &Soportar duplicado de nombres de archivos: export filenames: Nombres de archivo - cards to export: Cartas a exportar +#_DEL cards to export: Cartas a exportar filename is ignored: (filename is ignored) # apprentice export diff --git a/data/fr.mse-locale/locale b/data/fr.mse-locale/locale index 05777a2a..5b73e385 100644 --- a/data/fr.mse-locale/locale +++ b/data/fr.mse-locale/locale @@ -423,6 +423,7 @@ label: #_ADD pack selection: Pack selection #_ADD pack totals: Totals #_ADD seed: Seed +#_ADD total cards: Total # Open dialogs all files All files @@ -468,7 +469,7 @@ label: filename format: &Format: filename conflicts: &Handle duplicating filenames: export filenames: Filenames - cards to export: Cards to export +#_DEL cards to export: Cards to export filename is ignored: (filename is ignored) # apprentice export diff --git a/data/it.mse-locale/locale b/data/it.mse-locale/locale index ebc918ef..e80e3ab1 100644 --- a/data/it.mse-locale/locale +++ b/data/it.mse-locale/locale @@ -1,4 +1,4 @@ -#_DEL mse version: 0.3.7 +#_DEL #_DEL #_DEL mse version: 0.3.7 #_ADD mse version: 0.3.7 installer group: translations/Italiano full name: Italiano @@ -424,6 +424,7 @@ label: #_ADD pack selection: Pack selection #_ADD pack totals: Totals #_ADD seed: Seed +#_ADD total cards: Total # Open dialogs all files Tutti i file @@ -469,7 +470,7 @@ label: filename format: &Formato: filename conflicts: &Handle duplicating filenames: export filenames: Filenames - cards to export: Carte da esportare +#_DEL cards to export: Carte da esportare filename is ignored: (il filename è ignorato) # apprentice export diff --git a/data/jp.mse-locale/locale b/data/jp.mse-locale/locale index b041540c..c2c9780e 100644 --- a/data/jp.mse-locale/locale +++ b/data/jp.mse-locale/locale @@ -423,6 +423,7 @@ label: #_ADD pack selection: Pack selection #_ADD pack totals: Totals #_ADD seed: Seed +#_ADD total cards: Total # Open dialogs all files 全てのファイル @@ -468,7 +469,7 @@ label: filename format: &フォーマット: filename conflicts: &取っ手を複写することのファイル名: export filenames: ファイル名 - cards to export: エクスポートするカード +#_DEL cards to export: エクスポートするカード filename is ignored: (ファイル名は無視されます) # apprentice export diff --git a/data/magic.mse-game/script b/data/magic.mse-game/script index aa1b5d0c..e7442913 100644 --- a/data/magic.mse-game/script +++ b/data/magic.mse-game/script @@ -199,6 +199,7 @@ hybrid_cost_sort := { else if colors = "UG" then "GJ" else "GK" } +# A code for the color of the card color_of_card := { card_color := card.card_color casting_cost := card.casting_cost diff --git a/src/cli/cli_main.cpp b/src/cli/cli_main.cpp index 83616e44..e0490a07 100644 --- a/src/cli/cli_main.cpp +++ b/src/cli/cli_main.cpp @@ -150,7 +150,7 @@ void CLISetInterface::handleCommand(const String& command) { if (arg.empty()) { cli.showError(_("Give a shell command to execute.")); } else { - #if UNICODE + #ifdef UNICODE #ifdef __WXMSW__ _wsystem(arg.c_str()); // TODO: is this function available on other platforms? #else diff --git a/src/gui/set/random_pack_panel.cpp b/src/gui/set/random_pack_panel.cpp index 60c567d9..b4f81dc4 100644 --- a/src/gui/set/random_pack_panel.cpp +++ b/src/gui/set/random_pack_panel.cpp @@ -87,6 +87,7 @@ class PackTotalsPanel : public wxPanel { GameP game; void onPaint(wxPaintEvent&); void draw(DC& dc); + void drawItem(DC& dc, int& y, const String& name, int value); map amounts; }; @@ -104,15 +105,30 @@ void PackTotalsPanel::draw(DC& dc) { dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT)); dc.SetFont(*wxNORMAL_FONT); int y = 0; + int total = 0; FOR_EACH(item, game->pack_items) { - int w,h; - String name = capitalize(item->name); - String amount; amount << amounts[item->name]; - dc.GetTextExtent(amount,&w,&h); - dc.DrawText(name, 0, y); - dc.DrawText(amount, size.x-w, y);//align right - y += h + 10; + int value = amounts[item->name]; + drawItem(dc, y, item->name, value); + total += value; } + // draw total + dc.SetPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW)); + dc.DrawLine(0, y-4, size.x, y-4); + dc.SetPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DHIGHLIGHT)); + dc.DrawLine(0, y-3, size.x, y-3); + y += 6; + drawItem(dc, y, _LABEL_("total cards"), total); + +} +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 + y += h + 10; } void PackTotalsPanel::setGame(const GameP& game) { diff --git a/src/resource/common/expected_locale_keys b/src/resource/common/expected_locale_keys index 141a64d0..993e699c 100644 --- a/src/resource/common/expected_locale_keys +++ b/src/resource/common/expected_locale_keys @@ -1,6 +1,6 @@ # This file contains the keys expected to be in MSE locales # It was automatically generated by tools/locale/locale.pl -# Generated on Fri Aug 8 23:23:10 2008 +# Generated on Sat Aug 9 19:00:54 2008 action: add control point: 0 @@ -273,7 +273,6 @@ label: auto replace: 0 card display: 0 card notes: 0 - cards to export: 0 check at startup: 0 checking requires internet: 0 columns: 0 @@ -332,6 +331,7 @@ label: style type: 0 stylesheet not found: 1 styling options: 0 + total cards: 0 upgrade package: 0 uses: 0 zoom: 0