Esempio n. 1
0
        public override void Draw(DevicePanel d)
        {
            if (Object.GetChild("script") != null)
            {
                return;
            }
            int  type  = Object.GetInt("pt");
            bool arrow = ((type == 1 || type == 3 || type == 10) && Object.GetInt("tm") == int.Parse(MapEditor.Instance.MapID) && Map.Instance.GetPortal(Object.GetString("tn")) != null);

            int cx = Map.Instance.CenterX;
            int cy = Map.Instance.CenterY;

            switch (Object.GetInt("pt"))
            {
            case 0:
            case 1:
            case 10:
                d.DrawCircle(cx + Object.GetInt("x"), cy + Object.GetInt("y"), Color.FromArgb(Transparency, (Selected) ? Color.Blue : Color.RoyalBlue)); break;

            case 3:
                d.DrawCircle(cx + Object.GetInt("x"), cy + Object.GetInt("y"), Color.FromArgb(Transparency, (Selected) ? Color.Blue : Color.RoyalBlue));
                d.DrawEmptyCircle(cx + Object.GetInt("x"), cy + Object.GetInt("y"), Color.FromArgb(Transparency, (Selected) ? Color.Blue : Color.RoyalBlue)); break;

            case 2:
                d.DrawBitmap(Image.GetCanvas().GetTexture(d._device), cx + Object.GetInt("x") - Image.GetVector("origin").x, cy + Object.GetInt("y") - Image.GetVector("origin").y, Image.GetCanvas().width, Image.GetCanvas().height, Selected, (Transparency == 50) ? 100 : Transparency); break;
            }

            if (arrow)
            {
                MapPortal p  = Map.Instance.GetPortal(Object.GetString("tn"));
                int       x  = p.Object.GetInt("x");
                int       y  = p.Object.GetInt("y");
                double    di = MapFoothold.Distance(Object.GetInt("x"), Object.GetInt("y"), x, y);
                if (di != 0)
                {
                    double xp = (Object.GetInt("x") * 5 + x * (di - 5)) / di;
                    double yp = (Object.GetInt("y") * 5 + y * (di - 5)) / di;
                    d.DrawArrow(Object.GetInt("x") + cx, Object.GetInt("y") + cy, (int)xp + cx, (int)yp + cy, Color.FromArgb(Transparency, (Selected) ? Color.Blue : Color.RoyalBlue));
                }
            }
        }
Esempio n. 2
0
        void Graphics_OnRender(object sender, DeviceEventArgs e)
        {
            int x = physics.x;
            int y = physics.y;

            MapEditor.Instance.ShiftX = x + Map.Instance.CenterX - 400;
            MapEditor.Instance.ShiftY = y + Map.Instance.CenterY - 300;
            if (Map.Instance != null)
            {
                Map.Instance.DrawAnimation(Graphics);
            }
            Graphics.DrawCircle(x + Map.Instance.CenterX, y + Map.Instance.CenterY, Color.Black);
        }
Esempio n. 3
0
 public override void Draw(DevicePanel d)
 {
     d.DrawCircle(GetX(), GetY(), Color.Blue);
 }
Esempio n. 4
0
 public override void Draw(DevicePanel d)
 {
     d.DrawCircle(GetX(), GetY(), Color.Blue);
 }
Esempio n. 5
0
 public override void Draw(DevicePanel d)
 {
     d.DrawCircle(GetX(), GetY(), Color.FromArgb(Transparency, (Selected) ? Color.Blue : Color.Red));
 }
Esempio n. 6
0
 public override void Draw(DevicePanel d)
 {
     d.DrawCircle(GetX(), GetY(), Color.FromArgb(Transparency, (Selected || ToolTip.Selected) ? Color.Blue : Color.MediumTurquoise));
 }
Esempio n. 7
0
 public override void Draw(DevicePanel d)
 {
     d.DrawCircle(Map.Instance.CenterX + Object.GetInt("x"), Map.Instance.CenterY + Object.GetInt("y" + ID.ToString()), Color.FromArgb(Transparency, (Selected) ? Color.Blue : Color.Green));
 }
Esempio n. 8
0
        public override void Draw(DevicePanel d)
        {
            if (Object.GetChild("script") != null) return;
            int type = Object.GetInt("pt");
            bool arrow = ((type == 1 || type == 3 || type == 10) && Object.GetInt("tm") == int.Parse(MapEditor.Instance.MapID) && Map.Instance.GetPortal(Object.GetString("tn")) != null);

            int cx = Map.Instance.CenterX;
            int cy = Map.Instance.CenterY;
            switch (Object.GetInt("pt"))
            {
                case 0:
                case 1:
                case 10:
                    d.DrawCircle(cx + Object.GetInt("x"), cy + Object.GetInt("y"), Color.FromArgb(Transparency, (Selected) ? Color.Blue : Color.RoyalBlue)); break;
                case 3:
                    d.DrawCircle(cx + Object.GetInt("x"), cy + Object.GetInt("y"), Color.FromArgb(Transparency, (Selected) ? Color.Blue : Color.RoyalBlue)); 
                    d.DrawEmptyCircle(cx + Object.GetInt("x"), cy + Object.GetInt("y"), Color.FromArgb(Transparency, (Selected) ? Color.Blue : Color.RoyalBlue)); break;
                case 2:
                    d.DrawBitmap(Image.GetCanvas().GetTexture(d._device), cx + Object.GetInt("x") - Image.GetVector("origin").x, cy + Object.GetInt("y") - Image.GetVector("origin").y, Image.GetCanvas().width, Image.GetCanvas().height, Selected, (Transparency == 50) ? 100 : Transparency); break;
            }

            if (arrow)
            {
                MapPortal p = Map.Instance.GetPortal(Object.GetString("tn"));
                int x = p.Object.GetInt("x");
                int y = p.Object.GetInt("y");
                double di = MapFoothold.Distance(Object.GetInt("x"), Object.GetInt("y"), x, y);
                if (di != 0)
                {
                    double xp = (Object.GetInt("x") * 5 + x * (di - 5)) / di;
                    double yp = (Object.GetInt("y") * 5 + y * (di - 5)) / di;
                    d.DrawArrow(Object.GetInt("x") + cx, Object.GetInt("y") + cy, (int)xp + cx, (int)yp + cy, Color.FromArgb(Transparency, (Selected) ? Color.Blue : Color.RoyalBlue));
                }
            }
        }
Esempio n. 9
0
 public override void Draw(DevicePanel d)
 {
     d.DrawCircle(GetX(), GetY(), Color.FromArgb(Transparency, (Selected) ? Color.Blue : Color.Red));
 }
Esempio n. 10
0
 public override void Draw(DevicePanel d)
 {
     d.DrawCircle(GetX(), GetY(), Color.FromArgb(Transparency, (Selected || ToolTip.Selected) ? Color.Blue : Color.MediumTurquoise));
 }
Esempio n. 11
0
 public override void Draw(DevicePanel d)
 {
     d.DrawCircle(Map.Instance.CenterX + Object.GetInt("x"), Map.Instance.CenterY + Object.GetInt("y" + ID.ToString()), Color.FromArgb(Transparency, (Selected) ? Color.Blue : Color.Green));
 }