use font settings for drawing multiple choice text labels, spacing and direction are scriptable.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1298 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2009-01-08 14:19:17 +00:00
parent 9551d600eb
commit 1541d57c1a
6 changed files with 26 additions and 7 deletions
+3 -2
View File
@@ -74,9 +74,10 @@ void MultipleChoiceValueViewer::drawChoice(RotatedDC& dc, RealPoint& pos, const
if (style().render_style & RENDER_TEXT) {
// draw text
String text = tr(getStylePackage(), choice, capitalize_sentence);
dc.SetFont(style().font,1);
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))));
RealPoint text_pos = align_in_rect(ALIGN_MIDDLE_LEFT, text_size, RealRect(pos.x + size.width + 1, pos.y, 0,size.height));
dc.DrawTextWithShadow(text, style().font, pos);
size = add_horizontal(size, text_size);
}
// next position