Working MultipleChoiceValueEditor for checklist style

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@228 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-03-22 15:36:07 +00:00
parent 21781a559a
commit f5de36057c
7 changed files with 67 additions and 17 deletions
+2 -2
View File
@@ -41,7 +41,7 @@ void MultipleChoiceValueViewer::draw(RotatedDC& dc) {
}
void MultipleChoiceValueViewer::drawChoice(RotatedDC& dc, RealPoint& pos, const String& choice, bool active) {
RealSize size;
RealSize size; size.height = item_height;
if (nativeLook() && (style().render_style & RENDER_CHECKLIST)) {
wxRect rect = dc.tr(RealRect(pos + RealSize(1,1), RealSize(12,12)));
draw_checkbox(nullptr, dc.getDC(), rect, active); // TODO
@@ -60,7 +60,7 @@ void MultipleChoiceValueViewer::drawChoice(RotatedDC& dc, RealPoint& pos, const
}
if (style().render_style & RENDER_TEXT) {
// draw text
String text = tr(*viewer.stylesheet, choice, capitalize(choice));
String text = tr(*viewer.stylesheet, choice, capitalize_sentence(choice));
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))));