示例#1
0
            protected override void Init()
            {
                base.Init();
                Rectangle r;

                r = CONTAINER;
                r.Offset(25, 14);
                ITEM[0, 0] = new IGMDataItem.Icon {
                    Data = Icons.ID.PLAY, Pos = r, Palette = 13
                };

                r = CONTAINER;
                r.Offset(145, 14);
                ITEM[0, 2] = new IGMDataItem.Icon {
                    Data = Icons.ID.Colon, Pos = r, Palette = 13, Faded_Palette = 2, Blink_Adjustment = .5f, Blink = true
                };

                r = CONTAINER;
                r.Offset(185, 81);
                ITEM[0, 7] = new IGMDataItem.Icon {
                    Data = Icons.ID.G, Pos = r, Palette = 2
                };

                r = CONTAINER;
                r.Offset(105, 14);
                ITEM[0, 1] = new IGMDataItem.Integer {
                    Pos = r, Palette = 2, Faded_Palette = 0, Padding = 1, Spaces = 2
                };

                r = CONTAINER;
                r.Offset(165, 14);
                ITEM[0, 3] = new IGMDataItem.Integer {
                    Pos = r, Palette = 2, Faded_Palette = 0, Padding = 2, Spaces = 2
                };

                r = CONTAINER;
                r.Offset(25, 48);
                ITEM[0, 4] = new IGMDataItem.Icon {
                    Data = Icons.ID.SeeD, Pos = r, Palette = 13
                };

                r = CONTAINER;
                r.Offset(105, 48);
                ITEM[0, 5] = new IGMDataItem.Integer {
                    Pos = r, Palette = 2, Faded_Palette = 0, Padding = 1, Spaces = 5
                };

                r = CONTAINER;
                r.Offset(25, 81);
                ITEM[0, 6] = new IGMDataItem.Integer {
                    Pos = r, Palette = 2, Faded_Palette = 0, Padding = 1, Spaces = 8
                };
            }
示例#2
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;
            }
示例#3
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);
                }
            }
