public override void Refresh()
            {
                base.Refresh();

                if (IGM_Junction != null && IGM_Junction.GetMode().Equals(Mode.Mag_Stat) && Enabled)
                {
                    ITEM[0, 0] = new IGMDataItem.Icon(Icons.ID.Rewind_Fast, new Rectangle(SIZE[0].X, SIZE[0].Y, 0, 0), 2, 7);
                    ITEM[0, 1] = new IGMDataItem.Text(Descriptions[Items.ST_A_D], new Rectangle(SIZE[0].X + 20, SIZE[0].Y, 0, 0));
                    ITEM[0, 2] = new IGMDataItem.Icon(Icons.ID.Rewind, new Rectangle(SIZE[0].X + 143, SIZE[0].Y, 0, 0), 2, 7);
                    ITEM[0, 3] = new IGMDataItem.Text(Descriptions[Items.EL_A_D], new Rectangle(SIZE[0].X + 169, SIZE[0].Y, 0, 0));
                }
                else
                if (IGM_Junction != null && IGM_Junction.GetMode().Equals(Mode.Mag_EL_A) && Enabled) //coords for these two need checked.
                {
                    ITEM[0, 0] = new IGMDataItem.Icon(Icons.ID.Rewind, new Rectangle(SIZE[0].X, SIZE[0].Y, 0, 0), 2, 7);
                    ITEM[0, 1] = new IGMDataItem.Text(Descriptions[Items.ST_A_D], new Rectangle(SIZE[0].X + 20, SIZE[0].Y, 0, 0));
                    ITEM[0, 2] = new IGMDataItem.Icon(Icons.ID.Forward, new Rectangle(SIZE[0].X + 143, SIZE[0].Y, 0, 0), 2, 7);
                    ITEM[0, 3] = new IGMDataItem.Text(Descriptions[Items.Stats], new Rectangle(SIZE[0].X + 169, SIZE[0].Y, 0, 0));
                }
                else
                if (IGM_Junction != null && IGM_Junction.GetMode().Equals(Mode.Mag_ST_A) && Enabled)
                {
                    ITEM[0, 0] = new IGMDataItem.Icon(Icons.ID.Forward, new Rectangle(SIZE[0].X, SIZE[0].Y, 0, 0), 2, 7);
                    ITEM[0, 1] = new IGMDataItem.Text(Descriptions[Items.EL_A_D], new Rectangle(SIZE[0].X + 20, SIZE[0].Y, 0, 0));
                    ITEM[0, 2] = new IGMDataItem.Icon(Icons.ID.Forward_Fast, new Rectangle(SIZE[0].X + 143, SIZE[0].Y, 0, 0), 2, 7);
                    ITEM[0, 3] = new IGMDataItem.Text(Descriptions[Items.Stats], new Rectangle(SIZE[0].X + 169, SIZE[0].Y, 0, 0));
                }
            }
Esempio n. 2
0
            private void Refresh(sbyte pos, Damageable damageable)
            {
                Contents[pos] = damageable;
                if (damageable != null)
                {
                    ITEM[pos, 0] = new IGMDataItem.Text {
                        Data = damageable.Name, Pos = SIZE[pos]
                    };
                    CURSOR[pos] = new Point(SIZE[pos].X, (int)(SIZE[pos].Y + (6 * TextScale.Y)));

                    Rectangle r = ITEM[pos, 5].Pos;
                    r.Height = BarHeight;
                    r.Width  = (int)(DefaultHPBarWidth * damageable.PercentFullHP());
                    ((IGMDataItem.Texture)ITEM[pos, 5]).Pos = r;
                    //r.Offset(0, 2);
                    //((IGMDataItem.Texture)ITEM[pos, 7]).Pos = r;

                    ((IGMDataItem.Integer)ITEM[pos, 2]).Data = damageable.Level;
                    ((IGMDataItem.Integer)ITEM[pos, 8]).Data = damageable.CurrentHP();
                    for (int i = 0; i < Depth; i++)
                    {
                        ITEM[pos, i]?.Show();
                    }
                }
                else
                {
                    for (int i = 0; i < Depth; i++)
                    {
                        ITEM[pos, i]?.Hide();
                    }
                }
            }
 protected override void Init()
 {
     base.Init();
     ITEM[0, 0] = new IGMDataItem.Text()
     {
         Data = Strings.Name.New_Game, Pos = SIZE[0]
     };
     ITEM[1, 0] = new IGMDataItem.Text()
     {
         Data = Strings.Name.Load_Game, Pos = SIZE[1]
     };
     ITEM[2, 0] = new IGMDataItem.Text()
     {
         Data = "OpenVIII debug tools", Pos = SIZE[2]
     };
     Cursor_Status = Cursor_Status.Enabled | Cursor_Status.Vertical | Cursor_Status.Horizontal;
     OkayActions   = new Dictionary <int, Action>()
     {
         { 0, NewGameOkayAction },
         { 1, LoadGameOkayAction },
         { 2, DebugModeOkayAction },
     };
     FadeOutActions = new Dictionary <int, Action>()
     {
         { 0, NewGameFadeOutAction },
         //{1, LoadGameOkayAction },
         //{2, DebugModeOkayAction },
     };
 }
