// Token: 0x06000291 RID: 657 RVA: 0x00017940 File Offset: 0x00015B40
 public void OnGUI()
 {
     if (!DrawUtilities.ShouldRun())
     {
         return;
     }
     if (WeaponComponent.MainCamera == null)
     {
         WeaponComponent.MainCamera = Camera.main;
     }
     if (WeaponOptions.NoSway && Player.player.animator != null)
     {
         Player.player.animator.viewSway = Vector3.zero;
     }
     if (Event.current.type == EventType.Repaint)
     {
         if (WeaponOptions.ShowWeaponInfo)
         {
             ItemAsset asset = Player.player.equipment.asset;
             if (asset == null)
             {
                 return;
             }
             string content = asset.itemName;
             GUI.depth = 0;
             if (asset is ItemWeaponAsset)
             {
                 ItemWeaponAsset itemWeaponAsset = (ItemWeaponAsset)asset;
                 content = string.Format("{0}\nДальность: {1}\nУрон: {2}", itemWeaponAsset.itemName, itemWeaponAsset.range, itemWeaponAsset.playerDamageMultiplier.damage);
             }
             DrawUtilities.DrawLabel(ESPComponent.ESPFont, LabelLocation.MiddleLeft, new Vector2((float)(Screen.width - 20), (float)(Screen.height / 2)), content, ColorUtilities.getColor("_WeaponInfoColor"), 1, 15);
         }
         return;
     }
 }
Пример #2
0
 // Token: 0x0600008D RID: 141 RVA: 0x00009278 File Offset: 0x00007478
 public static void Init()
 {
     Color[] array = new Color[]
     {
         Color.red,
         new Color(1f, 0.5f, 0f),
         new Color(0.3f, 0.5f, 1f),
         new Color(1f, 0.5f, 0f),
         Color.white,
         Color.white,
         Color.yellow,
         Color.green,
         Color.yellow,
         new Color(1f, 0.5f, 0f),
         Color.green,
         new Color(1f, 0.5f, 0f),
         new Color(0.5f, 0.9f, 0.3f)
     };
     string[] array2 = new string[]
     {
         "Игроки",
         "Зомби",
         "Предметы",
         "Турели",
         "Кровати",
         "Клейм Флаги",
         "Транспорт",
         "Ящики",
         "Генераторы",
         "Животные",
         "Растения",
         "Ловушки",
         "Аирдроп"
     };
     for (int i = 0; i < ESPOptions.VisualOptions.Length; i++)
     {
         string arg = array2[i];
         ColorUtilities.addColor(new ColorVariable(string.Format("_{0}", (ESPTarget)i), string.Format("ESP - {0}", arg), array[i], false));
         ColorUtilities.addColor(new ColorVariable(string.Format("_{0}_Info", (ESPTarget)i), string.Format("ESP - {0} (Доп инфа)", arg), Color.white, false));
         ColorUtilities.addColor(new ColorVariable(string.Format("_{0}_Glow", (ESPTarget)i), string.Format("ESP - {0} (Обводка)", arg), Color.yellow, false));
     }
     ColorUtilities.addColor(new ColorVariable("_ESPFriendly", "ESP - Игроки (Друзья)", Color.green, false));
     ColorUtilities.addColor(new ColorVariable("_ChamsFriendVisible", "Chams - Видимый друг", Color.green, false));
     ColorUtilities.addColor(new ColorVariable("_ChamsFriendInvisible", "Chams - Невидимый друг", Color.blue, false));
     ColorUtilities.addColor(new ColorVariable("_ChamsEnemyVisible", "Chams - Видимый противник", new Color32(byte.MaxValue, 165, 0, byte.MaxValue), false));
     ColorUtilities.addColor(new ColorVariable("_ChamsEnemyInvisible", "Chams - Невидимый противник", Color.red, false));
     ColorUtilities.addColor(new ColorVariable("_WeaponInfoColor", "Оружия - Информация", new Color32(0, byte.MaxValue, 0, byte.MaxValue), true));
     ColorUtilities.addColor(new ColorVariable("_OutlineText", "Текст - граница", Color.black, false));
     ColorUtilities.addColor(new ColorVariable("_OutlineBorderBlack", "Меню - граница 1", new Color32(3, 3, 3, byte.MaxValue), true));
     ColorUtilities.addColor(new ColorVariable("_OutlineBorderLightGray", "Меню - граница 2", new Color32(75, 75, 75, byte.MaxValue), true));
     ColorUtilities.addColor(new ColorVariable("_OutlineBorderDarkGray", "Меню - граница 3", new Color32(55, 55, 55, byte.MaxValue), true));
     ColorUtilities.addColor(new ColorVariable("_FillLightBlack", "Меню - заполнение", new Color32(30, 30, 30, byte.MaxValue), true));
     ColorUtilities.addColor(new ColorVariable("_Accent1", "Меню - цвет 1", new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue), true));
     ColorUtilities.addColor(new ColorVariable("_Accent2", "Меню - цвет 2", new Color32(244, 244, 244, byte.MaxValue), true));
     ColorUtilities.addColor(new ColorVariable("_MenuTabOff", "Меню Окно - Выкл", new Color32(160, 160, 160, byte.MaxValue), true));
     ColorUtilities.addColor(new ColorVariable("_MenuTabOn", "Меню Окно - Вкл", new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue), true));
     ColorUtilities.addColor(new ColorVariable("_MenuTabHover", "Меню Окно - Наведено", new Color32(210, 210, 210, byte.MaxValue), true));
     ColorUtilities.addColor(new ColorVariable("_TextStyleOff", "Меню Надписи - Выкл", new Color32(160, 160, 160, byte.MaxValue), true));
     ColorUtilities.addColor(new ColorVariable("_TextStyleOn", "Меню Надписи - Вкл", new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue), true));
     ColorUtilities.addColor(new ColorVariable("_TextStyleHover", "Меню Надписи - Наведено", new Color32(210, 210, 210, byte.MaxValue), true));
     ColorUtilities.addColor(new ColorVariable("_HeaderStyle", "Меню Зона - Заголовок", new Color32(210, 210, 210, byte.MaxValue), true));
     ColorUtilities.addColor(new ColorVariable("_ToggleBoxBG", "Меню Галочка - Фон", new Color32(71, 70, 71, byte.MaxValue), true));
     ColorUtilities.addColor(new ColorVariable("_ButtonBG", "Меню Кнопка - Фон", new Color32(130, 130, 130, byte.MaxValue), true));
     MenuComponent.UpdateColors();
 }
