Make Violet's button dialogue work in cutscene test

This was easier than I expected - just add an optional buttons="1"
attribute to cutscenes.xml. It's treated like the speaker attribute -
it's only there as context for the translator, and for the cutscene
test.
This commit is contained in:
Dav999-v
2023-03-22 21:30:42 +01:00
committed by Misa Elizabeth Kai
parent bc156137d8
commit 65d9d9a0d8
15 changed files with 30 additions and 16 deletions

View File

@@ -289,6 +289,9 @@ static void sync_lang_file(const std::string& langcode)
subElem->DeleteAttribute("pad_right");
subElem->DeleteAttribute("padtowidth");
bool buttons = subElem->BoolAttribute("buttons", false);
subElem->DeleteAttribute("buttons"); // we want this at the end...
if (format->text != NULL)
subElem->SetAttribute("translation", format->text);
if (format->tt)
@@ -310,6 +313,8 @@ static void sync_lang_file(const std::string& langcode)
}
if (format->padtowidth != 0)
subElem->SetAttribute("padtowidth", format->padtowidth);
if (buttons)
subElem->SetAttribute("buttons", 1);
}
}
@@ -546,7 +551,8 @@ bool populate_cutscene_test(const char* script_id)
script.add_test_line(
speaker,
eng,
subElem->UnsignedAttribute("case", 1)
subElem->UnsignedAttribute("case", 1),
subElem->BoolAttribute("buttons", false)
);
}
}