コード例 #1
0
            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));
                }
            }
コード例 #2
0
 protected override void Init()
 {
     base.Init();
     SIZE[Rows]    = SIZE[0];
     SIZE[Rows].Y  = Y;
     ITEM[Rows, 2] = new IGMDataItem.Icon(Icons.ID.Size_16x08_Lv_, new Rectangle(SIZE[Rows].X + SIZE[Rows].Width - 30, SIZE[Rows].Y, 0, 0), scale: new Vector2(2.5f));
 }
コード例 #3
0
ファイル: IGMData_Clock.cs プロジェクト: rustyworks/OpenVIII
            public override void Refresh()
            {
                base.Refresh();
                Rectangle r;

                r = CONTAINER;
                r.Offset(105, 14);
                ITEM[0, 1] = new IGMDataItem.Integer(Memory.State.Timeplayed.TotalHours < 99 ? (int)(Memory.State.Timeplayed.TotalHours) : 99, r, 2, 0, 1, 2);

                r = CONTAINER;
                r.Offset(165, 14);
                ITEM[0, 3] = new IGMDataItem.Integer(Memory.State.Timeplayed.TotalHours < 99 ? Memory.State.Timeplayed.Minutes : 99, r, 2, 0, 2, 2);
                if (!Memory.State.TeamLaguna)
                {
                    r = CONTAINER;
                    r.Offset(25, 48);
                    ITEM[0, 4] = new IGMDataItem.Icon(Icons.ID.SeeD, r, 13);

                    r = CONTAINER;
                    r.Offset(105, 48);
                    ITEM[0, 5] = Memory.State.Fieldvars != null
                        ? new IGMDataItem.Integer(Memory.State.Fieldvars.SeedRankPts / 100 < 99999 ? Memory.State.Fieldvars.SeedRankPts / 100 : 99999, r, 2, 0, 1, 5)
                        : null;
                }
                else
                {
                    ITEM[0, 4] = null;
                    ITEM[0, 5] = null;
                }

                r = CONTAINER;
                r.Offset(25, 81);
                ITEM[0, 6] = new IGMDataItem.Integer(Memory.State.AmountofGil < 99999999 ? (int)(Memory.State.AmountofGil) : 99999999, r, 2, 0, 1, 8);
            }
コード例 #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;
                        }
                    }
                }
            }
コード例 #5
0
ファイル: IGMData_Values.cs プロジェクト: rustyworks/OpenVIII
            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);
                            }
                        }
                    }
                }
            }
コード例 #6
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);
                }
            }
コード例 #7
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
                };
            }
コード例 #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
                };
            }
コード例 #9
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();
            }
コード例 #10
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;
     }
 }
コード例 #11
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;
            }
コード例 #12
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)
     };
 }
コード例 #13
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();
         }
     }
 }
コード例 #14
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++)
                    {
                        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] = "";
                        }
                    }
                }
            }
コード例 #15
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
                    };
                }
            }
コード例 #16
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();
     }
 }
コード例 #17
0
ファイル: IGMData_Clock.cs プロジェクト: rustyworks/OpenVIII
            protected override void Init()
            {
                Rectangle r;

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

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

                r = CONTAINER;
                r.Offset(185, 81);
                ITEM[0, 7] = new IGMDataItem.Icon(Icons.ID.G, r, 2);
                base.Init();
            }
コード例 #18
0
            protected override void Init()
            {
                Table_Options |= Table_Options.FillRows;
                _red_pixel     = new Texture2D(Memory.graphics.GraphicsDevice, 1, 1, false, SurfaceFormat.Color);
                Color[] color = new Color[] { new Color(74.5f / 100, 12.5f / 100, 11.8f / 100, 100) };
                _red_pixel.SetData(color, 0, _red_pixel.Width * _red_pixel.Height);
                Contents = new Damageable[Count];
                base.Init();

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

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

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

                    r = rbak;
                    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 {
                        Data = _red_pixel, Pos = r, Color = Color.Black
                    };
                    ITEM[pos, 5] = new IGMDataItem.Texture {
                        Data = _red_pixel, Pos = r, Color = color[0]
                    };

                    //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 = rbak;
                    r.Offset((166), yoff);
                    ITEM[pos, 8] = new IGMDataItem.Integer {
                        Pos = r, Palette = 2, Faded_Palette = 0, Padding = 1, Spaces = 4
                    };

                    for (int i = 0; i < Depth; i++)
                    {
                        ITEM[pos, i]?.Hide();
                    }
                }
            }
