Exemplo n.º 1
0
 public Label(Menu.ScreenState screenState)
     : base(2,
         screenState.Height / 20,
         screenState.Width - 10,
         screenState.Height / 12 - 6)
 {
 }
Exemplo n.º 2
0
        public Main(SevenBattleState battleState, EnemySkillMateria esm, Menu.ScreenState screenState)
            : base(5,
                screenState.Height * 7 / 10 + 20,
                screenState.Width * 3 / 4,
                (screenState.Height * 5 / 20) - 25)
        {
            BattleState = battleState;

            int enemySkillCount = battleState.Seven.Data.EnemySkillCount;

            _totalRows = (enemySkillCount / COLUMNS) + ((enemySkillCount % COLUMNS == 0) ? 0 : 1);

            _spells = new Spell[_totalRows, COLUMNS];

            for (int i = 0; i < enemySkillCount; i++)
            {
                if (((esm.AP >> i) & 1) > 0)
                {
                    Spell s = battleState.Seven.Data.GetEnemySkill(esm.Abilities.ElementAt(i));

                    _spells[s.Order / COLUMNS, s.Order % COLUMNS] = s;
                }
            }

            Reset();
        }
Exemplo n.º 3
0
 public Label(Menu.ScreenState screenState)
     : base(screenState.Width * 3 / 4,
         screenState.Height / 20,
         screenState.Width / 4 - 10,
         screenState.Height / 15)
 {
 }
Exemplo n.º 4
0
        public Main(Ally ally, IEnumerable<MagicMenuEntry> spells, Menu.ScreenState screenState)
            : base(5,
                screenState.Height * 7 / 10 + 20,
                screenState.Width * 3 / 4,
                (screenState.Height * 5 / 20) - 25)
        {
            AssociatedAlly = ally;

            int magicSpellCount = AssociatedAlly.CurrentBattle.Seven.Data.MagicSpellCount;

            _totalRows = (magicSpellCount / COLUMNS) + ((magicSpellCount % COLUMNS == 0) ? 0 : 1);

            _spells = new MagicMenuEntry[_totalRows, COLUMNS];

            foreach (MagicMenuEntry s in spells)
            {
                if (s.Spell.Name == "Toad") HasToad = true;

                _spells[s.Spell.Order / COLUMNS, s.Spell.Order % COLUMNS] = s;
            }

            Squish();

            Reset();
        }
Exemplo n.º 5
0
 public Location(Menu.ScreenState screenState)
     : base(screenState.Width / 2,
         screenState.Height * 17 / 20 + 6,
         screenState.Width / 2 - 10,
         screenState.Height / 10)
 {
 }
Exemplo n.º 6
0
 public Top(Menu.ScreenState screenState)
     : base(2,
         screenState.Height / 20,
         screenState.Width - 10,
         screenState.Height / 15)
 {
 }
Exemplo n.º 7
0
 public Label(SevenMenuState menuState, Menu.ScreenState screenState)
     : base(screenState.Width * 3 / 4,
         screenState.Height / 20,
         screenState.Width / 4 - 10,
         screenState.Height / 15)
 {
     MenuState = menuState;
 }
Exemplo n.º 8
0
 public Stats(SevenMenuState menuState, Menu.ScreenState screenState)
     : base(2,
         screenState.Height * 7 / 60,
         screenState.Width / 2 - 6,
         screenState.Height * 5 / 6)
 {
     MenuState = menuState;
 }
Exemplo n.º 9
0
 public Info(SevenMenuState menuState, Menu.ScreenState screenState)
     : base(screenState.Width / 2,
         screenState.Height * 7 / 60,
         screenState.Width / 2 - 9,
         screenState.Height / 4)
 {
     PhsList = menuState.PhsList;
 }
Exemplo n.º 10
0
 public List(SevenMenuState menuState, Menu.ScreenState screenState)
     : base(screenState.Width / 2,
         screenState.Height * 22 / 60,
         screenState.Width / 2 - 9,
         screenState.Height * 7 / 12)
 {
     _characters = new Character[3, 3];
     MenuState = menuState;
 }
Exemplo n.º 11
0
 public Time(SevenMenuState menuState, Menu.ScreenState screenState)
     : base(screenState.Width * 3 / 4 - 10,
         screenState.Height * 7 / 10,
         screenState.Width / 4,
         screenState.Height * 3 / 20)
 {
     x2 = screenState.Width / 4 - 10;
     GameClock = menuState.Party.Clock;
     Gil = menuState.Party.Gil.ToString();
 }
Exemplo n.º 12
0
 public WMagic(Ally ally, IEnumerable<MagicMenuEntry> spells, Menu.ScreenState screenState)
     : base(ally, spells, screenState)
 {
 }
Exemplo n.º 13
0
 public WSummon(SevenBattleState battleState, IEnumerable<SummonMenuEntry> spells, Menu.ScreenState screenState)
     : base(battleState, spells, screenState)
 {
 }
