public override void Refresh() { if (Memory.State?.Characters != null) { int pos = 0; if (Enemy.Party != null) { foreach (Enemy e in Enemy.Party) { //if(e.EII) ITEM[pos, 0] = new IGMDataItem.Text { Data = e.Name, Pos = SIZE[pos], FontColor = Font.ColorID.White }; ITEM[pos, 0].Show(); BLANKS[pos] = false; pos++; } for (; pos < Count; pos++) { ITEM[pos, 0]?.Hide(); BLANKS[pos] = true; } } } }
protected override void Init() { base.Init(); CURSOR[0] = Point.Zero; //disable this cursor location for (var i = 0; i < Count; i++) { if (i > 0) { ITEM[i, 0] = new IGMDataItem.Icon { Data = Icons.ID.Arrow_Right2, Pos = SIZE[i], Palette = 9 }; ITEM[i, 1] = new IGMDataItem.Text { Icon = Icons.ID.Ability_Command, Palette = 9, Pos = new Rectangle(SIZE[i].X + 40, SIZE[i].Y, 0, 0) }; } else if (i == 0) { ITEM[i, 1] = new IGMDataItem.Text { Pos = new Rectangle(SIZE[i].X + 80, SIZE[i].Y, 0, 0) } } ; } }
protected override void Init() { base.Init(); SIZE[Rows] = SIZE[0]; SIZE[Rows].Y = Y; ITEM[Rows, 2] = new IGMDataItem.Icon { Data = Icons.ID.NUM_, Pos = new Rectangle(SIZE[Rows].X + SIZE[Rows].Width - 45, SIZE[Rows].Y, 0, 0), Scale = new Vector2(2.5f) }; for (int pos = 0; pos < Rows; pos++) { ITEM[pos, 0] = new IGMDataItem.Text { Pos = SIZE[pos] }; ITEM[pos, 0].Hide(); ITEM[pos, 1] = new IGMDataItem.Icon { Data = Icons.ID.JunctionSYM, Pos = new Rectangle(SIZE[pos].X + SIZE[pos].Width - 75, SIZE[pos].Y, 0, 0) }; ITEM[pos, 1].Hide(); ITEM[pos, 2] = new IGMDataItem.Integer { Pos = new Rectangle(SIZE[pos].X + SIZE[pos].Width - 50, SIZE[pos].Y, 0, 0), Spaces = 3 }; ITEM[pos, 2].Hide(); } ITEM[Targets_Window, 0] = IGMData.Target.Group.Create(Damageable); BLANKS[Rows] = true; Cursor_Status &= ~Cursor_Status.Horizontal; Cursor_Status |= Cursor_Status.Vertical; Cursor_Status &= ~Cursor_Status.Blinking; PointerZIndex = Rows - 1; }
public Confirm(FF8String data, Icons.ID title, FF8String opt1, FF8String opt2, Rectangle?pos, int startcursor = 0) : base(2, 1, new IGMDataItem.Box(data, pos, title), 1, 2) { this.startcursor = startcursor; opt = new FF8String[Count]; opt[0] = opt1; opt[1] = opt2; ITEM[0, 0] = new IGMDataItem.Text(opt[0], SIZE[0]); ITEM[1, 0] = new IGMDataItem.Text(opt[1], SIZE[1]); }
protected override void Init() { base.Init(); for (int i = 0; i < Rows; i++) { ITEM[i, 0] = new IGMDataItem.Text(null, SIZE[i]); } ITEM[Rows, 0] = new BattleMenus.IGMData_TargetGroup(Damageable, false); PointerZIndex = 0; }
protected override void Init() { base.Init(); for (int pos = 0; pos < Count; pos++) { ITEM[pos, 0] = new IGMDataItem.Text { Pos = SIZE[pos] } } ; }
protected override void Init() { base.Init(); _helpStr = new FF8String[Count]; for (byte pos = 0; pos < Rows; pos++) { ITEM[pos, 0] = new IGMDataItem.Text(null, SIZE[pos]); ITEM[pos, 1] = new IGMDataItem.Integer(0, new Rectangle(SIZE[pos].X + SIZE[pos].Width - 60, SIZE[pos].Y, 0, 0), numtype: Icons.NumType.sysFntBig, spaces: 3); } ITEM[Count - 1, 2] = new IGMDataItem.Icon(Icons.ID.NUM_, new Rectangle(SIZE[Rows - 1].X + SIZE[Rows - 1].Width - 60, Y, 0, 0), scale: new Vector2(2.5f)); PointerZIndex = Rows - 1; }
protected override void Init() { base.Init(); for (var i = 0; i < Rows; i++) { ITEM[i, 0] = new IGMDataItem.Text { Pos = SIZE[i] }; } ITEM[Rows, 0] = Target.Group.Create(Damageable, false); PointerZIndex = 0; }
protected override void Init() { base.Init(); ITEM[_Draw, 0] = new IGMDataItem.Text(Memory.Strings.Read(Strings.FileID.KERNEL, 0, 12), SIZE[_Draw]); ITEM[Cast, 0] = new IGMDataItem.Text(Memory.Strings.Read(Strings.FileID.KERNEL, 0, 18), SIZE[Cast]); ITEM[Targets_Window, 0] = new BattleMenus.IGMData_TargetGroup(Damageable, false); Cursor_Status = Cursor_Status.Enabled; OKAY_Actions = new Dictionary <int, Func <bool> > { { _Draw, Inputs_OKAY_Draw }, { Cast, Inputs_OKAY_Cast }, }; PointerZIndex = 0; }
protected override void Init() { base.Init(); Rectangle r = CONTAINER.Pos; r.Inflate(-Width * .25f, -Height * .25f); for (byte pos = 0; pos < Rows; pos++) { ITEM[pos, 0] = new IGMDataItem.Text(null, SIZE[pos]); ITEM[pos, 1] = new IGMDataItem.Icon(Icons.ID.JunctionSYM, new Rectangle(SIZE[pos].X + SIZE[pos].Width - 60, SIZE[pos].Y, 0, 0)); ITEM[pos, 2] = new Commands(r, Damageable, Battle); ITEM[pos, 2].Hide(); } DepthFirst = true; PointerZIndex = 0; }
protected override void Init() { base.Init(); for (int i = 0; i < Count; i++) { ITEM[i, 0] = new IGMDataItem.Icon { Data = Icons.ID.Arrow_Right2, Pos = SIZE[i], Palette = 9 }; ITEM[i, 0].Hide(); ITEM[i, 1] = new IGMDataItem.Text { Palette = 9, Pos = new Rectangle(SIZE[i].X + 40, SIZE[i].Y, 0, 0) }; ITEM[i, 1].Hide(); } }
public override void Refresh() { if (Source == null || skipRefresh) { skipRefresh = false; return; } int total = Rows * Cols; DefaultPages = Source.Count() / total; if (DefaultPages <= Page) { Page = DefaultPages - 1; } int skip = Page * total; int p = 0; foreach (DataType i in Source) { if (skip > 0) { skip--; continue; } if (p >= total) { break; } Contents[p] = i; Menu_Base menu_Base = ITEM[p, 0]; menu_Base.Show(); IGMDataItem.Text text = (IGMDataItem.Text)menu_Base; text.Data = new FF8String(i.ToString()); BLANKS[p] = false; p++; } for (; p < total; p++) { Contents[p] = default; BLANKS[p] = true; ITEM[p, 0].Hide(); } base.Refresh(); }
protected override void Init() { base.Init(); ITEM[_Draw, 0] = new IGMDataItem.Text { Data = Memory.Strings.Read(Strings.FileID.Kernel, 0, 12), Pos = SIZE[_Draw] }; ITEM[Cast, 0] = new IGMDataItem.Text { Data = Memory.Strings.Read(Strings.FileID.Kernel, 0, 18), Pos = SIZE[Cast] }; ITEM[Targets_Window, 0] = IGMData.Target.Group.Create(Damageable, false); Cursor_Status = Cursor_Status.Enabled; OKAY_Actions = new Dictionary <int, Func <bool> > { { _Draw, Inputs_OKAY_Draw }, { Cast, Inputs_OKAY_Cast }, }; PointerZIndex = 0; }
protected override void Init() { base.Init(); _helpStr = new FF8String[Count]; for (byte pos = 0; pos < Rows; pos++) { ITEM[pos, 0] = new IGMDataItem.Text { Pos = SIZE[pos] }; ITEM[pos, 1] = new IGMDataItem.Integer { Pos = new Rectangle(SIZE[pos].X + SIZE[pos].Width - 60, SIZE[pos].Y, 0, 0), NumType = Icons.NumType.SysFntBig, Spaces = 3 }; } NUM_ = new IGMDataItem.Icon { Data = Icons.ID.NUM_, Pos = new Rectangle(SIZE[Rows - 1].X + SIZE[Rows - 1].Width - 60, Y, 0, 0), Scale = new Vector2(2.5f) }; PointerZIndex = Rows - 1; }
protected override void Init() { base.Init(); filter = ""; Game1.onTextEntered += Game1_onTextEntered; Contents = new DataType[Rows * Cols]; foreach (int i in Enumerable.Range(0, Rows * Cols)) { ITEM[i, 0] = new IGMDataItem.Text { Pos = SIZE[i] }; } Rectangle rect = new Rectangle(CONTAINER.X + CONTAINER.Width / 4, CONTAINER.Y - 112, CONTAINER.Width / 2, 120); ITEM[Count - 3, 0] = new IGMDataItem.Box { Pos = rect, Options = Box_Options.Center | Box_Options.Middle, Title = Icons.ID.INFO }; Cursor_Status |= Cursor_Status.Horizontal; Hide(); }
private void AddGF(ref int pos, GFs g, Font.ColorID color = Font.ColorID.White) { Contents[pos] = g; if (g != GFs.Blank) { ((IGMDataItem.Text)ITEM[pos, 0]).Data = Memory.Strings.GetName(g); ((IGMDataItem.Text)ITEM[pos, 0]).FontColor = color; ((IGMDataItem.Integer)ITEM[pos, 2]).Data = Battle ? Source.GFs[g].CurrentHP() : Source.GFs[g].Level; ShowChild(pos, g); if (Battle) { ITEM[pos, 1].Hide(); } } else { if (ITEM[pos, 0] == null) { ITEM[pos, 0] = new IGMDataItem.Text { Pos = SIZE[pos], FontColor = color } } ; if (ITEM[pos, 1] == null) { ITEM[pos, 1] = new IGMDataItem.Icon { Data = Icons.ID.JunctionSYM, Pos = new Rectangle(SIZE[pos].X + SIZE[pos].Width - 100, SIZE[pos].Y, 0, 0) } } ; if (ITEM[pos, 2] == null) { ITEM[pos, 2] = new IGMDataItem.Integer { Pos = new Rectangle(SIZE[pos].X + SIZE[pos].Width - 50, SIZE[pos].Y, 0, 0), Spaces = 3 } } ; HideChild(pos); } pos++; }
private void addMagic(ref int pos, Kernel_bin.Magic_Data spell, Font.ColorID color = @default) { bool j = false; if (color == @default && Source.Stat_J.ContainsValue(spell.ID)) { //spell is junctioned if (!Battle) { color = junctioned; } j = true; } ITEM[pos, 0] = new IGMDataItem.Text(spell.Name, SIZE[pos], color); ITEM[pos, 1] = j ? new IGMDataItem.Icon(Icons.ID.JunctionSYM, new Rectangle(SIZE[pos].X + SIZE[pos].Width - 75, SIZE[pos].Y, 0, 0)) : null; ITEM[pos, 2] = new IGMDataItem.Integer(Source.Magics[spell.ID], new Rectangle(SIZE[pos].X + SIZE[pos].Width - 50, SIZE[pos].Y, 0, 0), spaces: 3); //makes it so you cannot junction a magic to a stat that does nothing. BLANKS[pos] = color == nostat ? true : false; Contents[pos] = spell.ID; pos++; }
protected override void Init() { base.Init(); foreach (int i in Enumerable.Range(0, (int)DebugItems.Count)) { if (StrDebugLobby.TryGetValue((DebugItems)i, out FF8String str)) { ITEM[i, 0] = new IGMDataItem.Text { Data = str, Pos = SIZE[i] }; } } Rectangle rect = CONTAINER.Pos; rect.Inflate(-12, -60); rect.Offset(12, 60); ITEM[(int)DebugItems.BattlePool, 0] = DebugSelectPool <Battle.Encounter> .Create(rect, Memory.Encounters, SetEncounterOkayBattle, FilterEncounters); ITEM[(int)DebugItems.BattlePool, 0].Refresh(); ITEM[(int)DebugItems.FieldPool, 0] = DebugSelectPool <string> .Create(rect, Memory.FieldHolder.fields, SetFieldsOkayBattle, FilterFields, 4); ITEM[(int)DebugItems.FieldPool, 0].Refresh(); PointerZIndex = Count - 1; _inputsOkay = new Dictionary <DebugItems, Func <bool> >() { { DebugItems.Reset, Inputs_CANCEL }, { DebugItems.Overture, () => { Menu.FadeIn(); Menu.Module.State = MenuModule.Mode.MainLobby; Module_overture_debug.ResetModule(); Memory.Module = MODULE.OVERTURE_DEBUG; Memory.IsMouseVisible = false; AV.Music.Stop(); return(true); } }, { DebugItems.Battle, () => { ITEM[(int)DebugItems.BattlePool, 0].Show(); return(true); } }, { DebugItems.Field, () => { ITEM[(int)DebugItems.FieldPool, 0].Show(); return(true); } }, { DebugItems.Movie, () => { Menu.FadeIn(); Memory.Module = MODULE.MOVIETEST; Module_movie_test.Play(); Memory.IsMouseVisible = false; return(true); } }, { DebugItems.Music, () => { Fields.Module.ResetField(); AV.Music.PlayStop(); return(true); } }, { DebugItems.Sounds, () => { AV.Sound.Play(_debugChosenAudio); skipsnd = true; return(true); } }, { DebugItems.World, () => { Menu.FadeIn(); Module_world_debug.playerPosition = new Vector3(-9105f, 30f, -4466); //reset for sake of debugging Memory.Module = MODULE.WORLD_DEBUG; Memory.IsMouseVisible = false; return(true); } }, { DebugItems.Faces, () => { Menu.FadeIn(); Memory.Module = MODULE.FACE_TEST; Module_face_test.Show(); return(true); } }, { DebugItems.Icons, () => { Menu.FadeIn(); Memory.Module = MODULE.ICON_TEST; Module_icon_test.Show(); return(true); } }, { DebugItems.Cards, () => { Menu.FadeIn(); Memory.Module = MODULE.CARD_TEST; Module_card_test.Show(); return(true); } }, { DebugItems.FieldModelTest, () => { Menu.FadeIn(); Memory.Module = MODULE.FIELD_MODEL_TEST; Module_card_test.Show(); return(true); } }, }; Files files = Files.Instance; _inputsLeft = new Dictionary <DebugItems, Func <bool> >() { { DebugItems.Movie, () => { if (Module_movie_test.Index > 0) { Module_movie_test.Index--; } else { Module_movie_test.Index = files.Count - 1; } return(true); } }, { DebugItems.Music, () => { if (Memory.MusicIndex > 0) { Memory.MusicIndex--; } else { Memory.MusicIndex = (ushort)Memory.dicMusic.Keys.Max(); } return(true); } }, { DebugItems.Sounds, () => { if (_debugChosenAudio > 0) { _debugChosenAudio--; } else { _debugChosenAudio = AV.Sound.EntriesCount - 1; } return(true); } } }; _inputsRight = new Dictionary <DebugItems, Func <bool> >() { { DebugItems.Movie, () => { if (Module_movie_test.Index < files.Count - 1) { Module_movie_test.Index++; } else { Module_movie_test.Index = 0; } return(true); } }, { DebugItems.Music, () => { if (Memory.MusicIndex < (ushort)Memory.dicMusic.Keys.Max()) { Memory.MusicIndex++; } else { Memory.MusicIndex = 0; } return(true); } }, { DebugItems.Sounds, () => { if (_debugChosenAudio < AV.Sound.EntriesCount - 1) { _debugChosenAudio++; } else { _debugChosenAudio = 0; } return(true); } } }; _dynamicDebugStrings = new Dictionary <DebugItems, Func <FF8String> > { { DebugItems.Movie, () => { if (files.Count <= Module_movie_test.Index) { Module_movie_test.Index = 0; } if (files.Count == 0) { return(""); } if (files.Count <= Module_movie_test.Index) { return(""); } string end = Path.GetFileNameWithoutExtension(files[Module_movie_test.Index]); if (StrDebugLobby[DebugItems.Movie] != null) { return(StrDebugLobby[DebugItems.Movie].Clone().Append(end)); } return(end); } }, { DebugItems.Music, () => { if (Memory.dicMusic.Count <= Memory.MusicIndex || Memory.dicMusic[(MusicId)Memory.MusicIndex].Count <= 0) { return(""); } string end = Path.GetFileNameWithoutExtension(Memory.dicMusic[(MusicId)Memory.MusicIndex][0]); if (StrDebugLobby[DebugItems.Music] != null) { return(StrDebugLobby[DebugItems.Music].Clone().Append(end)); } return(end); } }, { DebugItems.Sounds, () => StrDebugLobby[DebugItems.Sounds].Clone().Append(_debugChosenAudio.ToString("D4")) } }; }
protected override void Init() { base.Init(); foreach (int i in Enumerable.Range(0, (int)Ditems.Count)) { if (strDebugLobby.TryGetValue((Ditems)i, out FF8String str)) { ITEM[i, 0] = new IGMDataItem.Text { Data = str, Pos = SIZE[i] }; } } Rectangle rect = CONTAINER.Pos; rect.Inflate(-12, -60); rect.Offset(12, 60); ITEM[(int)Ditems.BattlePool, 0] = DebugSelectPool <Battle.Encounter> .Create(rect, Memory.Encounters, SetEncounterOKAYBattle, FilterEncounters); ITEM[(int)Ditems.BattlePool, 0].Refresh(); ITEM[(int)Ditems.FieldPool, 0] = DebugSelectPool <string> .Create(rect, Memory.FieldHolder.fields, SetFieldsOKAYBattle, FilterFields, 4); ITEM[(int)Ditems.FieldPool, 0].Refresh(); PointerZIndex = Count - 1; inputsOKAY = new Dictionary <Ditems, Func <bool> >() { { Ditems.Reset, () => { return(Inputs_CANCEL()); } }, { Ditems.Overture, () => { Menu.FadeIn(); Menu.Module.State = MenuModule.Mode.MainLobby; Module_overture_debug.ResetModule(); Memory.Module = MODULE.OVERTURE_DEBUG; Memory.IsMouseVisible = false; init_debugger_Audio.StopMusic(); return(true); } }, { Ditems.Battle, () => { //Menu.FadeIn(); //Module_battle_debug.ResetState(); //Menu.BattleMenus.CameFrom(); //Memory.Module = MODULE.BATTLE_DEBUG; ////Extended.postBackBufferDelegate = BattleSwirl.Init; ////Extended.RequestBackBuffer(); //Memory.IsMouseVisible = false; ITEM[(int)Ditems.BattlePool, 0].Show(); return(true); } }, { Ditems.Field, () => { //Menu.FadeIn(); //Fields.Module.ResetField(); //Memory.Module = MODULE.FIELD_DEBUG; //Memory.IsMouseVisible = false; ITEM[(int)Ditems.FieldPool, 0].Show(); return(true); } }, { Ditems.Movie, () => { Menu.FadeIn(); Memory.Module = MODULE.MOVIETEST; Module_movie_test.Play(); Memory.IsMouseVisible = false; return(true); } }, { Ditems.Music, () => { Fields.Module.ResetField(); init_debugger_Audio.PlayStopMusic(); return(true); } }, { Ditems.Sounds, () => { init_debugger_Audio.PlaySound(debug_choosedAudio); skipsnd = true; return(true); } }, { Ditems.World, () => { Menu.FadeIn(); Memory.Module = MODULE.WORLD_DEBUG; Memory.IsMouseVisible = false; return(true); } }, { Ditems.Faces, () => { Menu.FadeIn(); Memory.Module = MODULE.FACE_TEST; Module_face_test.Show(); return(true); } }, { Ditems.Icons, () => { Menu.FadeIn(); Memory.Module = MODULE.ICON_TEST; Module_icon_test.Show(); return(true); } }, { Ditems.Cards, () => { Menu.FadeIn(); Memory.Module = MODULE.CARD_TEST; Module_card_test.Show(); return(true); } }, { Ditems.FieldModelTest, () => { Menu.FadeIn(); Memory.Module = MODULE.FIELD_MODEL_TEST; Module_card_test.Show(); return(true); } }, }; inputsLeft = new Dictionary <Ditems, Func <bool> >() { //{ Ditems.Battle, ()=> { // Memory.Encounters.Previous(); // return true; //} }, //{ Ditems.Field, ()=> { // if( Memory.FieldHolder.FieldID>0) // Memory.FieldHolder.FieldID--; // else // Memory.FieldHolder.FieldID = checked((ushort)((Memory.FieldHolder.fields?.Length??1) - 1)); // return true; //} }, { Ditems.Movie, () => { if (Module_movie_test.Index > 0) { Module_movie_test.Index--; } else { Module_movie_test.Index = Movie.Files.Count - 1; } return(true); } }, { Ditems.Music, () => { if (Memory.MusicIndex > 0) { Memory.MusicIndex--; } else { Memory.MusicIndex = Memory.dicMusic.Keys.Max(); } return(true); } }, { Ditems.Sounds, () => { if (debug_choosedAudio > 0) { debug_choosedAudio--; } else { debug_choosedAudio = init_debugger_Audio.soundEntriesCount - 1; } return(true); } } }; inputsRight = new Dictionary <Ditems, Func <bool> >() { //{ Ditems.Battle, ()=> { // Memory.Encounters.Next(); // return true; //} }, //{ Ditems.Field, ()=> { // if( Memory.FieldHolder.FieldID<checked((ushort)((Memory.FieldHolder.fields?.Length??1) - 1))) // Memory.FieldHolder.FieldID++; // else // Memory.FieldHolder.FieldID = 0; // return true; //} }, { Ditems.Movie, () => { if (Module_movie_test.Index < Movie.Files.Count - 1) { Module_movie_test.Index++; } else { Module_movie_test.Index = 0; } return(true); } }, { Ditems.Music, () => { if (Memory.MusicIndex < Memory.dicMusic.Keys.Max()) { Memory.MusicIndex++; } else { Memory.MusicIndex = 0; } return(true); } }, { Ditems.Sounds, () => { if (debug_choosedAudio < init_debugger_Audio.soundEntriesCount - 1) { debug_choosedAudio++; } else { debug_choosedAudio = 0; } return(true); } } }; dynamicDebugStrings = new Dictionary <Ditems, Func <FF8String> > { //{ Ditems.Battle, ()=> { // string end=$"{Memory.Encounters.ID.ToString("D4")} - {Memory.Encounters.Filename.ToUpper()}"; // if(strDebugLobby[Ditems.Battle]!=null) // return strDebugLobby[Ditems.Battle].Clone().Append(end); // else // return end; } }, //{ Ditems.Field, ()=> { // string end=$"{Memory.FieldHolder.FieldID.ToString("D3")} - {Memory.FieldHolder.GetString()?.ToUpper()}"; // if(strDebugLobby[Ditems.Field]!= null) // return strDebugLobby[Ditems.Field].Clone().Append(end); // else // return end; } }, { Ditems.Movie, () => { if (Movie.Files.Count <= Module_movie_test.Index) { Module_movie_test.Index = 0; } if (Movie.Files.Count == 0) { return(""); } Movie.Files Files; if (Movie.Files.Count > Module_movie_test.Index) { string end = Path.GetFileNameWithoutExtension(Files[Module_movie_test.Index]); if (strDebugLobby[Ditems.Movie] != null) { return(strDebugLobby[Ditems.Movie].Clone().Append(end)); } else { return(end); } } return(""); } }, { Ditems.Music, () => { if (Memory.dicMusic.Count > Memory.MusicIndex && Memory.dicMusic[Memory.MusicIndex].Count > 0) { string end = Path.GetFileNameWithoutExtension(Memory.dicMusic[Memory.MusicIndex][0]); if (strDebugLobby[Ditems.Music] != null) { return(strDebugLobby[Ditems.Music].Clone().Append(end)); } else { return(end); } } return(""); } }, { Ditems.Sounds, () => { return(strDebugLobby[Ditems.Sounds].Clone().Append(debug_choosedAudio.ToString("D4"))); } } }; }