コード例 #19
0
        protected override void Init()
        {
            Texture2D pixel = new Texture2D(Memory.graphics.GraphicsDevice, 1, 1);

            pixel.SetData(new Color[] { Color.White });

            Memory.Icons[Icons.ID.Text_Cursor][0].Offset = Vector2.Zero;
            Memory.Icons.Trim(Icons.ID.Text_Cursor, 6);
            EntryGroup split = Memory.Icons[Icons.ID.Text_Cursor];
            EntryGroup e     = Memory.Icons[Icons.ID.Text_Cursor];

            Rectangle r = CONTAINER.Pos; //new Rectangle(40, 524, 880, 84);

            r.Inflate(-16, -20);
            r.X       += r.X % 4;
            r.Y       += r.Y % 4;
            r.Width   += r.Width % 4;
            r.Height  += r.Height % 4;
            rc         = Memory.Icons.MostSaturated(Icons.ID.Text_Cursor, 6);
            rcdim      = Memory.Icons.MostSaturated(Icons.ID.Text_Cursor, 2);
            ITEM[0, 0] = new IGMDataItem.Texture(pixel, r, rcdim);
            r.Inflate(-4, -4);
            ITEM[1, 0] = new IGMDataItem.Texture(pixel, r, Color.Black);
            float scale = (float)r.Height / e.Height;
            int   w     = (int)(e.Width * scale);

            ITEM[Count - 3, 0] = new IGMDataItem.Icon(Icons.ID.Text_Cursor, new Rectangle(r.X + 80, r.Y, w, r.Height), 2, scale: new Vector2(scale));
            ITEM[Count - 2, 0] = new IGMDataItem.Icon(Icons.ID.Text_Cursor, new Rectangle(r.X + 208, r.Y, w, r.Height), 2, scale: new Vector2(scale));
            Rectangle hotspot = new Rectangle(r.X + 80 + (w / 2), r.Y + 4, 208 - 80, r.Height - 8);

            ITEM[Count - 4, 0] = new IGMDataItem.Texture(pixel, hotspot, Color.TransparentBlack);
            //Rectangle hotspotbox = hotspot;
            hotspot.Width += (int)(hotspot.Width * .50f);
            Rectangle tr = new Rectangle(r.X + 208 + (w / 2), r.Y + 4, 0, r.Height - 4);

            Memory.Icons[Icons.ID.Trigger_][0].Offset = Vector2.Zero;
            Memory.Icons.Trim(Icons.ID.Trigger_, 2);
            e     = Memory.Icons[Icons.ID.Trigger_];
            scale = ((float)r.Height - 8) / e.Height;
            w     = (int)(e.Width * scale);
            int trigwidtharea = (r.Right - tr.Left);
            int xbak          = tr.X;

            tr.X += trigwidtharea / 2 - w / 2;

            ITEM[Count - 1, 0] = new IGMDataItem.Icon(Icons.ID.Trigger_, tr, 6, scale: new Vector2(scale));// { Color = rc};

            newattack = new Color(104, 80, 255);
            int       delay = 500;
            const int Time  = 2000;
            Rectangle pos   = new Rectangle(r.X, r.Y + 4, 0, r.Height - 8);

            r.Inflate(-4, -4);
            for (int x = 0; x <= _hits && x <= 7; x++)
            {
                ITEM[2 + x, 0] = new IGMDataItem.Gradient.Renzokeken(pos, newattack, rc, 1f, hotspot, r, time: Time, delay * (x));
            }
            float totalx = 0;

            for (byte i = 0; i <= 7; i++)
            {
                Memory.Icons.Trim(Icons.ID._0_Hit_ + i, 2);
                e       = Memory.Icons[Icons.ID._0_Hit_ + i];
                totalx += e[0].Offset.X;
            }
            float avgx = (float)Math.Round(totalx / 8);

            for (byte i = 0; i <= 7; i++)
            {
                Memory.Icons[Icons.ID._0_Hit_ + i][0].Offset.X = avgx;
            }
            e     = Memory.Icons[Icons.ID._0_Hit_];
            scale = ((float)r.Height) / e.Height;
            w     = (int)(e.Width * scale);
            tr.X  = xbak + trigwidtharea / 2 - w / 2;
            ITEM[Count - 5, 0] = new IGMDataItem.Icon(Icons.ID._0_Hit_, tr, 2, scale: new Vector2(scale));
            Memory.Icons.Trim(Icons.ID.Perfect__, 2);
            e     = Memory.Icons[Icons.ID.Perfect__];
            scale = ((float)r.Height) / e.Height;
            w     = (int)(e.Width * scale);
            tr.X  = xbak + trigwidtharea / 2 - w / 2;
            ITEM[Count - 6, 0] = new IGMDataItem.Icon(Icons.ID.Perfect__, tr, 8, scale: new Vector2(scale));
            base.Init();
            Reset();
            Cursor_Status = Cursor_Status.Enabled | Cursor_Status.Static | Cursor_Status.Hidden;
        }