Esempio n. 4
0
            public override void Refresh()
            {
                base.Refresh();

                if (Memory.State.Characters != null && Damageable != null && Damageable.GetCharacterData(out Saves.CharacterData c))
                {
                    for (int i = 0; i < Count; i++)
                    {
                        if (i == 0)
                        {
                            ITEM[i, 1] = new IGMDataItem.Text(
                                Kernel_bin.BattleCommands[
                                    c.Abilities.Contains(Kernel_bin.Abilities.Mug) ?
                                    12 :
                                    1].Name,
                                new Rectangle(SIZE[i].X + 80, SIZE[i].Y, 0, 0));
                        }
                        else
                        {
                            ITEM[i, 0] = new IGMDataItem.Icon(Icons.ID.Arrow_Right2, SIZE[i], 9);
                            ITEM[i, 1] = c.Commands[i - 1] != Kernel_bin.Abilities.None ? new IGMDataItem.Text(
                                Icons.ID.Ability_Command, 9,
                                Kernel_bin.Commandabilities[c.Commands[i - 1]].Name,
                                new Rectangle(SIZE[i].X + 40, SIZE[i].Y, 0, 0)) : null;
                            Kernel_bin.Abilities k = c.Commands[i - 1];
                            Descriptions[i] = k == Kernel_bin.Abilities.None ? null : Kernel_bin.Commandabilities[k].BattleCommand.Description;
                        }
                    }
                }
            }
Esempio n. 5
0
 private void addGF(ref int pos, GFs g, Font.ColorID color = Font.ColorID.White)
 {
     ITEM[pos, 0]  = new IGMDataItem.Text(Memory.Strings.GetName(g), SIZE[pos], color);
     ITEM[pos, 1]  = JunctionedGFs.ContainsKey(g) ? new IGMDataItem.Icon(Icons.ID.JunctionSYM, new Rectangle(SIZE[pos].X + SIZE[pos].Width - 100, SIZE[pos].Y, 0, 0)) : null;
     ITEM[pos, 2]  = new IGMDataItem.Integer(Source.GFs[g].Level, new Rectangle(SIZE[pos].X + SIZE[pos].Width - 50, SIZE[pos].Y, 0, 0), spaces: 3);
     BLANKS[pos]   = false;
     Contents[pos] = g;
     pos++;
 }
Esempio n. 6
0
            protected void FillData <T>(Dictionary <T, byte> oldtotal, Dictionary <T, byte> total, Enum[] availableFlagsarray, Icons.ID starticon, sbyte offset = 0, byte palette = 2, Icons.ID[] skip = null) where T : Enum
            {
                int   _nag      = 0;
                int   _pos      = 0;
                sbyte endoffset = (sbyte)(offset > 0 ? offset : 0);

                for (sbyte pos = 0; pos < Count - endoffset; pos++)
                {
                    if (skip != null && skip.Contains(starticon + pos))
                    {
                        offset    -= 1;
                        pos       += 1;
                        endoffset -= 1;
                    }
                    ITEM[pos + offset, 0] = new IGMDataItem.Icon(starticon + pos, new Rectangle(SIZE[pos + offset].X, SIZE[pos + offset].Y, 0, 0), palette);
                    ITEM[pos + offset, 1] = total[(T)availableFlagsarray[pos + 1]] > 100 ? new IGMDataItem.Icon(Icons.ID.Star, new Rectangle(SIZE[pos + offset].X + 45, SIZE[pos + offset].Y, 0, 0), 4) : null;
                    ITEM[pos + offset, 2] = null;
                    ITEM[pos + offset, 3] = new IGMDataItem.Integer(
                        total[(T)availableFlagsarray[pos + 1]] > 100 ?
                        total[(T)availableFlagsarray[pos + 1]] - 100 :
                        total[(T)availableFlagsarray[pos + 1]], new Rectangle(SIZE[pos + offset].X + SIZE[pos + offset].Width - 80, SIZE[pos + offset].Y, 0, 0), 17, numtype: Icons.NumType.sysFntBig, spaces: 3);
                    ITEM[pos + offset, 4] = new IGMDataItem.Text("%", new Rectangle(SIZE[pos + offset].X + SIZE[pos + offset].Width - 20, SIZE[pos + offset].Y, 0, 0));
                    if (oldtotal != null)
                    {
                        if (oldtotal[(T)availableFlagsarray[pos + 1]] > total[(T)availableFlagsarray[pos + 1]])
                        {
                            ((IGMDataItem.Icon)ITEM[pos + offset, 0]).Palette       = 5;
                            ((IGMDataItem.Icon)ITEM[pos + offset, 0]).Faded_Palette = 5;
                            ITEM[pos + offset, 2] = new IGMDataItem.Icon(Icons.ID.Arrow_Down, new Rectangle(SIZE[pos + offset].X + SIZE[pos + offset].Width - 105, SIZE[pos + offset].Y, 0, 0), 16);
                            ((IGMDataItem.Integer)ITEM[pos + offset, 3]).FontColor = Font.ColorID.Red;
                            ((IGMDataItem.Text)ITEM[pos + offset, 4]).FontColor    = Font.ColorID.Red;


                            if (++_nag > _pos)
                            {
                                ColorChangeEventListener?.Invoke(this, Font.ColorID.Red);
                            }
                        }
                        else if (oldtotal[(T)availableFlagsarray[pos + 1]] < total[(T)availableFlagsarray[pos + 1]])
                        {
                            ((IGMDataItem.Icon)ITEM[pos + offset, 0]).Palette       = 6;
                            ((IGMDataItem.Icon)ITEM[pos + offset, 0]).Faded_Palette = 6;
                            ITEM[pos + offset, 2] = new IGMDataItem.Icon(Icons.ID.Arrow_Up, new Rectangle(SIZE[pos + offset].X + SIZE[pos + offset].Width - 105, SIZE[pos + offset].Y, 0, 0), 17);
                            ((IGMDataItem.Integer)ITEM[pos + offset, 3]).FontColor = Font.ColorID.Yellow;
                            ((IGMDataItem.Text)ITEM[pos + offset, 4]).FontColor    = Font.ColorID.Yellow;


                            if (_nag <= ++_pos)
                            {
                                ColorChangeEventListener?.Invoke(this, Font.ColorID.Yellow);
                            }
                        }
                    }
                }
            }