示例#4
0
            /// <summary>
            /// Things that may of changed before screen loads or junction is changed.
            /// </summary>
            public override void Refresh()
            {
                if (Memory.State.Characters != null)
                {
                    Contents = Array.ConvertAll(Contents, c => c = default);
                    base.Refresh();

                    if (Memory.State.Characters != null && unlocked != null)
                    {
                        ITEM[5, 0] = new IGMDataItem.Icon(Icons.ID.Icon_Status_Attack, new Rectangle(SIZE[5].X + 200, SIZE[5].Y, 0, 0),
                                                          (byte)(unlocked.Contains(Kernel_bin.Abilities.ST_Atk_J) ? 2 : 7));
                        ITEM[5, 1] = new IGMDataItem.Icon(Icons.ID.Icon_Status_Defense, new Rectangle(SIZE[5].X + 240, SIZE[5].Y, 0, 0),
                                                          (byte)(unlocked.Contains(Kernel_bin.Abilities.ST_Def_Jx1) ||
                                                                 unlocked.Contains(Kernel_bin.Abilities.ST_Def_Jx2) ||
                                                                 unlocked.Contains(Kernel_bin.Abilities.ST_Def_Jx4) ? 2 : 7));
                        ITEM[5, 2] = new IGMDataItem.Icon(Icons.ID.Icon_Elemental_Attack, new Rectangle(SIZE[5].X + 280, SIZE[5].Y, 0, 0),
                                                          (byte)(unlocked.Contains(Kernel_bin.Abilities.EL_Atk_J) ? 2 : 7));
                        ITEM[5, 3] = new IGMDataItem.Icon(Icons.ID.Icon_Elemental_Defense, new Rectangle(SIZE[5].X + 320, SIZE[5].Y, 0, 0),
                                                          (byte)(unlocked.Contains(Kernel_bin.Abilities.EL_Def_Jx1) ||
                                                                 unlocked.Contains(Kernel_bin.Abilities.EL_Def_Jx2) ||
                                                                 unlocked.Contains(Kernel_bin.Abilities.EL_Def_Jx4) ? 2 : 7));
                        BLANKS[5] = true;
                        foreach (Kernel_bin.Stat stat in (Kernel_bin.Stat[])Enum.GetValues(typeof(Kernel_bin.Stat)))
                        {
                            if (Stat2Icon.ContainsKey(stat) && Damageable.GetCharacterData(out Saves.CharacterData c))
                            {
                                int pos = (int)stat;
                                if (pos >= 5)
                                {
                                    pos++;
                                }
                                Contents[pos] = stat;
                                FF8String name = Kernel_bin.MagicData[c.Stat_J[stat]].Name;
                                if (name == null || name.Length == 0)
                                {
                                    name = Misc[Items._];
                                }

                                ITEM[pos, 0] = new IGMDataItem.Icon(Stat2Icon[stat], new Rectangle(SIZE[pos].X, SIZE[pos].Y, 0, 0), 2);
                                ITEM[pos, 1] = new IGMDataItem.Text(name, new Rectangle(SIZE[pos].X + 80, SIZE[pos].Y, 0, 0));
                                if (!unlocked.Contains(Kernel_bin.Stat2Ability[stat]))
                                {
                                    ((IGMDataItem.Icon)ITEM[pos, 0]).Palette   = ((IGMDataItem.Icon)ITEM[pos, 0]).Faded_Palette = 7;
                                    ((IGMDataItem.Text)ITEM[pos, 1]).FontColor = Font.ColorID.Grey;
                                    BLANKS[pos] = true;
                                }
                                else
                                {
                                    BLANKS[pos] = false;
                                }

                                ITEM[pos, 2] = new IGMDataItem.Integer(Damageable.TotalStat(stat), new Rectangle(SIZE[pos].X + 152, SIZE[pos].Y, 0, 0), 2, Icons.NumType.sysFntBig, spaces: 10);
                                ITEM[pos, 3] = stat == Kernel_bin.Stat.HIT || stat == Kernel_bin.Stat.EVA
                                    ? new IGMDataItem.Text(Misc[Items.Percent], new Rectangle(SIZE[pos].X + 350, SIZE[pos].Y, 0, 0))
                                    : null;
                                if (GetPrevSetting() == null || (Damageable.GetCharacterData(out Saves.CharacterData _c) && GetPrevSetting().Stat_J[stat] == _c.Stat_J[stat]) || GetPrevSetting().TotalStat(stat) == Damageable.TotalStat(stat))
                                {
                                    ITEM[pos, 4] = null;
                                }
                                else if (GetPrevSetting().TotalStat(stat) > Damageable.TotalStat(stat))
                                {
                                    ((IGMDataItem.Icon)ITEM[pos, 0]).Palette       = 5;
                                    ((IGMDataItem.Icon)ITEM[pos, 0]).Faded_Palette = 5;
                                    ((IGMDataItem.Text)ITEM[pos, 1]).FontColor     = Font.ColorID.Red;
                                    ((IGMDataItem.Integer)ITEM[pos, 2]).FontColor  = Font.ColorID.Red;
                                    if (ITEM[pos, 3] != null)
                                    {
                                        ((IGMDataItem.Text)ITEM[pos, 3]).FontColor = Font.ColorID.Red;
                                    }
                                    ITEM[pos, 4] = new IGMDataItem.Icon(Icons.ID.Arrow_Down, new Rectangle(SIZE[pos].X + 250, SIZE[pos].Y, 0, 0), 16);
                                }
                                else
                                {
                                    ((IGMDataItem.Icon)ITEM[pos, 0]).Palette       = 6;
                                    ((IGMDataItem.Icon)ITEM[pos, 0]).Faded_Palette = 6;
                                    ((IGMDataItem.Text)ITEM[pos, 1]).FontColor     = Font.ColorID.Yellow;
                                    ((IGMDataItem.Integer)ITEM[pos, 2]).FontColor  = Font.ColorID.Yellow;
                                    if (ITEM[pos, 3] != null)
                                    {
                                        ((IGMDataItem.Text)ITEM[pos, 3]).FontColor = Font.ColorID.Yellow;
                                    }
                                    ITEM[pos, 4] = new IGMDataItem.Icon(Icons.ID.Arrow_Up, new Rectangle(SIZE[pos].X + 250, SIZE[pos].Y, 0, 0), 17);
                                }
                            }
                        }
                    }
                }
示例#5
0
            protected override void Init()
            {
                Memory.MainThreadOnlyActions.Enqueue(InitRedPixel);
                Table_Options |= Table_Options.FillRows;
                Contents       = new Damageable[Count];
                base.Init();

                for (var pos = 0; pos < Count; pos++)
                {
                    const float yoff = 39;
                    var         bak  = SIZE[pos];
                    ITEM[pos, 0] = new IGMDataItem.Text {
                        Pos = SIZE[pos]
                    };
                    CURSOR[pos] = new Point(bak.X, (int)(bak.Y + (6 * TextScale.Y)));

                    var r = bak;
                    r.Offset(7, yoff);
                    ITEM[pos, 1] = new IGMDataItem.Icon {
                        Data = Icons.ID.Lv, Pos = r, Palette = 13
                    };

                    r = bak;
                    r.Offset((49), yoff);
                    ITEM[pos, 2] = new IGMDataItem.Integer {
                        Pos = r, Palette = 2, Faded_Palette = 0, Padding = 1, Spaces = 3
                    };

                    r = bak;
                    r.Offset(126, yoff);
                    ITEM[pos, 3] = new IGMDataItem.Icon {
                        Data = Icons.ID.HP2, Pos = r, Palette = 13
                    };

                    r.Offset(0, 28);
                    r.Width      = DefaultHPBarWidth;
                    r.Height     = BarHeight;
                    ITEM[pos, 4] = new IGMDataItem.Texture {
                        Pos = r, Color = Color.Black
                    };
                    ITEM[pos, 5] = new IGMDataItem.Texture {
                        Pos = r, Color = new Color(74.5f / 100, 12.5f / 100, 11.8f / 100, 100)
                    };

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

                    r = bak;
                    r.Offset((166), yoff);
                    ITEM[pos, 8] = new IGMDataItem.Integer {
                        Pos = r, Palette = 2, Faded_Palette = 0, Padding = 1, Spaces = 4
                    };

                    for (var i = 0; i < Depth; i++)
                    {
                        ITEM[pos, i]?.Hide();
                    }
                }
            }