示例#1
0
 public static void DrawBoxOutlines(Vector2 position, Vector2 size, Color color)
 {
     CustomCanvas.DrawBox(new Vector2(position.x, position.y), new Vector2(size.x, position.y), color); // top
     CustomCanvas.DrawBox(new Vector2(position.x, position.y), new Vector2(position.x, size.y), color); // left
     CustomCanvas.DrawBox(new Vector2(size.x, position.y), new Vector2(size.x, size.y), color);         // right
     CustomCanvas.DrawBox(new Vector2(position.x, size.y), new Vector2(size.x, size.y), color);         // bottom
 }
示例#2
0
        } // dis is exact bounds

        public static void ESPBOX(Vector2 BoxTop, Vector2 BoxBottom, float Width, Color color)                                                            // this is 2D outline rect
        {
            CustomCanvas.DrawLine(new Vector2((int)(BoxTop.x - Width), (int)BoxTop.y), new Vector2((int)(BoxTop.x + Width - 1), (int)BoxTop.y), color);   // TOP
            CustomCanvas.DrawLine(new Vector2((int)(BoxTop.x - Width), (int)BoxTop.y), new Vector2((int)(BoxTop.x - Width), (int)BoxBottom.y), color);    // Left
            CustomCanvas.DrawLine(new Vector2((int)(BoxTop.x + Width), (int)BoxTop.y), new Vector2((int)(BoxTop.x + Width), (int)BoxBottom.y), color);    // Right
            CustomCanvas.DrawLine(new Vector2((int)(BoxTop.x - Width), (int)BoxBottom.y), new Vector2((int)(BoxTop.x + Width), (int)BoxBottom.y), color); // Bottom
        }
示例#3
0
        public static void DrawCrosshair()
        {
            float sx = Screen.width / 2 + 1f;
            float sy = Screen.height / 2 + 1f;

            CustomCanvas.DrawLine(new Vector2(sx, sy - 20f), new Vector2(sx, sy + 20f), Color.yellow);
            CustomCanvas.DrawLine(new Vector2(sx - 20f, sy), new Vector2(sx + 20f, sy), Color.yellow);
        }
示例#4
0
        public static void HeliosBox(float sx, float sy)
        {
            sx += 1f;
            sy += 1f;
            Color color = new Color((float)byte.MaxValue, (float)byte.MaxValue, 0.0f);

            CustomCanvas.DrawLine(new Vector2(sx - 20f, sy - 20f), new Vector2(sx + 20f, sy - 20f), color);
            CustomCanvas.DrawLine(new Vector2(sx + 20f, sy - 20f), new Vector2(sx + 20f, sy + 20f), color);
            //CustomCanvas.DrawLine(new Vector2(sx, sy - 20f), new Vector2(sx, sy + 20f), color);
            //CustomCanvas.DrawLine(new Vector2(sx - 20f, sy), new Vector2(sx + 20f, sy), color);
            CustomCanvas.DrawLine(new Vector2(sx - 20f, sy + 20f), new Vector2(sx + 20f, sy + 20f), color);
            CustomCanvas.DrawLine(new Vector2(sx - 20f, sy - 20f), new Vector2(sx - 20f, sy + 20f), color);
        }
示例#5
0
        public static void DrawString(Vector2 pos, Color color, CustomCanvas.TextFlags flags, string text)
        {
            bool center = (flags & CustomCanvas.TextFlags.TEXT_FLAG_CENTERED) == CustomCanvas.TextFlags.TEXT_FLAG_CENTERED;

            if ((flags & CustomCanvas.TextFlags.TEXT_FLAG_OUTLINED) == CustomCanvas.TextFlags.TEXT_FLAG_OUTLINED)
            {
                CustomCanvas.DrawStringInternal(pos + new Vector2(1f, 0.0f), Color.black, text, center);
                CustomCanvas.DrawStringInternal(pos + new Vector2(0.0f, 1f), Color.black, text, center);
                CustomCanvas.DrawStringInternal(pos + new Vector2(0.0f, -1f), Color.black, text, center);
            }
            if ((flags & CustomCanvas.TextFlags.TEXT_FLAG_DROPSHADOW) == CustomCanvas.TextFlags.TEXT_FLAG_DROPSHADOW)
            {
                CustomCanvas.DrawStringInternal(pos + new Vector2(1f, 1f), Color.black, text, center);
            }
            CustomCanvas.DrawStringInternal(pos, color, text, center);
        }
示例#6
0
 public static void ESPBOX_Outlined(Vector2 BoxTop, Vector2 BoxBottom, float Width, Color color)
 {
     BoxTop       = CastVectorInt(BoxTop);
     BoxBottom    = CastVectorInt(BoxBottom);
     Width        = (int)Width;
     BoxTop.y    -= 1;
     BoxBottom.y += 1;
     Width       -= 1;
     CustomCanvas.ESPBOX(BoxTop, BoxBottom, Width, new Color(0, 0, 0));
     BoxTop.y    += 2;
     BoxBottom.y -= 2;
     Width       += 2;
     CustomCanvas.ESPBOX(BoxTop, BoxBottom, Width, new Color(0, 0, 0));
     BoxTop.y    -= 1;
     BoxBottom.y += 1;
     Width       -= 1;
     CustomCanvas.ESPBOX(BoxTop, BoxBottom, Width, color);
 }
示例#7
0
 public static void HeliosBox() // ugly AA looking lock box.
 {
     CustomCanvas.HeliosBox((float)(Screen.width / 2), (float)(Screen.height / 2));
 }