Esempio n. 7
0
            private void Refresh(sbyte pos, Damageable damageable)
            {
                Contents[pos] = damageable;
                if (damageable != null)
                {
                    float     yoff  = 39;
                    Rectangle rbak  = SIZE[pos];
                    Rectangle r     = rbak;
                    Color     color = new Color(74.5f / 100, 12.5f / 100, 11.8f / 100, .9f);
                    ITEM[pos, 0] = new IGMDataItem.Text(damageable.Name, rbak);
                    CURSOR[pos]  = new Point(rbak.X, (int)(rbak.Y + (6 * TextScale.Y)));

                    r.Offset(7, yoff);
                    ITEM[pos, 1] = new IGMDataItem.Icon(Icons.ID.Lv, r, 13);

                    r = rbak;
                    r.Offset((49), yoff);
                    ITEM[pos, 2] = new IGMDataItem.Integer(damageable.Level, r, 2, 0, 1, 3);

                    r = rbak;
                    r.Offset(126, yoff);
                    ITEM[pos, 3] = new IGMDataItem.Icon(Icons.ID.HP2, r, 13);

                    r.Offset(0, 28);
                    r.Width      = 118;
                    r.Height     = 1;
                    ITEM[pos, 4] = new IGMDataItem.Texture(_red_pixel, r)
                    {
                        Color = Color.Black
                    };
                    r.Width      = (int)(r.Width * damageable.PercentFullHP());
                    ITEM[pos, 5] = new IGMDataItem.Texture(_red_pixel, r)
                    {
                        Color = color
                    };

                    r.Width = 118;
                    r.Offset(0, 2);
                    ITEM[pos, 6] = new IGMDataItem.Texture(_red_pixel, r)
                    {
                        Color = Color.Black
                    };
                    r.Width      = (int)(r.Width * damageable.PercentFullHP());
                    ITEM[pos, 7] = new IGMDataItem.Texture(_red_pixel, r)
                    {
                        Color = color
                    };
                    //TODO red bar resizes based on current/max hp

                    r = rbak;
                    r.Offset((166), yoff);
                    ITEM[pos, 8] = new IGMDataItem.Integer(damageable.CurrentHP(), r, 2, 0, 1, 4);
                }
            }
Esempio n. 8
0
            /// <summary>
            /// Things fixed at startup.
            /// </summary>
            protected override void Init()
            {
                base.Init();
                //Static items
                ITEM[0, 1] = new IGMDataItem.Icon {
                    Data = Icons.ID.MenuBorder, Pos = new Rectangle(X + 10, Y - 2, 100, 148), Scale = new Vector2(1f)
                };
                ITEM[0, 3] = new IGMDataItem.Text {
                    Data = Strings.Name.LV, Pos = new Rectangle(X + 117, Y + 54, 0, 0)
                };
                ITEM[0, 5] = new IGMDataItem.Icon {
                    Data = Icons.ID.InParty, Pos = new Rectangle(X + 278, Y + 48, 0, 0), Palette = 6
                };
                ITEM[0, 6] = new IGMDataItem.Text {
                    Data = Strings.Name.HP, Pos = new Rectangle(X + 117, Y + 108, 0, 0)
                };
                ITEM[0, 8] = new IGMDataItem.Text {
                    Data = Strings.Name.ForwardSlash, Pos = new Rectangle(X + 272, Y + 108, 0, 0)
                };
                ITEM[0, 10] = new IGMDataItem.Text {
                    Data = Strings.Name.CurrentEXP + "\n" + Strings.Name.NextLEVEL, Pos = new Rectangle(X, Y + 192, 0, 0)
                };
                ITEM[0, 12] = new IGMDataItem.Icon {
                    Data = Icons.ID.P, Pos = new Rectangle(X + 372, Y + 198, 0, 0), Palette = 2
                };
                ITEM[0, 14] = new IGMDataItem.Icon {
                    Data = Icons.ID.P, Pos = new Rectangle(X + 372, Y + 231, 0, 0), Palette = 2
                };

                //Dynamic items
                ITEM[0, 0] = new IGMDataItem.Face {
                    Pos = new Rectangle(X + 12, Y, 96, 144)
                };
                ITEM[0, 2] = new IGMDataItem.Text {
                    Pos = new Rectangle(X + 117, Y + 0, 0, 0)
                };
                ITEM[0, 4] = new IGMDataItem.Integer {
                    Pos = new Rectangle(X + 117 + 35, Y + 54, 0, 0), Palette = 13, NumType = Icons.NumType.SysFntBig, Padding = 1, Spaces = 6
                };
                ITEM[0, 7] = new IGMDataItem.Integer {
                    Pos = new Rectangle(X + 152, Y + 108, 0, 0), Palette = 13, NumType = Icons.NumType.SysFntBig, Padding = 1, Spaces = 6
                };
                ITEM[0, 9] = new IGMDataItem.Integer {
                    Pos = new Rectangle(X + 292, Y + 108, 0, 0), Palette = 13, NumType = Icons.NumType.SysFntBig, Padding = 1, Spaces = 5
                };
                ITEM[0, 11] = new IGMDataItem.Integer {
                    Pos = new Rectangle(X + 192, Y + 198, 0, 0), Palette = 13, NumType = Icons.NumType.Num8X8B, Padding = 1, Spaces = 9
                };
                ITEM[0, 13] = new IGMDataItem.Integer {
                    Pos = new Rectangle(X + 192, Y + 231, 0, 0), Palette = 13, NumType = Icons.NumType.Num8X8B, Padding = 1, Spaces = 9
                };
            }
Esempio n. 9
0
 protected override void Init()
 {
     base.Init();
     ITEM[0, 0] = new IGMDataItem.Text()
     {
         Data = Strings.Name.RemMag, Pos = SIZE[0]
     };
     ITEM[1, 0] = new IGMDataItem.Text()
     {
         Data = Strings.Name.RemAll, Pos = SIZE[1]
     };
     Cursor_Status |= (Cursor_Status.Enabled | Cursor_Status.Horizontal | Cursor_Status.Vertical);
 }
