Exemple #1
0
 // Token: 0x06000156 RID: 342 RVA: 0x0000F200 File Offset: 0x0000D400
 public static void UpdateColors()
 {
     MenuComponent._OutlineBorderBlack     = ColorUtilities.getColor("_OutlineBorderBlack");
     MenuComponent._OutlineBorderLightGray = ColorUtilities.getColor("_OutlineBorderLightGray");
     MenuComponent._OutlineBorderDarkGray  = ColorUtilities.getColor("_OutlineBorderDarkGray");
     MenuComponent._FillLightBlack         = ColorUtilities.getColor("_FillLightBlack");
     MenuComponent._Accent1 = ColorUtilities.getColor("_Accent1");
     MenuComponent._Accent2 = ColorUtilities.getColor("_Accent2");
 }
Exemple #2
0
        // Token: 0x06000206 RID: 518 RVA: 0x00013764 File Offset: 0x00011964
        public static void UpdateColors()
        {
            Prefab._MenuTabStyle.normal.textColor    = ColorUtilities.getColor("_MenuTabOff");
            Prefab._MenuTabStyle.onNormal.textColor  = ColorUtilities.getColor("_MenuTabOn");
            Prefab._MenuTabStyle.hover.textColor     = ColorUtilities.getColor("_MenuTabHover");
            Prefab._MenuTabStyle.onHover.textColor   = ColorUtilities.getColor("_MenuTabOn");
            Prefab._MenuTabStyle.active.textColor    = ColorUtilities.getColor("_MenuTabOn");
            Prefab._MenuTabStyle.onActive.textColor  = ColorUtilities.getColor("_MenuTabOn");
            Prefab._MenuTabStyle.focused.textColor   = ColorUtilities.getColor("_MenuTabOff");
            Prefab._MenuTabStyle.onFocused.textColor = ColorUtilities.getColor("_MenuTabOff");
            Prefab._TextStyle.normal.textColor       = ColorUtilities.getColor("_TextStyleOff");
            Prefab._TextStyle.onNormal.textColor     = ColorUtilities.getColor("_TextStyleOn");
            Prefab._TextStyle.hover.textColor        = ColorUtilities.getColor("_TextStyleHover");
            Prefab._TextStyle.onHover.textColor      = ColorUtilities.getColor("_TextStyleOn");
            Prefab._TextStyle.active.textColor       = ColorUtilities.getColor("_TextStyleOn");
            Prefab._TextStyle.onActive.textColor     = ColorUtilities.getColor("_TextStyleOn");
            Prefab._TextStyle.focused.textColor      = ColorUtilities.getColor("_TextStyleOff");
            Prefab._TextStyle.onFocused.textColor    = ColorUtilities.getColor("_TextStyleOff");
            Prefab._HeaderStyle.normal.textColor     = ColorUtilities.getColor("_HeaderStyle");
            Prefab._listStyle.normal.textColor       = ColorUtilities.getColor("_TextStyleOn");
            Prefab._listStyle.onNormal.textColor     = ColorUtilities.getColor("_TextStyleOn");
            Prefab._listStyle.hover.textColor        = ColorUtilities.getColor("_OutlineBorderBlack");
            Prefab._ButtonStyle.normal.textColor     = ColorUtilities.getColor("_TextStyleOn");
            Prefab._ButtonStyle.onNormal.textColor   = ColorUtilities.getColor("_TextStyleOn");
            Prefab._ButtonStyle.hover.textColor      = ColorUtilities.getColor("_OutlineBorderBlack");
            Prefab._ButtonStyle.onHover.textColor    = ColorUtilities.getColor("_OutlineBorderBlack");
            Texture2D texture2D = new Texture2D(1, 1);

            texture2D.SetPixel(0, 0, ColorUtilities.getColor("_TextStyleHover"));
            texture2D.Apply();
            Prefab._ButtonStyle.hover.background = texture2D;
            Texture2D texture2D2 = new Texture2D(1, 1);

            texture2D2.SetPixel(0, 0, ColorUtilities.getColor("_ButtonBG"));
            texture2D2.Apply();
            Prefab._ButtonStyle.normal.background = texture2D2;
            Texture2D texture2D3 = new Texture2D(1, 1);

            texture2D3.SetPixel(0, 0, ColorUtilities.getColor("_TextStyleOn"));
            texture2D3.Apply();
            Prefab._ButtonStyle.active.background = texture2D3;
            Prefab._listStyle.hover.background    = texture2D3;
            Prefab._listStyle.onHover.background  = texture2D3;
            Prefab._listStyle.normal.background   = texture2D2;
            Prefab._listStyle.onNormal.background = texture2D2;
            Prefab._ToggleBoxBG = ColorUtilities.getColor("_ToggleBoxBG");
        }
Exemple #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;
     }
 }
 // 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;
     }
 }
Exemple #5
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);
        }
Exemple #6
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);
            });
        }