added multiple choice field

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@35 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-19 17:18:35 +00:00
parent b7908e38af
commit 46a6ed39dc
5 changed files with 137 additions and 6 deletions
+4 -3
View File
@@ -42,6 +42,9 @@ class ChoiceField : public Field {
/// An item that can be chosen for this field
class ChoiceField::Choice {
public:
Choice();
Choice(const String& name);
String name; ///< Name/value of the item
String default_name; ///< A default item, if this is a group and default_name.empty() there is no default
vector<ChoiceP> choices; ///< Choices and sub groups in this group
@@ -50,9 +53,7 @@ class ChoiceField::Choice {
* The top level group has first_id 0.
*/
int first_id;
Choice();
/// Is this a group?
bool isGroup() const;
/// Can this Choice itself be chosen?