Exemplo n.º 1
0
        private void DrawScore()
        {
            string line1 = "中 " + this.hit_sum.ToString();

            line1 = line1 + "      穿 " + this.penertrate_sum.ToString();
            line1 = line1 + "      暴 " + this.maxdamage_sum.ToString();
            string line2 = "伤 " + this.damage_sum.ToString();

            line2 = line2 + "      防 " + this.shield_sum.ToString();
            Point     init       = new Point(80, 17);
            Graphics  g          = this.CreateGraphics();
            Brush     back_brush = new SolidBrush(this.BackColor);
            Rectangle rect1      = new Rectangle(init.X, init.Y, 220, 25);
            Rectangle rect2      = new Rectangle(init.X, init.Y + 25, 220, 30);

            g.FillRectangle(back_brush, rect1);
            g.FillRectangle(back_brush, rect2);
            Color font_color, border_color;

            border_color = Color.FromArgb(10, 0, 0);
            font_color   = Color.FromArgb(50, 190, 243);

            GDIDraw.Paint_Text(line1, rect1, font_color, border_color, g, 11f);
            GDIDraw.Paint_Text(line2, rect2, font_color, border_color, g, 11f);
            g.Dispose();
            back_brush.Dispose();
        }
Exemplo n.º 2
0
        public void drawRecText()
        {
            Graphics  g            = this.CreateGraphics();
            Brush     back_brush   = new SolidBrush(this.BackColor);
            Color     border_color = Color.FromArgb(10, 0, 0);
            Rectangle rect2        = new Rectangle(120, 10, 220, 19);

            g.FillRectangle(back_brush, rect2);
            Color font_color2 = Color.FromArgb(80, 215, 120);

            GDIDraw.Paint_Text(this.rec_text, rect2, font_color2, border_color, g, 14f);
            g.Dispose();
            back_brush.Dispose();
        }
Exemplo n.º 3
0
        private void DrawSpot(string text)
        {
            Point     init       = new Point(1, 4);
            Graphics  g          = this.CreateGraphics();
            Brush     back_brush = new SolidBrush(this.BackColor);
            Rectangle rect       = new Rectangle(init.X, init.Y, 100, 30);

            g.FillRectangle(back_brush, rect);
            Color font_color, border_color;

            border_color = Color.FromArgb(10, 0, 0);
            font_color   = Color.FromArgb(239, 32, 0);
            GDIDraw.Paint_Text(text, rect, font_color, border_color, g, 20f);
            g.Dispose();
            back_brush.Dispose();
        }
Exemplo n.º 4
0
        /// <summary>
        /// 绘制伤害面板上的所有伤害数据
        /// </summary>
        /// <param name="m"></param>
        void drawLabels()
        {
            Point init = new Point(1, 80);
            int   dy = 28;
            int   width = 350, height = 20;
            Color green_color, red_color, border_color;

            border_color = Color.FromArgb(10, 0, 0);
            green_color  = Color.FromArgb(80, 215, 120);
            red_color    = Color.FromArgb(255, 255, 255);

            Graphics g          = this.CreateGraphics();
            Brush    back_brush = new SolidBrush(this.BackColor);

            for (int i = 0; i < 6; i++)
            {
                Damage temp = temp_damage[i];
                if (!temp.valid)
                {
                    continue;
                }
                Rectangle rect = new Rectangle(init.X + 1, init.Y + i * dy, width, height);
                g.FillRectangle(back_brush, rect);


                Color left, right;
                if (temp_damage[i].friend)
                {
                    left  = green_color;
                    right = red_color;
                }
                else
                {
                    left  = red_color;
                    right = green_color;
                }
                GDIDraw.Paint_Text(temp.fillspace(10, temp.source), rect, left, border_color, g, 12f);
                rect.Offset(80, 0);
                GDIDraw.Paint_Text("->", rect, Color.FromArgb(255, 255, 255), border_color, g, 12f);
                rect.Offset(15, 0);
                GDIDraw.Paint_Text(temp.fillspace(10, temp.victim), rect, right, border_color, g, 12f);
                rect.Offset(100, 0);
                GDIDraw.Paint_Text(temp.GetDamageType() + "(" + temp.GetHitPartName() + ")", rect, left, border_color, g, 12f);
            }
            g.Dispose();
            back_brush.Dispose();
        }
Exemplo n.º 5
0
        private void drawRec(int alpha)
        {
            Rectangle rect       = new Rectangle(95, 0, 36, 39);
            Graphics  g          = this.CreateGraphics();
            Brush     back_brush = new SolidBrush(this.BackColor);

            g.FillRectangle(back_brush, rect);

            Color border_color = Color.FromArgb(10, 0, 0);
            Color font_color   = Color.FromArgb(alpha, 80, 215, 120);

            GDIDraw.Paint_Text("●", rect, font_color, border_color, g, 25f);

            g.Dispose();
            back_brush.Dispose();
            this.drawRecText();
        }
Exemplo n.º 6
0
        /// <summary>
        /// 绘制伤害面板上的所有伤害数据
        /// </summary>
        /// <param name="m"></param>
        void drawLabels()
        {
            Point    init = new Point(1, 36);
            int      dy = 30;
            int      width = 350, height = 25;
            Graphics g          = this.CreateGraphics();
            Brush    back_brush = new SolidBrush(this.BackColor);

            for (int i = 0; i < 6; i++)
            {
                Damage temp = temp_damage[i];
                if (!temp.valid)
                {
                    return;
                }
                Rectangle rect = new Rectangle(init.X + 1, init.Y + i * dy, width, height);
                g.FillRectangle(back_brush, rect);
                Color font_color, border_color;
                border_color = Color.FromArgb(10, 0, 0);
                if (temp_damage[i].friend)
                {
                    font_color = Color.FromArgb(80, 215, 120);
                }
                else
                {
                    font_color = Color.FromArgb(239, 32, 0);
                }
                GDIDraw.Paint_Text(temp.fillspace(10, temp.source), rect, font_color, border_color, g, 14f);
                rect.Offset(115, 0);
                GDIDraw.Paint_Text("->", rect, font_color, border_color, g, 14f);
                rect.Offset(30, 0);
                GDIDraw.Paint_Text(temp.fillspace(10, temp.victim), rect, font_color, border_color, g, 14f);
                rect.Offset(115, 0);
                GDIDraw.Paint_Text(temp.GetDamageType(), rect, font_color, border_color, g, 14f);
            }
            g = null;
            back_brush.Dispose();
        }