Esempio n. 10
0
 protected override void Init()
 {
     base.Init();
     ITEM[0, 0]     = new IGMDataItem.Text(Titles[Items.RemMag], SIZE[0]);
     ITEM[1, 0]     = new IGMDataItem.Text(Titles[Items.RemAll], SIZE[1]);
     Cursor_Status |= Cursor_Status.Enabled;
     Cursor_Status |= Cursor_Status.Horizontal;
     Cursor_Status |= Cursor_Status.Vertical;
     Descriptions   = new Dictionary <Items, FF8String> {
         { Items.RemMag, Memory.Strings.Read(Strings.FileID.MNGRP, 2, 278) },
         { Items.RemAll, Memory.Strings.Read(Strings.FileID.MNGRP, 2, 276) },
     };
 }
Esempio n. 11
0
            /// <summary>
            /// Things fixed at startup.
            /// </summary>
            protected override void Init()
            {
                ITEM[0, 1] = new IGMDataItem.Icon(Icons.ID.MenuBorder, new Rectangle(X + 10, Y - 2, 100, 148), scale: new Vector2(1f));
                ITEM[0, 3] = new IGMDataItem.Text(Misc[Items.LV], new Rectangle(X + 117, Y + 54, 0, 0));
                ITEM[0, 6] = new IGMDataItem.Text(Misc[Items.HP], new Rectangle(X + 117, Y + 108, 0, 0));
                ITEM[0, 8] = new IGMDataItem.Text(Misc[Items.ForwardSlash], new Rectangle(X + 272, Y + 108, 0, 0));
                FF8String s = Misc[Items.CurrentEXP] + "\n" + Misc[Items.NextLEVEL];

                ITEM[0, 10] = new IGMDataItem.Text(s, new Rectangle(X, Y + 192, 0, 0));
                ITEM[0, 12] = new IGMDataItem.Icon(Icons.ID.P, new Rectangle(X + 372, Y + 198, 0, 0), 2);
                ITEM[0, 14] = new IGMDataItem.Icon(Icons.ID.P, new Rectangle(X + 372, Y + 231, 0, 0), 2);
                base.Init();
            }
 protected override void Init()
 {
     base.Init();
     for (int pos = 0; pos < Rows; pos++)
     {
         ITEM[pos, 0] = new IGMDataItem.Text
         {
             Icon    = Icons.ID.Ability_Command,
             Palette = 9,
             Pos     = new Rectangle(SIZE[pos].X, SIZE[pos].Y, 0, 0)
         }
     }
     ;
 }
Esempio n. 13
0
 protected override void Init()
 {
     base.Init();
     for (byte pos = 0; pos < Count; pos++)
     {
         ITEM[pos, 0] = new IGMDataItem.Icon {
             Pos = new Rectangle(SIZE[pos].X, SIZE[pos].Y, 0, 0)
         };
         ITEM[pos, 1] = new IGMDataItem.Text {
             Pos = new Rectangle(SIZE[pos].X + 60, SIZE[pos].Y, 0, 0)
         };
         BLANKS[pos] = true;
     }
 }
Esempio n. 14
0
            protected override void Init()
            {
                Table_Options |= Table_Options.FillRows;
                base.Init();

                for (var pos = 0; pos < Count; pos++)
                {
                    ITEM[pos, 0] = new IGMDataItem.Text
                    {
                        Pos = SIZE[pos]
                    };
                    ITEM[pos, 0].Hide();
                    BLANKS[pos] = true;
                }
            }
Esempio n. 15
0
 protected override void Init()
 {
     base.Init();
     Hide();
     for (int pos = 0; pos < Rows; pos++)
     {
         ITEM[pos, 0] = new IGMDataItem.Text
         {
             Palette = 9,
             Pos     =
                 new Rectangle(SIZE[pos].X, SIZE[pos].Y, 0, 0)
         }
     }
     ;
 }
Esempio n. 16
0
            private void Fill()
            {
                Faces.ID id   = 0;
                int      skip = Page * Rows;

                for (int i = 0; i < Rows; i++)
                {
                    bool       gftest    = false;
                    bool       ctest     = false;
                    Characters character = Characters.Blank;
                    GFs        gf        = GFs.Blank;
                    while (!Enum.IsDefined(typeof(Faces.ID), id) ||
                           !((ctest = Item.TestCharacter(ref id, out character)) || (gftest = Item.TestGF(ref id, out gf))) ||
                           skip-- > 0)
                    {
                        if ((byte)++id > 32)
                        {
                            for (; i < Rows; i++)
                            {
                                ITEM[i, 0]  = null;
                                ITEM[i, 1]  = null;
                                ITEM[i, 2]  = null;
                                BLANKS[i]   = true;
                                Contents[i] = Faces.ID.Blank;
                            }
                            Pages = Page + 1;
                            return;
                        }
                    }
                    ITEM[i, 0] = new IGMDataItem.Text(Memory.Strings.GetName(id), pos: SIZE[i]);
                    int hp = (ctest || gftest) ? Memory.State[id]?.CurrentHP() ?? -1 : -1;
                    BLANKS[i]   = false;
                    Contents[i] = id;
                    if (hp > -1)
                    {
                        ITEM[i, 1] = new IGMDataItem.Icon(Icons.ID.HP2, new Rectangle(SIZE[i].X + SIZE[i].Width - (20 * 7), SIZE[i].Y, 0, 0), 13);
                        ITEM[i, 2] = new IGMDataItem.Integer(hp, pos: new Rectangle(SIZE[i].X + SIZE[i].Width - (20 * 4), SIZE[i].Y, 0, 0), spaces: 4);
                    }
                    else
                    {
                        ITEM[i, 1] = null;
                        ITEM[i, 2] = null;
                    }

                    id++;
                }
                Pages = Page + 2;
            }
