public override void Inputs_OKAY() { if (Memory.State.Characters != null) { if (!BLANKS[CURSOR_SELECT]) { skipsnd = true; init_debugger_Audio.PlaySound(31); base.Inputs_OKAY(); SlotConfirmListener?.Invoke(this, (Mode)InGameMenu_Junction.GetMode()); if (InGameMenu_Junction.GetMode().Equals(Mode.Mag_Pool_Stat)) { InGameMenu_Junction.SetMode(Mode.Mag_Stat); } else if (InGameMenu_Junction.GetMode().Equals(Mode.Mag_Pool_EL_A) || InGameMenu_Junction.GetMode().Equals(Mode.Mag_Pool_EL_D)) { InGameMenu_Junction.SetMode(Mode.Mag_EL_A); } else if (InGameMenu_Junction.GetMode().Equals(Mode.Mag_Pool_ST_A) || InGameMenu_Junction.GetMode().Equals(Mode.Mag_Pool_ST_D)) { InGameMenu_Junction.SetMode(Mode.Mag_ST_A); } Cursor_Status &= ~Cursor_Status.Enabled; InGameMenu_Junction.ReInit(); } } }
public override void Inputs_Square() { skipdata = true; base.Inputs_Square(); skipdata = false; if (Contents[CURSOR_SELECT] == Kernel_bin.Stat.None) { Memory.State.Characters[Character].Stat_J[Contents[CURSOR_SELECT]] = 0; InGameMenu_Junction.ReInit(); } }
public override void Inputs_OKAY() { base.Inputs_OKAY(); fade = 0; switch (Choice) { case Items.Junction: State = MainMenuStates.IGM_Junction; InGameMenu_Junction.ReInit(Contents[CURSOR_SELECT].Item1, Contents[CURSOR_SELECT].Item2); return; } }
public override void Inputs_OKAY() { skipsnd = true; init_debugger_Audio.PlaySound(31); base.Inputs_OKAY(); if (Contents[CURSOR_SELECT] != Kernel_bin.Abilities.None && !BLANKS[CURSOR_SELECT]) { int target = InGameMenu_Junction.Data[SectionName.TopMenu_Abilities].CURSOR_SELECT - 4; Memory.State.Characters[Character].Abilities[target] = Contents[CURSOR_SELECT]; InGameMenu_Junction.SetMode(Mode.Abilities); InGameMenu_Junction.ReInit(); // can be more specific if you want to find what is being changed. } }
public override void Inputs_OKAY() { switch (CURSOR_SELECT) { case 0: skipsnd = true; init_debugger_Audio.PlaySound(31); base.Inputs_OKAY(); Memory.State.Characters[Character].RemoveMagic(); Inputs_CANCEL(); InGameMenu_Junction.ReInit(); break; case 1: Inputs_CANCEL(); break; } }
public override void Inputs_OKAY() { skipsnd = true; init_debugger_Audio.PlaySound(31); switch (CURSOR_SELECT) { case 0: Memory.State.Characters[Character].AutoATK(); break; case 1: Memory.State.Characters[Character].AutoDEF(); break; case 2: Memory.State.Characters[Character].AutoMAG(); break; } Inputs_CANCEL(); InGameMenu_Junction.ReInit(); }
public override void Inputs_OKAY() { switch (CURSOR_SELECT) { case 0: skipsnd = true; init_debugger_Audio.PlaySound(31); base.Inputs_OKAY(); Memory.State.Characters[Character].RemoveAll(); InGameMenu_Junction.Data[SectionName.RemAll].Hide(); InGameMenu_Junction.Data[SectionName.TopMenu_Off].Hide(); InGameMenu_Junction.SetMode(Mode.TopMenu); InGameMenu_Junction.Data[SectionName.TopMenu].CURSOR_SELECT = 0; InGameMenu_Junction.ReInit(); break; case 1: Inputs_CANCEL(); break; } }
public override void Inputs_Square() { skipdata = true; base.Inputs_Square(); skipdata = false; IGMDataItem_IGMData i = ((IGMDataItem_IGMData)ITEM[0, 0]); IGMDataItem_IGMData i2 = ((IGMDataItem_IGMData)ITEM[3, 0]); if (i != null && i.Data != null) { if (CURSOR_SELECT < i.Data.Count) { Memory.State.Characters[Character].Commands[CURSOR_SELECT - 1] = Kernel_bin.Abilities.None; InGameMenu_Junction.Data[SectionName.TopMenu_Abilities].ReInit(); InGameMenu_Junction.Data[SectionName.Commands].ReInit(); } else { Memory.State.Characters[Character].Abilities[CURSOR_SELECT - i.Data.Count] = Kernel_bin.Abilities.None; InGameMenu_Junction.ReInit(); } } }
public override void Inputs_OKAY() { skipsnd = true; init_debugger_Audio.PlaySound(31); base.Inputs_OKAY(); GFs select = Contents[CURSOR_SELECT]; Characters c = JunctionedGFs.ContainsKey(select) ? JunctionedGFs[select] : Character; if (c != Characters.Blank) { if (c != Character) { //show error msg } else { //Purge everything that you can't have anymore. Because the GF provided for you. List <Kernel_bin.Abilities> a = (Source.Characters[c]).UnlockedGFAbilities; Source.Characters[c].JunctionnedGFs ^= Saves.ConvertGFEnum.FirstOrDefault(x => x.Value == select).Key; List <Kernel_bin.Abilities> b = (Source.Characters[c]).UnlockedGFAbilities; foreach (Kernel_bin.Abilities r in a.Except(b).Where(v => !Kernel_bin.Junctionabilities.ContainsKey(v))) { if (Kernel_bin.Commandabilities.ContainsKey(r)) { Source.Characters[c].Commands.Remove(r); Source.Characters[c].Commands.Add(Kernel_bin.Abilities.None); } else if (Kernel_bin.EquipableAbilities.ContainsKey(r)) { Source.Characters[c].Abilities.Remove(r); Source.Characters[c].Abilities.Add(Kernel_bin.Abilities.None); } } foreach (Kernel_bin.Abilities r in a.Except(b).Where(v => Kernel_bin.Junctionabilities.ContainsKey(v))) { if (Kernel_bin.Stat2Ability.Any(item => item.Value == r)) { switch (r) { case Kernel_bin.Abilities.ST_Atk_J: Source.Characters[c].Stat_J[Kernel_bin.Stat.ST_Atk] = 0; break; case Kernel_bin.Abilities.EL_Atk_J: Source.Characters[c].Stat_J[Kernel_bin.Stat.EL_Atk] = 0; break; case Kernel_bin.Abilities.EL_Def_Jx1: case Kernel_bin.Abilities.EL_Def_Jx2: case Kernel_bin.Abilities.EL_Def_Jx4: byte count = 0; if (b.Contains(Kernel_bin.Abilities.EL_Def_Jx4)) { count = 4; } else if (b.Contains(Kernel_bin.Abilities.EL_Def_Jx2)) { count = 2; } else if (b.Contains(Kernel_bin.Abilities.EL_Def_Jx1)) { count = 1; } for (; count < 4; count++) { Source.Characters[c].Stat_J[Kernel_bin.Stat.EL_Def_1 + count] = 0; } break; case Kernel_bin.Abilities.ST_Def_Jx1: case Kernel_bin.Abilities.ST_Def_Jx2: case Kernel_bin.Abilities.ST_Def_Jx4: count = 0; if (b.Contains(Kernel_bin.Abilities.ST_Def_Jx4)) { count = 4; } else if (b.Contains(Kernel_bin.Abilities.ST_Def_Jx2)) { count = 2; } else if (b.Contains(Kernel_bin.Abilities.ST_Def_Jx1)) { count = 1; } for (; count < 4; count++) { Source.Characters[c].Stat_J[Kernel_bin.Stat.ST_Def_1 + count] = 0; } break; case Kernel_bin.Abilities.Abilityx3: case Kernel_bin.Abilities.Abilityx4: count = 2; if (b.Contains(Kernel_bin.Abilities.Abilityx4)) { count = 4; } else if (b.Contains(Kernel_bin.Abilities.Abilityx3)) { count = 3; } for (; count < Source.Characters[c].Abilities.Count; count++) { Source.Characters[c].Abilities[count] = Kernel_bin.Abilities.None; } break; default: Source.Characters[c].Stat_J[Kernel_bin.Stat2Ability.FirstOrDefault(x => x.Value == r).Key] = 0; break; } } } InGameMenu_Junction.ReInit(); } } }
protected override bool Inputs() { bool ret = false; if (Enabled) { foreach (KeyValuePair <Enum, IGMData> i in Data) { i.Value.Inputs(); } ml = Input.MouseLocation.Transform(Focus); if (mode == Mode.ChooseItem) { if (Data[SectionName.SideMenu] != null && Data[SectionName.SideMenu].Count > 0) { for (int pos = 0; pos < Data[SectionName.SideMenu].Count; pos++) { Rectangle r = Data[SectionName.SideMenu].ITEM[pos, 0]; if (r.Contains(ml)) { choSideBar = (Items)pos; ret = true; if (Input.Button(Buttons.MouseWheelup) || Input.Button(Buttons.MouseWheeldown)) { return(ret); } break; } } if (Input.Button(Buttons.Down)) { Input.ResetInputLimit(); init_debugger_Audio.PlaySound(0); if ((int)++choSideBar >= ((IGMData_SideMenu)Data[SectionName.SideMenu]).Count) { choSideBar = 0; } ret = true; } else if (Input.Button(Buttons.Up)) { Input.ResetInputLimit(); init_debugger_Audio.PlaySound(0); if (--choSideBar < 0) { choSideBar = (Items)((IGMData_SideMenu)Data[SectionName.SideMenu]).Count - 1; } ret = true; } else if (Input.Button(Buttons.Cancel)) { Input.ResetInputLimit(); init_debugger_Audio.PlaySound(8); Fade = 0.0f; State = MainMenuStates.LoadGameChooseGame; ret = true; } else if (Input.Button(Buttons.Okay)) { Input.ResetInputLimit(); init_debugger_Audio.PlaySound(0); ret = true; switch (choSideBar) { //Select Char Mode case Items.Junction: case Items.Magic: case Items.Status: mode = Mode.ChooseChar; break; case Items.Item: State = MainMenuStates.IGM_Items; InGameMenu_Items.ReInit(); break; } } } } else if (mode == Mode.ChooseChar) { for (int i = 0; i < Data[SectionName.Party].Count; i++) { if (Data[SectionName.Party].BLANKS[i]) { continue; } Rectangle r = Data[SectionName.Party].SIZE[i]; if (r.Contains(ml)) { choChar = i; ret = true; if (Input.Button(Buttons.MouseWheelup) || Input.Button(Buttons.MouseWheeldown)) { return(ret); } break; } } for (int i = Data[SectionName.Party].Count; i < Data[SectionName.Non_Party].Count + Data[SectionName.Party].Count; i++) { if (Data[SectionName.Non_Party].BLANKS[i - Data[SectionName.Party].Count]) { continue; } Rectangle r = Data[SectionName.Non_Party].SIZE[i - Data[SectionName.Party].Count]; //r.Offset(focus.Translation.X, focus.Translation.Y); if (r.Contains(ml)) { choChar = i; ret = true; if (Input.Button(Buttons.MouseWheelup) || Input.Button(Buttons.MouseWheeldown)) { return(ret); } break; } } if (Input.Button(Buttons.Down)) { Input.ResetInputLimit(); init_debugger_Audio.PlaySound(0); choChar++; ret = true; } else if (Input.Button(Buttons.Up)) { Input.ResetInputLimit(); init_debugger_Audio.PlaySound(0); choChar--; ret = true; } else if (Input.Button(Buttons.Cancel)) { Input.ResetInputLimit(); ret = true; init_debugger_Audio.PlaySound(8); mode = Mode.ChooseItem; } else if (Input.Button(Buttons.Okay)) { Input.ResetInputLimit(); init_debugger_Audio.PlaySound(0); ret = true; switch (choSideBar) { //Select Char Mode case Items.Junction: //case Items.Magic: //case Items.Status: State = MainMenuStates.IGM_Junction; if (choChar < 3) { InGameMenu_Junction.ReInit(Memory.State.PartyData[choChar], Memory.State.Party[choChar]); } else { int pos = 0; if (!Memory.State.TeamLaguna && !Memory.State.SmallTeam) { for (byte i = 0; Memory.State.Party != null && i < Memory.State.Characters.Count; i++) { if (!Memory.State.PartyData.Contains((Characters)i) && Memory.State.Characters[(Characters)i].VisibleInMenu) { if (pos++ + 3 == choChar) { InGameMenu_Junction.ReInit((Characters)i, (Characters)i); break; } } } } } break; } } } } return(ret); }