Пример #1
0
            protected override void Init()
            {
                Size = new Vector2 {
                    X = 843, Y = 630
                };
                TextScale = new Vector2(2.545455f, 3.0375f);
                IGMData Header    = new IGMData_Header();
                IGMData Footer    = new IGMData_Footer();
                IGMData Clock     = new IGMData_Clock();
                IGMData SideMenu  = new IGMData_SideMenu();
                IGMData Non_Party = new IGMData_NonParty();
                IGMData Party     = new IGMData_Party();

                Data.Add(SectionName.Header, Header);
                Data.Add(SectionName.Footer, Footer);
                Data.Add(SectionName.Clock, Clock);
                Data.Add(SectionName.SideMenu, SideMenu);
                Data.Add(SectionName.Party, Party);
                Data.Add(SectionName.Non_Party, Non_Party);
                base.Init();
            }
Пример #2
0
        protected override void Init()
        {
            Size = new Vector2 {
                X = 843, Y = 630
            };
            base.Init();

            Action[] actions = new Action[]
            {
                () => Data.TryAdd(SectionName.Header, IGMData_Header.Create()),
                () => Data.TryAdd(SectionName.Footer, IGMData_Footer.Create()),
                () => Data.TryAdd(SectionName.Clock, IGMData_Clock.Create()),
                () => Data.TryAdd(SectionName.PartyGroup, IGMData_PartyGroup.Create(IGMData_Party.Create(), IGMData_NonParty.Create())),
                () => {
                    FF8String[] keys = new FF8String[] {
                        Strings.Name.SideMenu.Junction,
                        Strings.Name.SideMenu.Item,
                        Strings.Name.SideMenu.Magic,
                        Strings.Name.SideMenu.GF,
                        Strings.Name.SideMenu.Status,
                        Strings.Name.SideMenu.Ability,
                        Strings.Name.SideMenu.Switch,
                        Strings.Name.SideMenu.Card,
                        Strings.Name.SideMenu.Config,
                        Strings.Name.SideMenu.Tutorial,
                        Strings.Name.SideMenu.Save,
                        Strings.Name.SideMenu.Battle
                    };

                    FF8String[] values = new FF8String[] {
                        Strings.Description.SideMenu.Junction,
                        Strings.Description.SideMenu.Item,
                        Strings.Description.SideMenu.Magic,
                        Strings.Description.SideMenu.GF,
                        Strings.Description.SideMenu.Status,
                        Strings.Description.SideMenu.Ability,
                        Strings.Description.SideMenu.Switch,
                        Strings.Description.SideMenu.Card,
                        Strings.Description.SideMenu.Config,
                        Strings.Description.SideMenu.Tutorial,
                        Strings.Description.SideMenu.Save,
                        Strings.Description.SideMenu.Battle
                    };

                    if (keys.Distinct().Count() == keys.Length && values.Length == keys.Length)
                    {
                        Data.TryAdd(SectionName.SideMenu, IGMData_SideMenu.Create((from i in Enumerable.Range(0, keys.Length)
                                                                                   select i).ToDictionary(x => keys[x], x => values[x])));
                    }
                    else
                    {
                        Data.TryAdd(SectionName.SideMenu, null);
                    }
                }
            };
            Memory.ProcessActions(actions);
            Func <bool> SideMenuInputs = null;

            if (Data[SectionName.SideMenu] != null)
            {
                SideMenuInputs = Data[SectionName.SideMenu].Inputs;
            }
            InputDict = new Dictionary <Mode, Func <bool> >
            {
                { Mode.ChooseItem, SideMenuInputs },
                { Mode.ChooseChar, Data[SectionName.PartyGroup].Inputs },
            };
            SetMode((Mode)0);
        }