コード例 #20
0
ファイル: NonParty.cs プロジェクト: stantoxt/OpenVIII
            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();
                    }
                }
            }
コード例 #21
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);
                                }
                            }
                        }
                    }
                }
コード例 #22
0
ファイル: IGMData_Party.cs プロジェクト: rustyworks/OpenVIII
            private void ReInitCharacter(sbyte pos, Damageable damageable)
            {
                if (SIZE != null)
                {
                    if (damageable != null)
                    {
                        Contents[pos] = damageable;
                        float yoff = 6;

                        ITEM[pos, 0] = new IGMDataItem.Box(damageable.Name, title: Icons.ID.STATUS);
                        Tuple <Rectangle, Point, Rectangle> dims = DrawBox(SIZE[pos], ((IGMDataItem.Box)ITEM[pos, 0]).Data, options: Box_Options.SkipDraw);
                        Rectangle r = dims.Item3;
                        ((IGMDataItem.Box)ITEM[pos, 0]).Pos = dims.Item1;
                        CURSOR[pos] = dims.Item2;

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

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

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

                        r = dims.Item3;
                        r.Offset((354), yoff);
                        ITEM[pos, 4] = new IGMDataItem.Integer(damageable.CurrentHP(), r, 2, 0, 1, 4);

                        r = dims.Item3;
                        r.Offset(437, yoff);
                        ITEM[pos, 5] = new IGMDataItem.Icon(Icons.ID.Slash_Forward, r, 13);

                        r = dims.Item3;

                        r.Offset((459), yoff);
                        ITEM[pos, 6] = new IGMDataItem.Integer(damageable.MaxHP(), r, 2, 0, 1, 4);

                        if ((Memory.State.TeamLaguna || Memory.State.SmallTeam) && Damageable.GetCharacterData(out Saves.CharacterData c))
                        {
                            BLANKS[pos] = false;
                            r           = dims.Item3;
                            r.Offset(145, 36);
                            FF8String s = Strings[Items.CurrentEXP] + "\n" + Strings[Items.NextLEVEL];
                            ITEM[pos, 7] = new IGMDataItem.Text(s, r);

                            r = dims.Item3;
                            r.Offset((340), 42);
                            ITEM[pos, 8] = new IGMDataItem.Integer(checked ((int)c.Experience), r, 2, 0, 1, 9);

                            r = dims.Item3;
                            r.Offset(520, 42);
                            ITEM[pos, 9] = new IGMDataItem.Icon(Icons.ID.P, r, 2);

                            r = dims.Item3;
                            r.Offset((340), 75);
                            ITEM[pos, 10] = new IGMDataItem.Integer(c.ExperienceToNextLevel, r, 2, 0, 1, 9);

                            r = dims.Item3;
                            r.Offset(520, 75);
                            ITEM[pos, 11] = new IGMDataItem.Icon(Icons.ID.P, r, 2);
                        }
                        else
                        {
                            for (int i = 7; i < Depth; i++)
                            {
                                ITEM[pos, i] = null;
                            }
                        }
                    }
                    else
                    {
                        ITEM[pos, 0] = new IGMDataItem.Box(pos: SIZE[pos]);
                        BLANKS[pos]  = true;
                        for (int i = 1; i < Depth; i++)
                        {
                            ITEM[pos, i] = null;
                        }
                    }
                }
            }