mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 13:17:00 -04:00
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:
@@ -25,6 +25,7 @@ class MultipleChoiceField : public ChoiceField {
|
||||
DECLARE_FIELD_TYPE(MultipleChoiceField);
|
||||
|
||||
UInt minimum_selection, maximum_selection; ///< How many choices can be selected simultaniously?
|
||||
String empty_choice; ///< Name to use when nothing is selected
|
||||
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
@@ -56,7 +57,7 @@ class MultipleChoiceValue : public ChoiceValue {
|
||||
inline MultipleChoiceValue(const MultipleChoiceFieldP& field) : ChoiceValue(field, true) {}
|
||||
DECLARE_HAS_FIELD(MultipleChoice);
|
||||
|
||||
// no extra data
|
||||
String last_choice; ///< Which of the choices was selected/deselected last?
|
||||
|
||||
/// Splits the value, stores the selected choices in the out parameter
|
||||
void get(vector<String>& out) const;
|
||||
@@ -65,6 +66,10 @@ class MultipleChoiceValue : public ChoiceValue {
|
||||
DECLARE_REFLECTION();
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : Utilities
|
||||
|
||||
/// Is the given choice selected in the value?
|
||||
bool chosen(const String& multiple_choice_value, const String& chioce);
|
||||
|
||||
// ----------------------------------------------------------------------------- : EOF
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user