Exemplo n.º 1
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);
                }
            }
Exemplo n.º 2
0
        private void Renzokuken_Seperator_Prep(out Rectangle r, out Rectangle hotspot, out Rectangle tr)
        {
            var e     = Memory.Icons[Icons.ID.Renzokuken_Seperator];
            var w     = 0;
            var scale = 1f;

            r = CONTAINER.Pos;
            r.Inflate(-16, -20);
            r.X      += r.X % 4;
            r.Y      += r.Y % 4;
            r.Width  += r.Width % 4;
            r.Height += r.Height % 4;
            if (e != null)
            {
                e[0].Offset = Vector2.Zero;
                scale       = (float)r.Height / e.Height;
                w           = (int)(e.Width * scale);
            }
            ITEM[0, 0] = new Texture {
                Data = pixel, Pos = r, Color = Renzokenken_Seperator_Color_Faded
            };
            r.Inflate(-4, -4);
            ITEM[1, 0] = new Texture {
                Data = pixel, Pos = r, Color = Color.Black
            };
            ITEM[Count - 3, 0] = new Icon {
                Data = Icons.ID.Renzokuken_Seperator, Pos = new Rectangle(r.X + 80, r.Y, w, r.Height), Scale = new Vector2(scale)
            };
            ITEM[Count - 2, 0] = new Icon {
                Data = Icons.ID.Renzokuken_Seperator, Pos = new Rectangle(r.X + 208, r.Y, w, r.Height), Scale = new Vector2(scale)
            };
            hotspot            = new Rectangle(r.X + 80 + (w / 2), r.Y + 4, 208 - 80, r.Height - 8);
            ITEM[Count - 4, 0] = new Texture {
                Data = pixel, Pos = hotspot, Color = Color.TransparentBlack
            };
            hotspot.Width += (int)(hotspot.Width * .50f);
            tr             = new Rectangle(r.X + 208 + (w / 2), r.Y + 4, 0, r.Height - 4);
        }
Exemplo n.º 3
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;
        }
Exemplo n.º 4
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();
                    }
                }
            }
Exemplo n.º 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();
                    }
                }
            }