Esempio n. 17
0
            public override void Refresh()
            {
                if (Memory.State?.Characters != null)
                {
                    List <KeyValuePair <int, Characters> > party = Memory.State.Party.Select((element, index) => new { element, index }).ToDictionary(m => m.index, m => m.element).Where(m => !m.Value.Equals(Characters.Blank)).ToList();
                    byte pos = 0;
                    foreach (KeyValuePair <int, Characters> pm in party)
                    {
                        Saves.CharacterData data = Memory.State[Memory.State.PartyData[pm.Key]];
                        bool ded = data.IsDead;
                        ITEM[pos, 0] = new IGMDataItem.Text(Memory.Strings.GetName(pm.Value), SIZE[pos], ded ? Font.ColorID.Dark_Gray : Font.ColorID.White);

                        pos++;
                    }
                }
            }
Esempio n. 18
0
 protected override void Init()
 {
     base.Init();
     ITEM[0, 0] = new IGMDataItem.Icon {
         Data = Icons.ID.Rewind_Fast, Pos = new Rectangle(SIZE[0].X, SIZE[0].Y, 0, 0), Palette = 2, Faded_Palette = 7
     };
     ITEM[0, 1] = new IGMDataItem.Text {
         Pos = new Rectangle(SIZE[0].X + 20, SIZE[0].Y, 0, 0)
     };
     ITEM[0, 2] = new IGMDataItem.Icon {
         Data = Icons.ID.Rewind, Pos = new Rectangle(SIZE[0].X + 143, SIZE[0].Y, 0, 0), Palette = 2, Faded_Palette = 7
     };
     ITEM[0, 3] = new IGMDataItem.Text {
         Pos = new Rectangle(SIZE[0].X + 169, SIZE[0].Y, 0, 0)
     };
 }
Esempio n. 19
0
 protected override void Init()
 {
     base.Init();
     ITEM[0, 0] = new IGMDataItem.Text {
         Data = Strings.Name.AutoAtk, Pos = SIZE[0]
     };
     ITEM[1, 0] = new IGMDataItem.Text {
         Data = Strings.Name.AutoDef, Pos = SIZE[1]
     };
     ITEM[2, 0] = new IGMDataItem.Text {
         Data = Strings.Name.AutoMag, Pos = SIZE[2]
     };
     Cursor_Status |= Cursor_Status.Enabled;
     Cursor_Status |= Cursor_Status.Horizontal;
     Cursor_Status |= Cursor_Status.Vertical;
 }
Esempio n. 20
0
 protected override void Init()
 {
     Contents = new Damageable[Count];
     base.Init();
     for (int pos = 0; pos < Count; pos++)
     {
         ITEM[pos, 0] = new IGMDataItem.Box {
             Title = Icons.ID.STATUS
         };
         ITEM[pos, 1] = new IGMDataItem.Icon {
             Data = Icons.ID.Lv, Palette = 13
         };
         ITEM[pos, 2] = new IGMDataItem.Integer {
             Palette = 2, Faded_Palette = 0, Padding = 1, Spaces = 3
         };
         ITEM[pos, 3] = new IGMDataItem.Icon {
             Data = Icons.ID.HP2, Palette = 13
         };
         ITEM[pos, 4] = new IGMDataItem.Integer {
             Palette = 2, Faded_Palette = 0, Padding = 1, Spaces = 4
         };
         ITEM[pos, 5] = new IGMDataItem.Icon {
             Data = Icons.ID.Slash_Forward, Palette = 13
         };
         ITEM[pos, 6] = new IGMDataItem.Integer {
             Palette = 2, Faded_Palette = 0, Padding = 1, Spaces = 4
         };
         ITEM[pos, 7] = new IGMDataItem.Text {
         };
         ITEM[pos, 8] = new IGMDataItem.Integer {
             Palette = 2, Faded_Palette = 0, Padding = 1, Spaces = 9
         };
         ITEM[pos, 9] = new IGMDataItem.Icon {
             Data = Icons.ID.P, Palette = 2
         };
         ITEM[pos, 10] = new IGMDataItem.Integer {
             Palette = 2, Faded_Palette = 0, Padding = 1, Spaces = 9
         };
         ITEM[pos, 11] = new IGMDataItem.Icon {
             Data = Icons.ID.P, Palette = 2
         };
         for (int i = 0; i < Depth; i++)
         {
             ITEM[pos, i].Hide();
         }
     }
 }
Esempio n. 21
0
            private void CreateData()
            {
                _helpStr = new FF8String[_pairs.Count];
                _widths  = new int[_pairs.Count];
                byte pos = 0;

                foreach (var pair in _pairs)
                {
                    _helpStr[pos] = pair.Value;
                    var rectangle = Memory.Font.RenderBasicText(pair.Key, 0, 0, skipdraw: true);
                    _widths[pos] = rectangle.Width;
                    if (rectangle.Width > _largestWidth)
                    {
                        _largestWidth = rectangle.Width;
                    }
                    if (rectangle.Height > _largestHeight)
                    {
                        _largestHeight = rectangle.Height;
                    }
                    //_totalWidth += rectangle.Width;

                    //_averageWidth = _totalWidth / pos;
                    ++pos;
                }
                Init(_pairs.Count, 1, new IGMDataItem.Box {
                    Pos = new Rectangle(0, 12, 610, 54)
                }, _pairs.Count, 1);
                pos = 0;
                foreach (var pair in _pairs)
                {
                    ITEM[pos, 0] = new IGMDataItem.Text {
                        Data = pair.Key, Pos = SIZE[pos]
                    };
                    pos++;
                }
                Cursor_Status     |= Cursor_Status.Enabled;
                Cursor_Status     |= Cursor_Status.Horizontal;
                Cursor_Status     |= Cursor_Status.Vertical;
                Cursor_Status     |= Cursor_Status.Blinking;
                _inputsOkayActions = new List <Action>(Count)
                {
                    Inputs_Okay_UseItem,
                    Inputs_Okay_Sort,
                    Inputs_Okay_Rearrange,
                    Inputs_Okay_BattleRearrange,
                };
            }
