Reader now warns about invalid UTF-8 files;

Fixed possible hang when reading multiline strings with incorrect indentation;
Warnings from reading are shown also in NewSetWindow;
Script parse errors get reported with the correct line number;

Added support for showing multiple choice fields as a single image;
Added 'line_below' to ChoiceField::Choice, for putting a line below menu items.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@420 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-06-12 19:35:24 +00:00
parent 27833003c8
commit 8b11433cbd
20 changed files with 318 additions and 86 deletions
+8 -1
View File
@@ -49,9 +49,11 @@ IMPLEMENT_REFLECTION(ChoiceField) {
ChoiceField::Choice::Choice()
: first_id(0)
, line_below(false), enabled(true)
{}
ChoiceField::Choice::Choice(const String& name)
: name(name), first_id(0)
, line_below(false), enabled(true)
{}
@@ -138,11 +140,13 @@ String ChoiceField::Choice::choiceNameNice(int id) const {
IMPLEMENT_REFLECTION_NO_GET_MEMBER(ChoiceField::Choice) {
if (isGroup() || (tag.reading() && tag.isComplex())) {
if (isGroup() || line_below || enabled.isScripted() || (tag.reading() && tag.isComplex())) {
// complex values are groups
REFLECT(name);
REFLECT_N("group_choice", default_name);
REFLECT(choices);
REFLECT(line_below);
REFLECT(enabled);
} else {
REFLECT_NAMELESS(name);
}
@@ -237,6 +241,9 @@ IMPLEMENT_REFLECTION_ENUM(ChoiceRenderStyle) {
VALUE_N("checklist", RENDER_TEXT_CHECKLIST);
VALUE_N("image checklist", RENDER_IMAGE_CHECKLIST);
VALUE_N("both checklist", RENDER_BOTH_CHECKLIST);
VALUE_N("text list", RENDER_IMAGE_LIST);
VALUE_N("image list", RENDER_IMAGE_LIST);
VALUE_N("both list", RENDER_IMAGE_LIST);
}
IMPLEMENT_REFLECTION(ChoiceStyle) {