mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
add setting to export card notes in meta data
This commit is contained in:
@@ -143,6 +143,7 @@ Image export_image(const SetP& set, const CardP& card, const double zoom, const
|
||||
IndexMap<FieldP, ValueP>& card_data = card->data;
|
||||
boost::json::object& cardv = mse_to_json(card, set.get());
|
||||
boost::json::object& cardv_data = cardv["data"].as_object();
|
||||
if (!settings.stylesheetSettingsFor(set->stylesheetFor(card)).card_notes_export()) cardv["notes"] = "";
|
||||
for(IndexMap<FieldP, ValueP>::iterator it = card_data.begin() ; it != card_data.end() ; ++it) {
|
||||
ImageValue* value = dynamic_cast<ImageValue*>(it->get());
|
||||
if (value && !value->filename.empty()) {
|
||||
@@ -172,6 +173,7 @@ Image export_image(const SetP& set, const vector<CardP>& cards, bool scale_to_lo
|
||||
IndexMap<FieldP, ValueP>& card_data = card->data;
|
||||
boost::json::object& cardv = mse_to_json(card, set.get());
|
||||
boost::json::object& cardv_data = cardv["data"].as_object();
|
||||
if (!settings.stylesheetSettingsFor(set->stylesheetFor(card)).card_notes_export()) cardv["notes"] = "";
|
||||
for(IndexMap<FieldP, ValueP>::iterator it = card_data.begin() ; it != card_data.end() ; ++it) {
|
||||
ImageValue* value = dynamic_cast<ImageValue*>(it->get());
|
||||
if (value && !value->filename.empty()) {
|
||||
|
||||
+11
-8
@@ -126,14 +126,15 @@ IMPLEMENT_REFLECTION_NO_SCRIPT(GameSettings) {
|
||||
|
||||
|
||||
StyleSheetSettings::StyleSheetSettings()
|
||||
: card_zoom (1.0, true)
|
||||
, export_zoom (1.0, true)
|
||||
, card_angle (0, true)
|
||||
, card_anti_alias (true, true)
|
||||
, card_borders (true, true)
|
||||
, card_draw_editing (true, true)
|
||||
, card_normal_export (true, true)
|
||||
, card_spellcheck_enabled(true, true)
|
||||
: card_zoom (1.0, true)
|
||||
, export_zoom (1.0, true)
|
||||
, card_angle (0, true)
|
||||
, card_anti_alias (true, true)
|
||||
, card_borders (true, true)
|
||||
, card_draw_editing (true, true)
|
||||
, card_normal_export (true, true)
|
||||
, card_notes_export (false, true)
|
||||
, card_spellcheck_enabled(true, true)
|
||||
{}
|
||||
|
||||
void StyleSheetSettings::useDefault(const StyleSheetSettings& ss) {
|
||||
@@ -144,6 +145,7 @@ void StyleSheetSettings::useDefault(const StyleSheetSettings& ss) {
|
||||
if (card_borders .isDefault()) card_borders .assignDefault(ss.card_borders);
|
||||
if (card_draw_editing .isDefault()) card_draw_editing .assignDefault(ss.card_draw_editing);
|
||||
if (card_normal_export .isDefault()) card_normal_export .assignDefault(ss.card_normal_export);
|
||||
if (card_notes_export .isDefault()) card_notes_export .assignDefault(ss.card_notes_export);
|
||||
if (card_spellcheck_enabled.isDefault()) card_spellcheck_enabled.assignDefault(ss.card_spellcheck_enabled);
|
||||
}
|
||||
|
||||
@@ -155,6 +157,7 @@ IMPLEMENT_REFLECTION_NO_SCRIPT(StyleSheetSettings) {
|
||||
REFLECT(card_borders);
|
||||
REFLECT(card_draw_editing);
|
||||
REFLECT(card_normal_export);
|
||||
REFLECT(card_notes_export);
|
||||
REFLECT(card_spellcheck_enabled);
|
||||
}
|
||||
|
||||
|
||||
@@ -104,6 +104,7 @@ public:
|
||||
Defaultable<bool> card_borders;
|
||||
Defaultable<bool> card_draw_editing;
|
||||
Defaultable<bool> card_normal_export;
|
||||
Defaultable<bool> card_notes_export;
|
||||
Defaultable<bool> card_spellcheck_enabled;
|
||||
|
||||
/// Where the settings are the default, use the value from ss
|
||||
|
||||
Reference in New Issue
Block a user