mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -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:
+3
-1
@@ -51,6 +51,7 @@ IMPLEMENT_REFLECTION(Field) {
|
||||
}
|
||||
REFLECT(name);
|
||||
REFLECT_IF_READING name = canonical_name_form(name);
|
||||
REFLECT(caption);
|
||||
REFLECT(description);
|
||||
REFLECT_N("icon", icon_filename);
|
||||
REFLECT(editable);
|
||||
@@ -64,9 +65,10 @@ IMPLEMENT_REFLECTION(Field) {
|
||||
REFLECT(card_list_allow);
|
||||
REFLECT(card_list_name);
|
||||
REFLECT(sort_script);
|
||||
REFLECT_IF_READING if(card_list_name.empty()) card_list_name = name;
|
||||
REFLECT_N("card_list_alignment", card_list_align);
|
||||
REFLECT(tab_index);
|
||||
REFLECT_IF_READING if(caption.empty()) caption = name_to_caption(name);
|
||||
REFLECT_IF_READING if(card_list_name.empty()) card_list_name = capitalize(caption);
|
||||
}
|
||||
|
||||
template <>
|
||||
|
||||
Reference in New Issue
Block a user