mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Use underscores instead of spaces for all internal names. And renamed some script functions at the same time.
* cannocial_name_form now outputs "_", where it used to use " " * this simplifies reflectio and scripting code, because now C++ names are also MSE internal names * added 'caption' property to fields. This is used instead of the name in NativeLookEditor, since the latter will now contain underscores. * renamed text related script functions for consistency, since we were touching that part of the code anyway.
This commit is contained in:
@@ -44,7 +44,7 @@ void NativeLookEditor::drawViewer(RotatedDC& dc, ValueViewer& v) {
|
||||
dc.SetFont(*wxNORMAL_FONT);
|
||||
dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT));
|
||||
// TODO : tr using stylesheet or using game?
|
||||
dc.DrawText(tr(getStylePackage(), s.fieldP->name, capitalize_sentence),
|
||||
dc.DrawText(tr(getStylePackage(), s.fieldP->caption, identity),
|
||||
RealPoint(margin_left - s.left, 1));
|
||||
}
|
||||
// draw viewer
|
||||
@@ -68,7 +68,7 @@ void NativeLookEditor::resizeViewers() {
|
||||
// width of the label string
|
||||
int w;
|
||||
Style& s = *v->getStyle();
|
||||
String text = tr(getStylePackage(), s.fieldP->name, capitalize_sentence);
|
||||
String text = tr(getStylePackage(), s.fieldP->caption, identity);
|
||||
dc.GetTextExtent(text,&w,nullptr);
|
||||
label_width = max(label_width, w + label_margin);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user