nicer options for defaults in localization tr() functions

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@808 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-01-01 16:06:58 +00:00
parent f0be49c2e4
commit ed060aeb04
9 changed files with 54 additions and 72 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ void draw_choice_viewer(RotatedDC& dc, DataViewer& viewer, ChoiceStyle& style, c
}
}
if (style.render_style & RENDER_TEXT) {
String text = tr(*viewer.stylesheet, value, capitalize(value));
String text = tr(*viewer.stylesheet, value, capitalize_sentence);
dc.SetFont(style.font, 1.0);
RealPoint pos = align_in_rect(ALIGN_MIDDLE_LEFT, RealSize(0, dc.GetCharHeight()), dc.getInternalRect()) + RealSize(margin, 0);
dc.DrawTextWithShadow(text, style.font, pos);
+1 -1
View File
@@ -74,7 +74,7 @@ void MultipleChoiceValueViewer::drawChoice(RotatedDC& dc, RealPoint& pos, const
}
if (style().render_style & RENDER_TEXT) {
// draw text
String text = tr(*viewer.stylesheet, choice, capitalize_sentence(choice));
String text = tr(*viewer.stylesheet, choice, capitalize_sentence);
RealSize text_size = dc.GetTextExtent(text);
dc.DrawText(text, align_in_rect(ALIGN_MIDDLE_LEFT, text_size,
RealRect(pos + RealSize(size.width + 1, 0), RealSize(0,size.height))));