Пример #3
0
 public static void EnableChams()
 {
     if (ESPOptions.ChamsEnabled && ESPCoroutines.Chams != null && ESPOptions.ChamsMode < ESPCoroutines.Chams.Length)
     {
         foreach (SteamPlayer steamPlayer in Provider.clients)
         {
             Player player = steamPlayer.player;
             if (player && player != Player.player && player.gameObject)
             {
                 Color32 front  = FriendUtilities.IsFriendly(player) ? ColorUtilities.getColor("_ChamsFriendVisible") : ColorUtilities.getColor("_ChamsEnemyVisible");
                 Color32 behind = FriendUtilities.IsFriendly(player) ? ColorUtilities.getColor("_ChamsFriendInvisible") : ColorUtilities.getColor("_ChamsEnemyInvisible");
                 ESPCoroutines.DoChamsGameObject(player.gameObject, front, behind);
             }
         }
         return;
     }
 }
Пример #4
0
        // Token: 0x060000B2 RID: 178 RVA: 0x0000A2BC File Offset: 0x000084BC
        public static void DrawLabel(Font Font, LabelLocation Location, Vector2 W2SVector, string Content, Color innerColor, int borderWidth, int size)
        {
            DrawUtilities.guistyle.font = Font;
            float x;
            float y;
            Rect  rect;

            for (;;)
            {
IL_17E:
                DrawUtilities.guistyle.fontSize = size;
                DrawUtilities.tempContent.text  = Content;
                for (;;)
                {
IL_160:
                    Vector2 vector = DrawUtilities.guistyle.CalcSize(DrawUtilities.tempContent);
                    x = vector.x;
                    y = vector.y;
                    for (;;)
                    {
IL_14B:
                        rect = new Rect(0f, 0f, x, y);
                        for (;;)
                        {
IL_11C:
                            switch (Location)
                            {
                            case LabelLocation.TopRight:
                                goto IL_197;

                            case LabelLocation.TopMiddle:
                                goto IL_1C9;

                            case LabelLocation.TopLeft:
                                goto IL_203;

                            case LabelLocation.MiddleRight:
                                goto IL_237;

                            case LabelLocation.Center:
                                goto IL_269;

                            case LabelLocation.MiddleLeft:
                                goto IL_2A3;

                            case LabelLocation.BottomRight:
                                goto IL_2D7;

                            case LabelLocation.BottomMiddle:
                                goto IL_304;

                            case LabelLocation.BottomLeft:
                                goto IL_339;

                            default:
                            {
                                uint num2;
                                uint num = num2 * 230082528u ^ 1769495636u;
                                for (;;)
                                {
                                    switch ((num2 = (num ^ 1750197459u)) % 54u)
                                    {
                                    case 0u:
                                        goto IL_4BF;

                                    case 1u:
                                        goto IL_160;

                                    case 2u:
                                    case 23u:
                                        goto IL_4A0;

                                    case 3u:
                                        goto IL_370;

                                    case 4u:
                                        goto IL_2D7;

                                    case 5u:
                                        goto IL_11C;

                                    case 6u:
                                        goto IL_3E5;

                                    case 7u:
                                        goto IL_1DE;

                                    case 8u:
                                        goto IL_1C9;

                                    case 9u:
                                    case 40u:
                                        goto IL_467;

                                    case 10u:
                                        goto IL_2B2;

                                    case 11u:
                                        goto IL_32C;

                                    case 12u:
                                        goto IL_2C7;

                                    case 13u:
                                        num = (num2 * 3146714222u ^ 873170528u);
                                        continue;

                                    case 14u:
                                        goto IL_304;

                                    case 15u:
                                    case 17u:
                                    case 24u:
                                    case 28u:
                                    case 30u:
                                    case 32u:
                                    case 33u:
                                    case 48u:
                                        goto IL_366;

                                    case 18u:
                                        goto IL_3F5;

                                    case 19u:
                                    case 39u:
                                        goto IL_42E;

                                    case 20u:
                                        goto IL_3AA;

                                    case 21u:
                                        goto IL_40B;

                                    case 22u:
                                        goto IL_319;

                                    case 25u:
                                    case 41u:
                                        goto IL_17E;

                                    case 26u:
                                        goto IL_339;

                                    case 27u:
                                        goto IL_203;

                                    case 29u:
                                        goto IL_293;

                                    case 31u:
                                        goto IL_14B;

                                    case 34u:
                                        goto IL_47D;

                                    case 35u:
                                        goto IL_269;

                                    case 36u:
                                        goto IL_212;

                                    case 37u:
                                        goto IL_244;

                                    case 38u:
                                        goto IL_2A3;

                                    case 42u:
                                        goto IL_197;

                                    case 43u:
                                        goto IL_490;

                                    case 44u:
                                        goto IL_3D2;

                                    case 45u:
                                        goto IL_237;

                                    case 46u:
                                        goto IL_41E;

                                    case 47u:
                                        goto IL_259;

                                    case 49u:
                                        goto IL_38C;

                                    case 50u:
                                        goto IL_4B4;

                                    case 51u:
                                        goto IL_1F3;

                                    case 52u:
                                        goto IL_444;

                                    case 53u:
                                        goto IL_4D0;
                                    }
                                    goto Block_1;
                                }
                                break;
                            }
                            }
                        }
                    }
                }
            }
Block_1:
            return;

IL_197:
            rect.x = W2SVector.x;
            rect.y = W2SVector.y - y - 5f;
            DrawUtilities.guistyle.alignment = TextAnchor.UpperLeft;
            goto IL_366;
IL_1C9:
            rect.x = W2SVector.x - x / 2f;
IL_1DE:
            rect.y = W2SVector.y - y - 5f;
IL_1F3:
            DrawUtilities.guistyle.alignment = TextAnchor.UpperCenter;
            goto IL_366;
IL_203:
            rect.x = W2SVector.x - x;
IL_212:
            rect.y = W2SVector.y - y - 5f;
            DrawUtilities.guistyle.alignment = TextAnchor.UpperRight;
            goto IL_366;
IL_237:
            rect.x = W2SVector.x;
IL_244:
            rect.y = W2SVector.y - y / 2f;
IL_259:
            DrawUtilities.guistyle.alignment = TextAnchor.MiddleLeft;
            goto IL_366;
IL_269:
            rect.x = W2SVector.x - x / 2f;
            rect.y = W2SVector.y - y / 2f;
IL_293:
            DrawUtilities.guistyle.alignment = TextAnchor.MiddleCenter;
            goto IL_366;
IL_2A3:
            rect.x = W2SVector.x - x;
IL_2B2:
            rect.y = W2SVector.y - y / 2f;
IL_2C7:
            DrawUtilities.guistyle.alignment = TextAnchor.MiddleRight;
            goto IL_366;
IL_2D7:
            rect.x = W2SVector.x;
            rect.y = W2SVector.y + 10f;
            DrawUtilities.guistyle.alignment = TextAnchor.LowerLeft;
            goto IL_366;
IL_304:
            rect.x = W2SVector.x - x / 2f;
IL_319:
            rect.y = W2SVector.y + 10f;
IL_32C:
            DrawUtilities.guistyle.alignment = TextAnchor.LowerCenter;
            goto IL_366;
IL_339:
            rect.x = W2SVector.x - x;
            rect.y = W2SVector.y + 10f;
            DrawUtilities.guistyle.alignment = TextAnchor.LowerRight;
IL_366:
            if (!ESPOptions.TextStyle)
            {
                goto IL_4BF;
            }
IL_370:
            Rect position = rect;

            DrawUtilities.tempContent.text = DrawUtilities.regex.Replace(Content, string.Empty);
IL_38C:
            DrawUtilities.guistyle.normal.textColor = ColorUtilities.getColor(DrawUtilities.color);
IL_3AA:
            position.x -= (float)(borderWidth + 1);
            position.y -= (float)(borderWidth + 1);
            goto IL_3F5;
IL_3D2:
            position.x += 1f;
IL_3E5:
            GUI.Label(position, DrawUtilities.tempContent, DrawUtilities.guistyle);
IL_3F5:
            if (position.x > rect.x + (float)borderWidth)
            {
                goto IL_42E;
            }
            goto IL_3D2;
IL_40B:
            position.y += 1f;
IL_41E:
            GUI.Label(position, DrawUtilities.tempContent, DrawUtilities.guistyle);
IL_42E:
            if (position.y <= rect.y + (float)borderWidth)
            {
                goto IL_40B;
            }
            goto IL_467;
IL_444:
            position.x -= 1f;
            GUI.Label(position, DrawUtilities.tempContent, DrawUtilities.guistyle);
IL_467:
            if (position.x >= rect.x - (float)borderWidth)
            {
                goto IL_444;
            }
            goto IL_4A0;
IL_47D:
            position.y -= 1f;
IL_490:
            GUI.Label(position, DrawUtilities.tempContent, DrawUtilities.guistyle);
IL_4A0:
            if (position.y >= rect.y - (float)borderWidth)
            {
                goto IL_47D;
            }
IL_4B4:
            DrawUtilities.tempContent.text = Content;
IL_4BF:
            DrawUtilities.guistyle.normal.textColor = innerColor;
IL_4D0:
            GUI.Label(rect, DrawUtilities.tempContent, DrawUtilities.guistyle);
        }