Esempio n. 22
0
            private void CreateData()
            {
                _helpStr = new FF8String[Pairs.Count];
                widths   = new int[Pairs.Count];
                byte pos = 0;

                foreach (KeyValuePair <FF8String, FF8String> pair in Pairs)
                {
                    _helpStr[pos] = pair.Value;
                    Rectangle rectangle = Memory.font.RenderBasicText(pair.Key, 0, 0, skipdraw: true);
                    widths[pos] = rectangle.Width;
                    if (rectangle.Width > largestwidth)
                    {
                        largestwidth = rectangle.Width;
                    }
                    if (rectangle.Height > largestheight)
                    {
                        largestheight = rectangle.Height;
                    }
                    totalwidth += rectangle.Width;

                    avgwidth = totalwidth / ++pos;
                }
                Init(Pairs.Count, 1, new IGMDataItem.Box {
                    Pos = new Rectangle(0, 12, 610, 54)
                }, Pairs.Count, 1);
                pos = 0;
                foreach (KeyValuePair <FF8String, FF8String> pair in Pairs)
                {
                    ITEM[pos, 0] = new IGMDataItem.Text {
                        Data = pair.Key, Pos = SIZE[pos]
                    };
                    pos++;
                }
                Cursor_Status      |= Cursor_Status.Enabled;
                Cursor_Status      |= Cursor_Status.Horizontal;
                Cursor_Status      |= Cursor_Status.Vertical;
                Cursor_Status      |= Cursor_Status.Blinking;
                Inputs_Okay_Actions = new List <Action>(Count)
                {
                    Inputs_Okay_UseItem,
                    Inputs_Okay_Sort,
                    Inputs_Okay_Rearrange,
                    Inputs_Okay_BattleRearrange,
                };
            }
            public override void Refresh()
            {
                base.Refresh();

                if (Memory.State.Characters != null && Damageable != null && Damageable.GetCharacterData(out Saves.CharacterData c))
                {
                    for (int i = 0; i < Count; i++)
                    {
                        int slots = 2;
                        if (c.UnlockedGFAbilities.Contains(Kernel_bin.Abilities.Abilityx3))
                        {
                            slots = 3;
                        }
                        if (c.UnlockedGFAbilities.Contains(Kernel_bin.Abilities.Abilityx4))
                        {
                            slots = 4;
                        }
                        if (i < slots)
                        {
                            ITEM[i, 0] = new IGMDataItem.Icon(Icons.ID.Arrow_Right2, SIZE[i], 9);
                            if (c.Abilities[i] != Kernel_bin.Abilities.None)
                            {
                                ITEM[i, 1] = new IGMDataItem.Text(

                                    Kernel_bin.EquipableAbilities[c.Abilities[i]].Icon, 9,
                                    Kernel_bin.EquipableAbilities[c.Abilities[i]].Name,
                                    new Rectangle(SIZE[i].X + 40, SIZE[i].Y, 0, 0));
                                Descriptions[i] = Kernel_bin.EquipableAbilities[c.Abilities[i]].Description;
                            }
                            else
                            {
                                ITEM[i, 1] = null;
                                //Descriptions[i] = "";
                            }
                            BLANKS[i] = false;
                        }
                        else
                        {
                            ITEM[i, 0] = null;
                            ITEM[i, 1] = null;
                            BLANKS[i]  = true;
                            //Descriptions[i] = "";
                        }
                    }
                }
            }
Esempio n. 24
0
 private void Fill(Faces.ID e)
 {
     if ((e == Faces.ID.Blank && Target != Faces.ID.Blank) || All)
     {
         Target = e;
         foreach (Menu_Base i in ITEM)
         {
             i?.Hide();
         }
     }
     else
     {
         if (Target == Faces.ID.Blank)
         {
             foreach (Menu_Base i in ITEM)
             {
                 i?.Show();
             }
         }
         Target = e;
         Characters character = e.ToCharacters();
         GFs        gf        = e.ToGFs();
         if (character != Characters.Blank || (gf != GFs.Blank && gf != GFs.All))
         {
             ITEM[0, 0] = new IGMDataItem.Text(Misc[Items.LV], new Rectangle(SIZE[0].X, SIZE[0].Y, 0, 0));
             ITEM[1, 0] = new IGMDataItem.Text(Misc[Items.HP], new Rectangle(SIZE[1].X, SIZE[1].Y, 0, 0));
             ITEM[1, 2] = new IGMDataItem.Text(Misc[Items.ForwardSlash], new Rectangle(SIZE[1].X + 155, SIZE[1].Y, 0, 0));
         }
         if (Memory.State.Characters != null && character != Characters.Blank)
         {
             ITEM[0, 1] = new IGMDataItem.Integer(Memory.State.Characters[character].Level, new Rectangle(SIZE[0].X + 35, SIZE[0].Y, 0, 0), 13, numtype: Icons.NumType.sysFntBig, padding: 1, spaces: 6);
             ITEM[0, 2] = Memory.State.Party != null && Memory.State.Party.Contains(character)
                 ? new IGMDataItem.Icon(Icons.ID.InParty, new Rectangle(SIZE[0].X + 155, SIZE[0].Y, 0, 0), 6)
                 : null;
             ITEM[1, 1] = new IGMDataItem.Integer(Memory.State.Characters[character].CurrentHP(character), new Rectangle(SIZE[1].X + 35, SIZE[1].Y, 0, 0), 13, numtype: Icons.NumType.sysFntBig, padding: 1, spaces: 6);
             ITEM[1, 3] = new IGMDataItem.Integer(Memory.State.Characters[character].MaxHP(character), new Rectangle(SIZE[1].X + 155, SIZE[1].Y, 0, 0), 13, numtype: Icons.NumType.sysFntBig, padding: 1, spaces: 5);
         }
         if (Memory.State.GFs != null && (gf != GFs.Blank && gf != GFs.All))
         {
             ITEM[0, 1] = new IGMDataItem.Integer(Memory.State.GFs[gf].Level, new Rectangle(SIZE[0].X + 35, SIZE[0].Y, 0, 0), 13, numtype: Icons.NumType.sysFntBig, padding: 1, spaces: 6);
             ITEM[0, 2] = null;
             ITEM[1, 1] = new IGMDataItem.Integer(Memory.State.GFs[gf].CurrentHP(), new Rectangle(SIZE[1].X + 35, SIZE[1].Y, 0, 0), 13, numtype: Icons.NumType.sysFntBig, padding: 1, spaces: 6);
             ITEM[1, 3] = new IGMDataItem.Integer(Memory.State.GFs[gf].MaxHP(), new Rectangle(SIZE[1].X + 155, SIZE[1].Y, 0, 0), 13, numtype: Icons.NumType.sysFntBig, padding: 1, spaces: 5);
         }
     }
 }
