public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
            {
                DataListViewCell cell = (DataListViewCell)tableView.DequeueReusableCell("AvailableViewDataSourceCell");

                if (cell == null)
                {
                    cell = new DataListViewCell(UITableViewCellStyle.Default, "AvailableViewDataSourceCell");
                }

                SkillValue v = state._CurrentSkills[indexPath.Row];


                cell.TextLabel.Text = v.FullName;
                cell.TextLabel.Font = UIFont.SystemFontOfSize(16f);
                cell.Data           = v;

                GradientButton b   = new GradientButton();
                var            man = new ButtonPropertyManager(b, state.DialogParent, v, "Mod");

                man.FormatDelegate = a => ((int)a).PlusFormat();
                state._SkillModManagers[indexPath.Row] = man;
                b.SetSize(65, 22);
                cell.AccessoryView = b;


                return(cell);
            }
Esempio n. 2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            // Perform any additional setup after loading the view, typically from a nib.
            BackgroundView.BackgroundColor = UIColor.Clear;
            BackgroundView.BorderColor     = UIExtensions.RGBColor(0xFFFFFF);
            BackgroundView.Border          = 2.0f;
            BackgroundView.Gradient        = new GradientHelper(CMUIColors.SecondaryColorADark);


            ButtonPropertyManager m;

            m = new ButtonPropertyManager(NameButton, MainUI.MainView, _feat, "Name")
            {
                Title = "Name", Multiline = false
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(PrerequisitesButton, MainUI.MainView, _feat, "Prerequistites")
            {
                Title = "Prerequisites", Multiline = false
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(BenefitButton, MainUI.MainView, _feat, "Benefit")
            {
                Multiline = true
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(NormalButton, MainUI.MainView, _feat, "Normal")
            {
                Multiline = true
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(SpecialButton, MainUI.MainView, _feat, "Special")
            {
                Multiline = true
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(TypesButton, MainUI.MainView, _feat, "Type")
            {
                StringList = true
            };
            _Managers.Add(m);
            List <KeyValuePair <object, string> > types = new List <KeyValuePair <object, string> >();

            foreach (String s in Feat.FeatTypes)
            {
                types.Add(new KeyValuePair <object, string>(s, s));
            }
            m.ValueList = types;


            foreach (GradientButton b in from x in _Managers select x.Button)
            {
                CMStyles.TextFieldStyle(b, 15f);
            }
        }
        public SpecialAbilityView(Monster monster, SpecialAbility ability)
        {
            _Monster = monster;
            _Ability = ability;


            BackgroundColor = UIColor.Clear;
            BorderColor     = 0xFFFFFFFF.UIColor();
            Border          = 2.0f;
            Gradient        = new GradientHelper(CMUIColors.PrimaryColorDark);


            _DeleteButton = new UIButton();
            _DeleteImage  = UIImage.FromFile("Images/External/redx.png");
            _DeleteButton.SetImage(_DeleteImage, UIControlState.Normal);
            _DeleteButton.TouchUpInside += delegate
            {
                _Monster.SpecialAbilitiesList.Remove(_Ability);
            };

            _SpecialTextButton = new GradientButton();
            _SpecialTextButton.SetTitleColor(0x00000000.UIColor(), UIControlState.Normal);
            _SpecialTextManager = new ButtonPropertyManager(_SpecialTextButton, MainUI.MainView, _Ability, "Text")
            {
                Multiline = true
            };
            _Manager.Add(_SpecialTextManager);

            _NameButton = new GradientButton();
            CMStyles.TextFieldStyle(_NameButton);
            _Manager.Add(new ButtonPropertyManager(_NameButton, MainUI.MainView, _Ability, "Name"));

            _TypeButton = new GradientButton();
            ButtonPropertyManager typeMan = new ButtonPropertyManager(_TypeButton, MainUI.MainView, _Ability, "Type");

            typeMan.ValueList = new List <KeyValuePair <object, string> > {
                new KeyValuePair <object, string>("Ex", "Ex"),
                new KeyValuePair <object, string>("Sp", "Sp"),
                new KeyValuePair <object, string>("Su", "Su"),
                new KeyValuePair <object, string>("", "-"),
            };
            _Manager.Add(typeMan);

            Add(_DeleteButton);
            Add(_NameButton);
            Add(_TypeButton);
            Add(_SpecialTextButton);

            LayoutSubviews();
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            StyleBackground(BackgroundView);
            StyleHeader(HeaderView, HeaderLabel);
            HeaderText = "Natural Attack";
            StyleButton(PlusButton);
            StyleButton(CountButton);
            StyleButton(DamageButton);
            StyleButton(AttackButton);
            StyleButton(OKButton);
            StyleButton(CancelButton);

            _PlusManager  = new ButtonPropertyManager(PlusButton, MainUI.MainView, _WeaponItem, "Plus");
            _CountManager = new ButtonPropertyManager(CountButton, MainUI.MainView, _WeaponItem, "Count");
            var countList = new List <KeyValuePair <object, string> >();

            for (int i = 1; i < 20; i++)
            {
                countList.Add(new KeyValuePair <object, string>(i, i.ToString()));
            }
            _CountManager.ValueList         = countList;
            _DamagePopover                  = new ButtonStringPopover(DamageButton);
            _DamagePopover.WillShowPopover += HandleWillShowDamagePopover;
            _DamagePopover.ItemClicked     += HandleDamageItemClicked;

            _AttackPopover = new ButtonStringPopover(AttackButton);
            _AttackPopover.WillShowPopover += HandleWillShowAttackPopover;
            _AttackPopover.ItemClicked     += HandleAttackItemClicked;

            _Managers.Add(_PlusManager);
            _Managers.Add(_CountManager);

            UpdateWeaponDamageText();
        }
        private void SetupManagers()
        {
            _HPManager     = new ButtonPropertyManager(HPButton, DialogParent, CurrentMonster, "HP");
            _HDManager     = new ButtonPropertyManager(HDButton, DialogParent, CurrentMonster.Adjuster, "HD");
            _HPModsManager = new ButtonPropertyManager(HPModsButton, DialogParent, CurrentMonster, "HP_Mods")
            {
                Title = "HP Mods"
            };


            _ACManager               = new ButtonPropertyManager(ACButton, DialogParent, CurrentMonster, "FullAC");
            _ACManager.Title         = "AC";
            _TouchManager            = new ButtonPropertyManager(TouchButton, DialogParent, CurrentMonster, "TouchAC");
            _TouchManager.Title      = "Touch AC";
            _FlatFootedManager       = new ButtonPropertyManager(FlatFootedButton, DialogParent, CurrentMonster, "FlatFootedAC");
            _FlatFootedManager.Title = "Flat Footed AC";

            _ArmorManager         = new ButtonPropertyManager(ArmorButton, DialogParent, CurrentMonster.Adjuster, "Armor");
            _DodgeManager         = new ButtonPropertyManager(DodgeButon, DialogParent, CurrentMonster.Adjuster, "Dodge");
            _NaturalManager       = new ButtonPropertyManager(NaturalButton, DialogParent, CurrentMonster.Adjuster, "NaturalArmor");
            _NaturalManager.Title = "Natural Armor";
            _DeflectionManager    = new ButtonPropertyManager(DeflectionButton, DialogParent, CurrentMonster.Adjuster, "Deflection");
            _ShieldManager        = new ButtonPropertyManager(ShieldButton, DialogParent, CurrentMonster.Adjuster, "Shield");

            _FortManager = new ButtonPropertyManager(FortButton, DialogParent, CurrentMonster, "Fort");
            _RefManager  = new ButtonPropertyManager(RefButton, DialogParent, CurrentMonster, "Ref");
            _WillManager = new ButtonPropertyManager(WillButton, DialogParent, CurrentMonster, "Will");

            _DefensiveAbilitiesManager = new ButtonPropertyManager(DefensiveAbilitiesButton, DialogParent, CurrentMonster, "DefensiveAbilities")
            {
                Title = "Defensive Abilities"
            };
            _DRManager       = new ButtonPropertyManager(DRButton, DialogParent, CurrentMonster, "DR");
            _ImmuneManager   = new ButtonPropertyManager(ImmuneButton, DialogParent, CurrentMonster, "Immune");
            _SRManager       = new ButtonPropertyManager(SRButton, DialogParent, CurrentMonster, "SR");
            _ResistManager   = new ButtonPropertyManager(ResistButton, DialogParent, CurrentMonster, "Resist");
            _WeaknessManager = new ButtonPropertyManager(WeaknessButton, DialogParent, CurrentMonster, "Weaknesses");

            PropertyManagers.Add(_HPManager);
            PropertyManagers.Add(_HDManager);
            PropertyManagers.Add(_HPModsManager);

            PropertyManagers.Add(_ACManager);
            PropertyManagers.Add(_TouchManager);
            PropertyManagers.Add(_FlatFootedManager);

            PropertyManagers.Add(_ArmorManager);
            PropertyManagers.Add(_DodgeManager);
            PropertyManagers.Add(_NaturalManager);
            PropertyManagers.Add(_DeflectionManager);
            PropertyManagers.Add(_ShieldManager);

            PropertyManagers.Add(_FortManager);
            PropertyManagers.Add(_RefManager);
            PropertyManagers.Add(_WillManager);

            PropertyManagers.Add(_DefensiveAbilitiesManager);
            PropertyManagers.Add(_DRManager);
            PropertyManagers.Add(_ImmuneManager);
            PropertyManagers.Add(_SRManager);
            PropertyManagers.Add(_ResistManager);
            PropertyManagers.Add(_WeaknessManager);

            foreach (ButtonPropertyManager m in PropertyManagers)
            {
                GradientButton b = (GradientButton)m.Button;
                CMStyles.TextFieldStyle(b);
            }
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            // Perform any additional setup after loading the view, typically from a nib.
            BackgroundView.BackgroundColor = UIColor.Clear;
            BackgroundView.BorderColor     = UIExtensions.RGBColor(0xFFFFFF);
            BackgroundView.Border          = 2.0f;
            BackgroundView.Gradient        = new GradientHelper(CMUIColors.SecondaryColorADark);


            ButtonPropertyManager m;

            m = new ButtonPropertyManager(NameButton, MainUI.MainView, _spell, "Name")
            {
                Title = "Name", Multiline = false
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(SchoolButton, MainUI.MainView, _spell, "school")
            {
                Title = "School", Multiline = false
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(SubschoolButton, MainUI.MainView, _spell, "subschool")
            {
                Title = "Subschool", Multiline = false
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(DescriptorButton, MainUI.MainView, _spell, "descriptor")
            {
                Title = "Descriptor", Multiline = false
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(CastingTimeButton, MainUI.MainView, _spell, "casting_time")
            {
                Title = "Casting Time", Multiline = false
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(RangeButton, MainUI.MainView, _spell, "range")
            {
                Title = "Range", Multiline = false
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(AreaButton, MainUI.MainView, _spell, "area")
            {
                Title = "Area", Multiline = false
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(TargetsButton, MainUI.MainView, _spell, "targets")
            {
                Title = "Targets", Multiline = false
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(DurationButton, MainUI.MainView, _spell.Adjuster, "Duration")
            {
                Title = "Duration", Multiline = false
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(DismissableButton, MainUI.MainView, _spell.Adjuster, "Dismissible")
            {
                Title = "Dismissible", Multiline = false
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(SavingThrowButton, MainUI.MainView, _spell, "saving_throw")
            {
                Title = "Saving Throw", Multiline = false
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(SpellResistanceButton, MainUI.MainView, _spell, "spell_resistence")
            {
                Title = "Spell Resistance", Multiline = false
            };
            _Managers.Add(m);

            m = new ButtonPropertyManager(VerbalButton, MainUI.MainView, _spell.Adjuster, "Verbal")
            {
                Title = "Verbal", Multiline = false
            };
            _Managers.Add(m);

            m = new ButtonPropertyManager(SomaticButton, MainUI.MainView, _spell.Adjuster, "Somatic")
            {
                Title = "Somatic", Multiline = false
            };
            _Managers.Add(m);

            m = new ButtonPropertyManager(MaterialButton, MainUI.MainView, _spell.Adjuster, "Material")
            {
                Title = "Material", Multiline = false
            };
            _Managers.Add(m);

            m = new ButtonPropertyManager(MaterialTextButton, MainUI.MainView, _spell.Adjuster, "MaterialText")
            {
                Title = "Material Text", Multiline = false
            };
            _Managers.Add(m);

            m = new ButtonPropertyManager(FocusButton, MainUI.MainView, _spell.Adjuster, "Focus")
            {
                Title = "Focus", Multiline = false
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(DivineFocusButton, MainUI.MainView, _spell.Adjuster, "DivineFocus")
            {
                Title = "Divine Focus", Multiline = false
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(FocusTextButton, MainUI.MainView, _spell.Adjuster, "FocusText")
            {
                Title = "FocusText", Multiline = false
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(DescriptionButton, MainUI.MainView, _spell, "description")
            {
                Title = "Description", Multiline = true
            };
            _Managers.Add(m);

            foreach (ButtonPropertyManager bpm in _Managers)
            {
                bpm.Button.BackgroundColor = UIColor.Clear;
            }
            LevelsButton.TouchUpInside += (object sender, EventArgs e) =>
            {
                SpellLevelsDialog dlg = new SpellLevelsDialog(_spell);
                dlg.OKClicked += (object se, EventArgs ea) =>
                {
                };
                View.AddSubview(dlg.View);
            };
            LevelsButton.BackgroundColor = UIColor.Clear;
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            StylePanel(this.AbilityArea);
            StylePanel(this.HeaderArea);

            _NameManager = new ButtonPropertyManager(NameButton, DialogParent, CurrentMonster, "Name");
            PropertyManagers.Add(_NameManager);

            _ClassManager = new ButtonPropertyManager(ClassButton, DialogParent, CurrentMonster, "Class");
            PropertyManagers.Add(_ClassManager);
            _SensesManager = new ButtonPropertyManager(SensesButton, DialogParent, CurrentMonster, "Senses");
            PropertyManagers.Add(_SensesManager);
            _RaceManager = new ButtonPropertyManager(RaceButton, DialogParent, CurrentMonster, "Race");
            PropertyManagers.Add(_RaceManager);
            _InitManager = new ButtonPropertyManager(InitButton, DialogParent, CurrentMonster, "Init");
            PropertyManagers.Add(_InitManager);
            _SubtypeManager       = new ButtonPropertyManager(CreatureSubtypeButton, DialogParent, CurrentMonster.Adjuster, "Subtype");
            _SubtypeManager.Title = "Subtype";
            PropertyManagers.Add(_SubtypeManager);


            _StatButtons.Add(Stat.Strength, StrengthButton);
            _StatButtons.Add(Stat.Dexterity, DexterityButton);
            _StatButtons.Add(Stat.Constitution, ConstitutionButton);
            _StatButtons.Add(Stat.Intelligence, IntelligenceButton);
            _StatButtons.Add(Stat.Charisma, CharismaButton);
            _StatButtons.Add(Stat.Wisdom, WisdomButton);

            foreach (KeyValuePair <Stat, UIButton> pair in _StatButtons)
            {
                ButtonPropertyManager m = new ButtonPropertyManager(pair.Value, DialogParent,
                                                                    CurrentMonster.Adjuster, Monster.StatText(pair.Key));
                m.MinIntValue    = 0;
                m.MaxIntValue    = 99;
                m.FormatDelegate = delegate(object num)
                {
                    string numText;
                    if (num == null)
                    {
                        numText = "-";
                    }
                    else
                    {
                        numText = ((int?)num).ToString();
                    }

                    numText += "  ";
                    numText += Monster.AbilityBonus((int?)num).PlusFormat();

                    return(numText);
                };
                _StatManagers[pair.Key] = m;
                PropertyManagers.Add(m);
            }

            _CRManager = new ButtonPropertyManager(CRButton, DialogParent, CurrentMonster.Adjuster, "CR");
            var crList = new List <KeyValuePair <object, string> >();


            crList.Add(new KeyValuePair <object, string>("1/8", "1/8"));
            crList.Add(new KeyValuePair <object, string>("1/6", "1/6"));
            crList.Add(new KeyValuePair <object, string>("1/4", "1/4"));
            crList.Add(new KeyValuePair <object, string>("1/3", "1/3"));
            crList.Add(new KeyValuePair <object, string>("1/2", "1/2"));
            for (int i = 1; i < 31; i++)
            {
                crList.Add(new KeyValuePair <object, string>(i.ToString(), i.ToString()));
            }

            _CRManager.ValueList = crList;
            PropertyManagers.Add(_CRManager);

            _AlignmentManager = new ButtonPropertyManager(AlignmentButton, DialogParent, CurrentMonster, "Alignment");
            PropertyManagers.Add(_AlignmentManager);

            var alignmentList = new List <KeyValuePair <object, string> >();

            for (int i = 0; i < 3; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    string al = Monster.AlignmentText(
                        new Monster.AlignmentType()
                    {
                        Order = (Monster.OrderAxis)i, Moral = (Monster.MoralAxis)j
                    });

                    alignmentList.Add(new KeyValuePair <object, string>(al, al));
                }
            }
            _AlignmentManager.ValueList = alignmentList;


            _CreatureTypeManager = new ButtonPropertyManager(CreatureTypeButton, DialogParent, CurrentMonster, "Type");
            PropertyManagers.Add(_CreatureTypeManager);
            var typeList = new List <KeyValuePair <object, string> >();

            foreach (CreatureType t in Enum.GetValues(typeof(CreatureType)))
            {
                string name = Monster.CreatureTypeNames[(int)t];

                typeList.Add(new KeyValuePair <object, string>(name, name.Capitalize()));
            }
            _CreatureTypeManager.ValueList = typeList;

            _CreatureSizeManager = new ButtonPropertyManager(SizeButton, DialogParent, CurrentMonster.Adjuster, "MonsterSize");
            PropertyManagers.Add(_CreatureSizeManager);
            var sizeList = new List <KeyValuePair <object, string> >();

            foreach (MonsterSize s in Enum.GetValues(typeof(MonsterSize)))
            {
                string name = SizeMods.GetSizeText(s);


                sizeList.Add(new KeyValuePair <object, string>((int)s, name));
            }
            _CreatureSizeManager.FormatDelegate = delegate(object s)
            {
                return(SizeMods.GetSizeText((MonsterSize)s));
            };
            _CreatureSizeManager.ValueList = sizeList;

            foreach (ButtonPropertyManager m in PropertyManagers)
            {
                GradientButton b = m.Button as GradientButton;

                CMStyles.TextFieldStyle(b);
            }
        }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _AreaViews = new List <GradientView>()
            {
                BaseView, ModView, DescriptionView, SkillsView
            };
            foreach (GradientView v in _AreaViews)
            {
                StylePanel(v);
            }



            ButtonPropertyManager pm;

            pm = new ButtonPropertyManager(BaseAtkButton, DialogParent, CurrentMonster, "BaseAtk")
            {
                Title = "Base Attack Bonus"
            };
            _Managers.Add(pm);
            pm = new ButtonPropertyManager(CMBButton, DialogParent, CurrentMonster, "CMB_Numeric")
            {
                Title = "CMD"
            };
            _Managers.Add(pm);
            pm = new ButtonPropertyManager(CMDButton, DialogParent, CurrentMonster, "CMD_Numeric")
            {
                Title = "CMB"
            };
            _Managers.Add(pm);
            pm = new ButtonPropertyManager(RacialModsButton, DialogParent, CurrentMonster, "RacialMods");
            _Managers.Add(pm);
            pm = new ButtonPropertyManager(AuraButton, DialogParent, CurrentMonster, "Aura");
            _Managers.Add(pm);
            pm = new ButtonPropertyManager(SQButton, DialogParent, CurrentMonster, "SQ")
            {
                Multiline = true, Title = "Special Qualities"
            };
            _Managers.Add(pm);
            pm = new ButtonPropertyManager(LanguagesButton, DialogParent, CurrentMonster, "Languages")
            {
                Multiline = true
            };
            _Managers.Add(pm);
            pm = new ButtonPropertyManager(GearButton, DialogParent, CurrentMonster, "Gear")
            {
                Multiline = true
            };
            _Managers.Add(pm);

            CMStyles.TextFieldStyle(SkillDetailButton);
            SkillDetailButton.TouchUpInside += HandleSkillDetailClicked;

            _SkillDetailPopover = new ButtonStringPopover(SkillDetailSelectButton);
            _SkillDetailPopover.WillShowPopover += HandleWillShowDetailPopover;
            _SkillDetailPopover.ItemClicked     += HandleSkillDetailItemClicked;


            SkillDetailSelectButton.SetImage(UIExtensions.GetSmallIcon("prev"), UIControlState.Normal);

            foreach (GradientButton b in from x in _Managers select x.Button)
            {
                CMStyles.TextFieldStyle(b, 15f);
            }

            AvailableSkillsTable.DataSource = new AvailableViewDataSource(this);
            AvailableSkillsTable.Delegate   = new AvailableViewDelegate(this);
            AvailableSkillsTable.RowHeight  = 24;

            KnownSkillsTable.DataSource = new KnownViewDataSource(this);
            KnownSkillsTable.Delegate   = new KnownViewDelegate(this);
            KnownSkillsTable.RowHeight  = 24;

            UpdateSelectableSkills();

            AddSkillButton.TouchUpInside += AddSkillButtonClicked;
        }
Esempio n. 9
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            foreach (GradientView v in new GradientView[] { SpeedView, AttacksView, AbilitiesView })
            {
                StylePanel(v);
            }

            CurrentMonster.Adjuster.PropertyChanged += MonsterAdjusterPropertyChanged;

            ButtonPropertyManager m;

            m = new ButtonPropertyManager(SpeedButton, DialogParent, CurrentMonster.Adjuster, "LandSpeed")
            {
                Title = "Land Speed", MinIntValue = 0
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(ClimbButton, DialogParent, CurrentMonster.Adjuster, "ClimbSpeed")
            {
                Title = "Climb Speed", MinIntValue = 0
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(SpaceButton, DialogParent, CurrentMonster.Adjuster, "Space")
            {
                Title = "Space"
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(FlyButton, DialogParent, CurrentMonster.Adjuster, "FlySpeed")
            {
                Title = "Fly Speed", MinIntValue = 0
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(BurrowButton, DialogParent, CurrentMonster.Adjuster, "BurrowSpeed")
            {
                Title = "Burrow Speed", MinIntValue = 0
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(ReachButton, DialogParent, CurrentMonster.Adjuster, "Reach")
            {
                Title = "Reach"
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(FlyQualityButton, DialogParent, CurrentMonster.Adjuster, "FlyQuality")
            {
                Title = "Fly Quality"
            };

            var list = new List <KeyValuePair <object, string> >();

            for (int i = 0; i < 5; i++)
            {
                list.Add(new KeyValuePair <object, string>(i, Monster.GetFlyQualityString(i).Capitalize()));
            }
            m.ValueList      = list;
            m.FormatDelegate = a =>
            {
                if (CurrentMonster.Adjuster.FlySpeed == null)
                {
                    return("-");
                }
                else
                {
                    return(Monster.GetFlyQualityString((int)a).Capitalize());
                }
            };
            _Managers.Add(m);

            m = new ButtonPropertyManager(SwimButton, DialogParent, CurrentMonster.Adjuster, "SwimSpeed")
            {
                Title = "Swim Speed"
            };
            _Managers.Add(m);


            m = new ButtonPropertyManager(SpecialAttacksButton, DialogParent, CurrentMonster, "SpecialAttacks")
            {
                Title = "Special Attacks", Multiline = true
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(SpellLikeAbilitiesButton, DialogParent, CurrentMonster.Adjuster, "SpellLikeAbilities")
            {
                Title = "Spell-Like Abilities", Multiline = true
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(SpellsKnownButton, DialogParent, CurrentMonster.Adjuster, "SpellsKnown")
            {
                Title = "Spells Known", Multiline = true
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(SpellsPreparedButton, DialogParent, CurrentMonster.Adjuster, "SpellsPrepared")
            {
                Title = "SpellsPrepared", Multiline = true
            };
            _Managers.Add(m);

            m = new ButtonPropertyManager(MeleeButton, DialogParent, CurrentMonster, "Melee")
            {
                Title = "Melee", Multiline = true
            };
            _Managers.Add(m);
            m = new ButtonPropertyManager(RangedButton, DialogParent, CurrentMonster, "Ranged")
            {
                Title = "Ranged", Multiline = true
            };
            _Managers.Add(m);


            foreach (GradientButton b in from x in _Managers select x.Button)
            {
                CMStyles.TextFieldStyle(b, 15f);
            }

            AttacksEditorButton.TouchUpInside += (sender, e) =>
            {
                _AEDialog            = new AttacksEditorDialog(CurrentMonster);
                _AEDialog.OKClicked += (senderx, e1) =>
                {
                    CharacterAttacks at = _AEDialog.Attacks;
                    CurrentMonster.Melee  = CurrentMonster.MeleeString(at);
                    CurrentMonster.Ranged = CurrentMonster.RangedString(at);
                };
                DialogParent.Add(_AEDialog.View);
            };

            UpdateButtonState();
        }