Beispiel #1
0
        protected override void Init()
        {
            Size = new Vector2 {
                X = 840, Y = 630
            };
            base.Init();
            var actions = new Action[]
            {
                () => Data.TryAdd(SectionName.Help, new IGMDataItem.HelpBox {
                    Pos = new Rectangle(15, 69, 810, 78), Title = Icons.ID.HELP, Options = Box_Options.Middle
                }),
                () => {
                    var keys = new FF8String[] {
                        Strings.Name.Use, //todo add to Strings.Name
                        Strings.Name.Rearrange,
                        Strings.Name.Sort,
                        Strings.Name.Battle
                    };
                    var values = new FF8String[] {
                        Strings.Description.Use, //todo add to Strings.Description
                        Strings.Description.Rearrange,
                        Strings.Description.Sort,
                        Strings.Description.Battle
                    };
                    if (keys.Distinct().Count() == keys.Length && keys.Length == values.Length)
                    {
                        Data.TryAdd(SectionName.TopMenu, TopMenu.Create((from i in Enumerable.Range(0, keys.Length) select i).ToDictionary(x => keys[x], x => values[x])));
                    }
                    else
                    {
                        Data.TryAdd(SectionName.TopMenu, null);
                    }
                },
                () => Data.TryAdd(SectionName.Title, new IGMDataItem.Box {
                    Data = Memory.Strings.Read(Strings.FileID.MenuGroup, 0, 2), Pos = new Rectangle(615, 0, 225, 66)
                }),
                () => Data.TryAdd(SectionName.UseItemGroup, IGMData.Group.Base.Create(Statuses.Create(), IGMData.Pool.Item.Create(), TargetPool.Create()))
            };

            Memory.ProcessActions(actions);
            ChoiceChangeHandler         = help.TextChangeEvent;
            ItemPool.ItemChangeHandler += help.TextChangeEvent;
            ModeChangeHandler          += help.ModeChangeEvent;
            Func <bool> TopMenuInputs = null;

            if (Data[SectionName.TopMenu] != null)
            {
                TopMenuInputs = Data[SectionName.TopMenu].Inputs;
            }
            InputsDict = new Dictionary <Mode, Func <bool> >()
            {
                { Mode.TopMenu, TopMenuInputs },
                { Mode.SelectItem, UseItemGroup.ITEM[1, 0].Inputs },
                { Mode.UseItemOnTarget, UseItemGroup.ITEM[2, 0].Inputs }
            };
            SetMode(Mode.SelectItem);
        }
Beispiel #2
0
        protected override void Init()
        {
            SetMode((Mode)0);
            Size = new Vector2 {
                X = 840, Y = 630
            };

            var tmp     = new Menu_Base[9];
            var actions = new Action[]
            {
                () => tmp[0] = IgmDataMagStatSlots.Create(),
                () => tmp[1] = IGMData_Mag_PageTitle.Create(),
                () => tmp[3] = IGMData_Mag_EL_A_D_Slots.Create(),
                () => tmp[2] = IGMData.Pool.Magic.Create(),
                () => tmp[4] = IGMData_Mag_EL_A_Values.Create(),
                () => tmp[5] = IGMData_Mag_EL_D_Values.Create(),
                () => tmp[6] = IGMData_Mag_ST_A_D_Slots.Create(),
                () => tmp[7] = IGMData_Mag_ST_A_Values.Create(),
                () => tmp[8] = IGMData_Mag_ST_D_Values.Create(),
                () => Data.TryAdd(SectionName.CharacterInfo, IGMData_CharacterInfo.Create()),
                () => Data.TryAdd(SectionName.Commands, IGMData.Commands.Create(new Rectangle(615, 150, 210, 192))),
                () => Data.TryAdd(SectionName.Help, new IGMDataItem.HelpBox {
                    Data = Strings.Description.Junction, Pos = new Rectangle(15, 69, 810, 78), Title = Icons.ID.HELP
                }),
                () => Data.TryAdd(SectionName.TopMenu, TopMenu.Create()),
                () => Data.TryAdd(SectionName.Title, new IGMDataItem.Box {
                    Data = Strings.Name.Junction, Pos = new Rectangle(615, 0, 225, 66)
                }),
                () => Data.TryAdd(SectionName.TopMenu_Junction, IGMData_TopMenu_Junction.Create()),
                () => Data.TryAdd(SectionName.TopMenu_Off, IGMData.Group.TopMenu.Create(
                                      new IGMDataItem.Box {
                    Data = Strings.Name.Off, Pos = new Rectangle(0, 12, 169, 54), Options = Box_Options.Center | Box_Options.Middle
                },
                                      IGMData_TopMenu_Off.Create()
                                      )),
                () => Data.TryAdd(SectionName.TopMenu_Auto, IGMData.Group.TopMenu.Create(
                                      new IGMDataItem.Box {
                    Data = Strings.Name.Auto, Pos = new Rectangle(0, 12, 169, 54), Options = Box_Options.Center | Box_Options.Middle
                },
                                      IGMData_TopMenu_Auto.Create())),
                () => Data.TryAdd(SectionName.TopMenu_Abilities, IGMData_Abilities_Group.Create(
                                      IGMData.Slots.Command.Create(),
                                      IGMData.Slots.Abilities.Create(),
                                      IGMData_Abilities_CommandPool.Create(),
                                      IGMData_Abilities_AbilityPool.Create())),
                () => Data.TryAdd(SectionName.TopMenu_GF_Group, IGMData_GF_Group.Create(
                                      IGMData_GF_Junctioned.Create(),
                                      IGMData.Pool.GF.Create(),
                                      new IGMDataItem.Box {
                    Pos = new Rectangle(440, 345, 385, 66)
                }
                                      )),
                () => Data.TryAdd(SectionName.RemMag, IGMData_ConfirmRemMag.Create(data: Memory.Strings.Read(Strings.FileID.MenuGroup, 2, 280), title: Icons.ID.NOTICE, opt1: Strings.Name.Yes, opt2: Strings.Name.No, pos: new Rectangle(180, 174, 477, 216))),
                () => Data.TryAdd(SectionName.RemAll, IGMData_ConfirmRemAll.Create(data: Memory.Strings.Read(Strings.FileID.MenuGroup, 2, 279), title: Icons.ID.NOTICE, opt1: Strings.Name.Yes, opt2: Strings.Name.No, pos: new Rectangle(170, 174, 583, 216))),
                () => Data.TryAdd(SectionName.ConfirmChanges, IGMData_ConfirmChanges.Create(data: Memory.Strings.Read(Strings.FileID.MenuGroup, 0, 73), title: Icons.ID.NOTICE, opt1: Strings.Name.Yes, opt2: Memory.Strings.Read(Strings.FileID.MenuGroup, 2, 268), pos: new Rectangle(280, 174, 367, 216))),
            };

            Memory.ProcessActions(actions);

            Data.TryAdd(SectionName.Mag_Group, IGMData_Mag_Group.Create(tmp));
            base.Init();
        }