Esempio n. 25
0
            protected override void Init()
            {
                base.Init();
                ITEM[0, 0] = new IGMDataItem.Text()
                {
                    Data = Strings.Name.GF, Pos = SIZE[0]
                };
                ITEM[1, 0] = new IGMDataItem.Text()
                {
                    Data = Strings.Name.Magic, Pos = SIZE[1]
                };
                Cursor_Status |= Cursor_Status.Enabled;
                Cursor_Status |= Cursor_Status.Horizontal;
                Cursor_Status |= Cursor_Status.Vertical;

                Hide();
            }
Esempio n. 26
0
            /// <summary>
            /// Things fixed at startup.
            /// </summary>
            protected override void Init()
            {
                Contents = new Kernel_bin.Stat[Count];
                base.Init();

                ITEM[5, 0] = new IGMDataItem.Icon {
                    Data = Icons.ID.Icon_Status_Attack, Pos = new Rectangle(SIZE[5].X + 200, SIZE[5].Y, 0, 0)
                };
                ITEM[5, 1] = new IGMDataItem.Icon {
                    Data = Icons.ID.Icon_Status_Defense, Pos = new Rectangle(SIZE[5].X + 240, SIZE[5].Y, 0, 0)
                };
                ITEM[5, 2] = new IGMDataItem.Icon {
                    Data = Icons.ID.Icon_Elemental_Attack, Pos = new Rectangle(SIZE[5].X + 280, SIZE[5].Y, 0, 0)
                };
                ITEM[5, 3] = new IGMDataItem.Icon {
                    Data = Icons.ID.Icon_Elemental_Defense, Pos = new Rectangle(SIZE[5].X + 320, SIZE[5].Y, 0, 0)
                };

                foreach (Kernel_bin.Stat stat in Stat2Icon.Keys.OrderBy(o => (byte)o))
                {
                    int pos = (int)stat;
                    if (pos >= 5)
                    {
                        pos++;
                    }
                    ITEM[pos, 0] = new IGMDataItem.Icon {
                        Data = Stat2Icon[stat], Pos = new Rectangle(SIZE[pos].X, SIZE[pos].Y, 0, 0)
                    };
                    ITEM[pos, 1] = new IGMDataItem.Text {
                        Pos = new Rectangle(SIZE[pos].X + 80, SIZE[pos].Y, 0, 0)
                    };
                    ITEM[pos, 2] = new IGMDataItem.Integer {
                        Pos = new Rectangle(SIZE[pos].X + 152, SIZE[pos].Y, 0, 0), NumType = Icons.NumType.SysFntBig, Spaces = 10
                    };
                    ITEM[pos, 3] = stat == Kernel_bin.Stat.HIT || stat == Kernel_bin.Stat.EVA
                                    ? new IGMDataItem.Text {
                        Data = Strings.Name.Percent, Pos = new Rectangle(SIZE[pos].X + 350, SIZE[pos].Y, 0, 0)
                    }
                                    : null;
                    ITEM[pos, 4] = new IGMDataItem.Icon {
                        Pos = new Rectangle(SIZE[pos].X + 250, SIZE[pos].Y, 0, 0), Palette = 16
                    };
                }
            }
Esempio n. 27
0
 protected override void Init()
 {
     base.Init();
     for (var i = 0; i < Rows; i++)
     {
         ITEM[i, 0] = new IGMDataItem.Text {
             Pos = SIZE[i]
         };
         ITEM[i, 0].Hide();
         ITEM[i, 1] = new IGMDataItem.Icon {
             Data = Icons.ID.HP2, Pos = new Rectangle(SIZE[i].X + SIZE[i].Width - (20 * 7), SIZE[i].Y, 0, 0), Palette = 13
         };
         ITEM[i, 1].Hide();
         ITEM[i, 2] = new IGMDataItem.Integer {
             Pos = new Rectangle(SIZE[i].X + SIZE[i].Width - (20 * 4), SIZE[i].Y, 0, 0), Spaces = 4
         };
         ITEM[i, 2].Hide();
     }
 }
