Multiple choice choices can be drawn as radio buttons instead of check boxes

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@463 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-07-02 13:37:55 +00:00
parent 8bd97a6894
commit 81983407d3
5 changed files with 46 additions and 3 deletions
+7
View File
@@ -46,6 +46,12 @@ class ChoiceField : public Field {
DECLARE_REFLECTION();
};
enum ChoiceChoiceType {
CHOICE_TYPE_CHECK,
CHOICE_TYPE_RADIO
};
/// An item that can be chosen for this field
class ChoiceField::Choice : public IntrusivePtrBase<ChoiceField::Choice> {
public:
@@ -57,6 +63,7 @@ class ChoiceField::Choice : public IntrusivePtrBase<ChoiceField::Choice> {
vector<ChoiceP> choices; ///< Choices and sub groups in this group
bool line_below; ///< Show a line after this item?
Scriptable<bool> enabled; ///< Is this item enabled?
ChoiceChoiceType type; ///< How should this item be shown, only for multiple choice fields
/// First item-id in this group (can be the default item)
/** Item-ids are consecutive integers, a group uses all ids [first_id..lastId()).
* The top level group has first_id 0.