コード例 #1
0
ファイル: TargetMark.cs プロジェクト: lofcz/InGameEditExmple
        public override void drawSelf(int x, int y, PaintEventArgs e, bool debug = false)
        {
            GraphicsExt.DrawCircle(e.Graphics, new Pen(Color.Red, pen.Width), X, Y, 32, GraphicsExt.FillType.Outline);

            if (debug)
            {
                e.Graphics.DrawString(objectName + " - id: " + id.ToString(), new Font(FontFamily.GenericSerif, 10), new SolidBrush(Color.Black), X, Y);
                e.Graphics.DrawString("\nTargetID: " + targetID.ToString(), new Font(FontFamily.GenericSerif, 9), new SolidBrush(Color.Black), X, Y);
            }
        }
コード例 #2
0
ファイル: Mesh.cs プロジェクト: lofcz/InGameEditExmple
        public override void drawSelf(int x, int y, PaintEventArgs e, bool debug = false)
        {
            switch (type)
            {
            case Type.Circle:
            {
                if (!selected)
                {
                    GraphicsExt.DrawCircle(e.Graphics, pen, X, Y, (float)verticles[0].Z);
                }
                else
                {
                    GraphicsExt.DrawCircle(e.Graphics, new Pen(Color.Green, pen.Width), X, Y, (float)verticles[0].Z, GraphicsExt.FillType.Outline);
                }

                if (debug)
                {
                    e.Graphics.DrawString(objectName + " - id: " + id.ToString(), new Font(FontFamily.GenericSerif, 10), new SolidBrush(Color.Black), (float)(X - verticles[0].Z), (float)(Y - verticles[0].Z) - 16);
                    e.Graphics.DrawString("X: " + X.ToString() + "\nY: " + Y.ToString(), new Font(FontFamily.GenericSerif, 9), new SolidBrush(Color.Black), (float)(X - verticles[0].Z / 2), (float)(Y - verticles[0].Z / 2));
                }
                break;
            }
            }
        }