Esempio n. 28
0
            /// <summary>
            /// Things that may of changed before screen loads or junction is changed.
            /// </summary>
            public override void Refresh()
            {
                if (Memory.State.Characters != null && Damageable.GetCharacterData(out Saves.CharacterData c))
                {
                    base.Refresh();
                    ITEM[0, 0] = new IGMDataItem.Face(c.ID.ToFacesID(), new Rectangle(X + 12, Y, 96, 144));
                    ITEM[0, 2] = new IGMDataItem.Text(Damageable.Name, new Rectangle(X + 117, Y + 0, 0, 0));


                    ITEM[0, 4] = new IGMDataItem.Integer(Damageable.Level, new Rectangle(X + 117 + 35, Y + 54, 0, 0), 13, numtype: Icons.NumType.sysFntBig, padding: 1, spaces: 6);
                    ITEM[0, 5] = Memory.State.Party != null && Memory.State.Party.Contains(c.ID)
                        ? new IGMDataItem.Icon(Icons.ID.InParty, new Rectangle(X + 278, Y + 48, 0, 0), 6)
                        : null;
                    ITEM[0, 7]  = new IGMDataItem.Integer(Damageable.CurrentHP(), new Rectangle(X + 152, Y + 108, 0, 0), 13, numtype: Icons.NumType.sysFntBig, padding: 1, spaces: 6);
                    ITEM[0, 9]  = new IGMDataItem.Integer(Damageable.MaxHP(), new Rectangle(X + 292, Y + 108, 0, 0), 13, numtype: Icons.NumType.sysFntBig, padding: 1, spaces: 5);
                    ITEM[0, 11] = new IGMDataItem.Integer((int)c.Experience, new Rectangle(X + 192, Y + 198, 0, 0), 13, numtype: Icons.NumType.Num_8x8_2, padding: 1, spaces: 9);
                    ITEM[0, 13] = new IGMDataItem.Integer(c.ExperienceToNextLevel, new Rectangle(X + 192, Y + 231, 0, 0), 13, numtype: Icons.NumType.Num_8x8_2, padding: 1, spaces: 9);
                }
            }
Esempio n. 29
0
 protected override void Init()
 {
     base.Init();
     ITEM[0, 0]     = new IGMDataItem.Text(Memory.Strings.Read(Strings.FileID.MNGRP, 1, 105), SIZE[0]);
     ITEM[1, 0]     = new IGMDataItem.Text(Memory.Strings.Read(Strings.FileID.MNGRP, 1, 106), SIZE[1]);
     ITEM[2, 0]     = new IGMDataItem.Text("OpenVIII debug tools", SIZE[2]);
     Cursor_Status |= Cursor_Status.Enabled;
     OkayActions    = new Dictionary <int, Action>()
     {
         { 0, NewGameOkayAction },
         { 1, LoadGameOkayAction },
         { 2, DebugModeOkayAction },
     };
     FadeOutActions = new Dictionary <int, Action>()
     {
         { 0, NewGameFadeOutAction },
         //{1, LoadGameOkayAction },
         //{2, DebugModeOkayAction },
     };
 }
Esempio n. 30
0
 protected override void Init()
 {
     base.Init();
     ITEM[0, 0]     = new IGMDataItem.Text(Titles[Items.AutoAtk], SIZE[0]);
     ITEM[1, 0]     = new IGMDataItem.Text(Titles[Items.AutoDef], SIZE[1]);
     ITEM[2, 0]     = new IGMDataItem.Text(Titles[Items.AutoMag], SIZE[2]);
     Cursor_Status |= Cursor_Status.Enabled;
     Cursor_Status |= Cursor_Status.Horizontal;
     Cursor_Status |= Cursor_Status.Vertical;
     Descriptions   = new Dictionary <Items, FF8String> {
         //{Items.HP, Memory.Strings.Read(Strings.FileID.MNGRP,2,226) },
         //{Items.Str, Memory.Strings.Read(Strings.FileID.MNGRP,2,228) },
         //{Items.Vit, Memory.Strings.Read(Strings.FileID.MNGRP,2,230) },
         //{Items.Mag, Memory.Strings.Read(Strings.FileID.MNGRP,2,232) },
         //{Items.Spr, Memory.Strings.Read(Strings.FileID.MNGRP,2,234) },
         //{Items.Spd, Memory.Strings.Read(Strings.FileID.MNGRP,2,236) },
         //{Items.Luck, Memory.Strings.Read(Strings.FileID.MNGRP,2,238) },
         //{Items.Hit, Memory.Strings.Read(Strings.FileID.MNGRP,2,240) },
         //{Items.ST_A,Memory.Strings.Read(Strings.FileID.MNGRP,2,244)},
         //{Items.ST_D,Memory.Strings.Read(Strings.FileID.MNGRP,2,246)},
         //{Items.EL_A,Memory.Strings.Read(Strings.FileID.MNGRP,2,248)},
         //{Items.EL_D,Memory.Strings.Read(Strings.FileID.MNGRP,2,250)},
         //{Items.ST_A_D,Memory.Strings.Read(Strings.FileID.MNGRP,2,252)},
         //{Items.EL_A_D,Memory.Strings.Read(Strings.FileID.MNGRP,2,254)},
         //{ Items.Stats,Memory.Strings.Read(Strings.FileID.MNGRP,2,256)},
         //{Items.ST_A2,Memory.Strings.Read(Strings.FileID.MNGRP,2,258)},
         //{Items.GF,Memory.Strings.Read(Strings.FileID.MNGRP,2,263)},
         //{Items.Magic,Memory.Strings.Read(Strings.FileID.MNGRP,2,265)},
         { Items.AutoAtk, Memory.Strings.Read(Strings.FileID.MNGRP, 2, 270) },
         { Items.AutoMag, Memory.Strings.Read(Strings.FileID.MNGRP, 2, 272) },
         { Items.AutoDef, Memory.Strings.Read(Strings.FileID.MNGRP, 2, 274) },
         //{Items.RemMag,Memory.Strings.Read(Strings.FileID.MNGRP,2,278)},
         //{Items.RemAll,Memory.Strings.Read(Strings.FileID.MNGRP,2,276)},
         //{Items.RemovealljunctionedGFandmagic,Memory.Strings.Read(Strings.FileID.MNGRP,2,279)},
         //{Items.Removealljunctionedmagic,Memory.Strings.Read(Strings.FileID.MNGRP,2,280)},
         //{Items.ChooseGFtojunction,Memory.Strings.Read(Strings.FileID.MNGRP,2,281)},
         //{Items.Chooseslottojunction,Memory.Strings.Read(Strings.FileID.MNGRP,2,282)},
         //{Items.Choosemagictojunction,Memory.Strings.Read(Strings.FileID.MNGRP,2,283)},
     };
 }