Exemplo n.º 14
0
 public ChangeMenu(BattleMenu owner, Menu.ScreenState screenState)
     : base(screenState.Width * 3 / 16,
         screenState.Height * 7 / 10 + 10,
         screenState.Width / 5,
         (screenState.Height / 10) - 7)
 {
     Owner = owner;
     YOrig = Y;
 }
Exemplo n.º 15
0
        public BattleMenu(Ally a, Menu.ScreenState screenState)
            : base(screenState.Width / 4,
                screenState.Height * 7 / 10 + 10,
                screenState.Width / 5,
                screenState.Height * 5 / 20 - 6)
        {
            AssociatedAlly = a;

            xs = screenState.Width / 5;

            Visible = false;

            ChangeMenuInstance = new ChangeMenu(this, screenState);

            // Always an option

            #region Item Menu

            foreach (MateriaOrb m in a.Materia)
            {
                if (m != null && m.Name == "W-Item")
                {
                    _witem = true;
                }
            }

            #endregion Item Menu

            // iterate through options
            int o = 0;

            #region Attack

            foreach (MateriaOrb m in a.Materia)
            {
                if (m != null)
                {
                    if (m.Name == "Double Cut")
                    {
                        if (m.Level == 0)
                        {
                            _doubleCutOption2 = o;
                            _doubleCutOption4 = -1;
                        }
                        else
                        {
                            _doubleCutOption4 = o;
                            _doubleCutOption2 = -1;
                        }
                        _slashAllOption = -1;
                        _flashOption = -1;
                    }
                    else if (m.Name == "Slash-All")
                    {
                        if (m.Level == 0)
                        {
                            _slashAllOption = o;
                            _flashOption = -1;
                        }
                        else
                        {
                            _flashOption = o;
                            _slashAllOption = -1;
                        }
                        _doubleCutOption2 = -1;
                        _doubleCutOption4 = -1;
                    }
                }
            }
            if (_doubleCutOption2 == -1 && _doubleCutOption4 == -1 &&
                _slashAllOption == -1 && _flashOption == -1)
            {
                _attackOption = o;
            }
            o++;

            #endregion Attack

            // put this after every one in order to skip the Item option
            if (o == 3)
            {
                o++;
            }

            #region Magic Menu
            int c = 0;
            foreach (MagicMenuEntry s in a.MagicSpells)
            {
                c++;
            }
            if (c > 0)
            {
                _magicMenuOption = o;
                o++;
                foreach (MateriaOrb m in a.Materia)
                {
                    if (m != null && m.Name == "W-Magic")
                    {
                        _wmagic = true;
                    }
                }
            }

            #endregion Magic Menu

            // put this after every one in order to skip the Item option
            if (o == 3)
            {
                o++;
            }

            #region Summon Menu
            c = 0;

            foreach (SummonMenuEntry s in a.Summons)
            {
                c++;
            }

            if (c > 0)
            {
                _summonMenuOption = o;
                o++;
                foreach (MateriaOrb m in a.Materia)
                {
                    if (m != null && m.Name == "W-Summon")
                    {
                        _wsummon = true;
                    }
                }
            }
            #endregion Summon Menu

            // put this after every one in order to skip the Item option
            if (o == 3)
            {
                o++;
            }

            #region Sense

            foreach (MateriaOrb m in a.Materia)
            {
                if (m != null && m.Name == "Sense")
                {
                    _senseOption = o;
                    o++;
                }
            }

            #endregion

            // put this after every one in order to skip the Item option
            if (o == 3)
            {
                o++;
            }

            #region Enemy Skill

            foreach (MateriaOrb m in a.Materia)
            {
                if (m != null && m.Name == "Enemy Skill")
                {
                    if (_enemySkillMenuOption < 0)
                    {
                        _enemySkillMenuOption = o;
                        o++;
                    }
                }
            }
            #endregion

            // put this after every one in order to skip the Item option
            if (o == 3)
            {
                o++;
            }

            #region Mime

            foreach (MateriaOrb m in a.Materia)
            {
                if (m != null && m.Name == "Mime")
                {
                    _mimeOption = o;
                    o++;
                    break;
                }
            }

            #endregion

            // put this after every one in order to skip the Item option
            if (o == 3)
            {
                o++;
            }

            #region Deathblow

            foreach (MateriaOrb m in a.Materia)
            {
                if (m != null && m.Name == "Deathblow")
                {
                    _deathblowOption = o;
                    o++;
                    break;
                }
            }
            #endregion

            // put this after every one in order to skip the Item option
            if (o == 3)
            {
                o++;
            }

            #region Steal

            foreach (MateriaOrb m in a.Materia)
            {
                if (m != null && m.Name == "Steal")
                {
                    if (m.Level == 0)
                    {
                        _stealOption = o;
                        _mugOption = -1;
                    }
                    else
                    {
                        _mugOption = o;
                        _stealOption = -1;
                    }
                }
            }
            if (_mugOption != -1 || _stealOption != -1)
            {
                o++;
            }

            #endregion

            // put this after every one in order to skip the Item option
            if (o == 3)
            {
                o++;
            }

            _columns = (o - 1) / _rows + 1;
            if (_columns != 1)
            {
                Width = W * _columns;
            }
        }