Пример #5
0
        // Token: 0x06000083 RID: 131 RVA: 0x00008BD8 File Offset: 0x00006DD8
        public static void Tab()
        {
            ColorOptions.errorColor = new ColorVariable("errorColor", "#ERROR.NOTFOUND", Color.magenta, true);
            ColorOptions.preview    = new ColorVariable("preview", "Цвет не выбран", Color.white, true);
            if (ColorOptions.selectedOption == null)
            {
                ColorOptions.previewselected = ColorOptions.preview;
            }
            Prefab.ScrollView(new Rect(0f, 0f, 395f, 406f), "Цвета", ref ColorsTab.ColorScroll, delegate()
            {
                GUILayout.Space(10f);
                List <KeyValuePair <string, ColorVariable> > list = ColorOptions.ColorDict2.ToList <KeyValuePair <string, ColorVariable> >();
                list.Sort((KeyValuePair <string, ColorVariable> pair1, KeyValuePair <string, ColorVariable> pair2) => pair1.Value.name.CompareTo(pair2.Value.name));
                for (int i = 0; i < list.Count; i++)
                {
                    ColorVariable color = ColorUtilities.getColor(list[i].Value.identity);
                    if (Prefab.ColorButton(350f, color, 25f))
                    {
                        ColorOptions.selectedOption  = color.identity;
                        ColorOptions.previewselected = new ColorVariable(color);
                        ColorsTab.LastColorPreview1  = color.color;
                    }
                    GUILayout.Space(3f);
                }
                if (Prefab.Button("Восстановить цвета", 350f, 25f))
                {
                    for (int j = 0; j < list.Count; j++)
                    {
                        ColorVariable color2 = ColorUtilities.getColor(list[j].Value.identity);
                        color2.color         = color2.origColor;
                        MenuComponent.SetGUIColors();
                        ColorOptions.selectedOption = null;
                        ColorsTab.LastColorPreview1 = ColorOptions.preview.color;
                    }
                }
                GUILayout.Space(10f);
            }, 20);
            Rect previewRect = new Rect(400f, 0f, 211f, 120f);

            Prefab.MenuArea(previewRect, "Просмотр", delegate
            {
                Rect rect = new Rect(5f, 20f, previewRect.width - 10f, previewRect.height - 25f);
                Drawing.DrawRect(rect, MenuComponent._OutlineBorderBlack);
                Drawing.DrawRect(MenuUtilities.Inline(rect, 1f), MenuComponent._OutlineBorderLightGray);
                Rect rect2 = MenuUtilities.Inline(rect, 2f);
                Drawing.DrawRect(new Rect(rect2.x, rect2.y, rect2.width / 2f, rect2.height), ColorsTab.LastColorPreview1);
                Drawing.DrawRect(new Rect(rect2.x + rect2.width / 2f, rect2.y, rect2.width / 2f, rect2.height), ColorOptions.previewselected);
            });
            Prefab.MenuArea(new Rect(previewRect.x, previewRect.y + previewRect.height + 5f, previewRect.width, 406f - previewRect.height - 5f), ColorOptions.previewselected.name, delegate
            {
                GUILayout.BeginArea(new Rect(10f, 20f, previewRect.width - 10f, 205f));
                ColorOptions.previewselected.color.r = (int)((byte)Prefab.TextField(ColorOptions.previewselected.color.r, "R: ", 30, 0, 255));
                ColorOptions.previewselected.color.r = (int)((byte)Prefab.Slider(0f, 255f, (float)ColorOptions.previewselected.color.r, 185));
                GUILayout.FlexibleSpace();
                ColorOptions.previewselected.color.g = (int)((byte)Prefab.TextField(ColorOptions.previewselected.color.g, "G: ", 30, 0, 255));
                ColorOptions.previewselected.color.g = (int)((byte)Prefab.Slider(0f, 255f, (float)ColorOptions.previewselected.color.g, 185));
                GUILayout.FlexibleSpace();
                ColorOptions.previewselected.color.b = (int)((byte)Prefab.TextField(ColorOptions.previewselected.color.b, "B: ", 30, 0, 255));
                ColorOptions.previewselected.color.b = (int)((byte)Prefab.Slider(0f, 255f, (float)ColorOptions.previewselected.color.b, 185));
                GUILayout.FlexibleSpace();
                if (!ColorOptions.previewselected.disableAlpha)
                {
                    ColorOptions.previewselected.color.a = (int)((byte)Prefab.TextField(ColorOptions.previewselected.color.a, "A: ", 30, 0, 255));
                    ColorOptions.previewselected.color.a = (int)((byte)Prefab.Slider(0f, 255f, (float)ColorOptions.previewselected.color.a, 185));
                }
                else
                {
                    Prefab.TextField(ColorOptions.previewselected.color.a, "A: ", 30, 0, 255);
                    Prefab.Slider(0f, 255f, (float)ColorOptions.previewselected.color.a, 185);
                }
                GUILayout.Space(100f);
                GUILayout.EndArea();
                GUILayout.Space(160f);
                GUILayout.FlexibleSpace();
                if (Prefab.Button("Снять выделение", 180f, 25f))
                {
                    ColorOptions.selectedOption = null;
                    ColorsTab.LastColorPreview1 = ColorOptions.preview.color;
                }
                GUILayout.Space(3f);
                if (Prefab.Button("Восстановить", 180f, 25f))
                {
                    ColorUtilities.setColor(ColorOptions.previewselected.identity, ColorOptions.previewselected.origColor.ToColor());
                    ColorOptions.previewselected.color = ColorOptions.previewselected.origColor;
                    MenuComponent.SetGUIColors();
                }
                GUILayout.Space(3f);
                if (Prefab.Button("Применить", 180f, 25f))
                {
                    ColorUtilities.setColor(ColorOptions.previewselected.identity, ColorOptions.previewselected.color.ToColor());
                    MenuComponent.SetGUIColors();
                    ColorsTab.LastColorPreview1 = ColorOptions.previewselected.color;
                }
                GUILayout.Space(30f);
            });
        }