Example #1
0
 // Token: 0x06000044 RID: 68 RVA: 0x00006A00 File Offset: 0x00004C00
 public static void Tab()
 {
     Prefab.ScrollView(new Rect(0f, 0f, 611f, 370f), "Бинды чата", ref ChatCMD.HotkeyScroll, delegate()
     {
         GUILayout.Space(10f);
         foreach (KeyValuePair <string, Hotkey> keyValuePair in HotkeyOptions.ChatKeys)
         {
             ChatCMD.DrawButton(keyValuePair.Key);
         }
     }, 20);
     GUILayout.Space(380f);
     GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>());
     if (Prefab.Button("Добавить", 75f, 25f) && !HotkeyOptions.ChatKeys.ContainsKey(ChatCMD.NewKey))
     {
         HotkeyOptions.ChatKeys.Add(ChatCMD.NewKey, new Hotkey
         {
             Keys = new KeyCode[0],
             Name = ChatCMD.NewKey
         });
     }
     GUILayout.Space(10f);
     GUILayout.BeginVertical(Array.Empty <GUILayoutOption>());
     GUILayout.Space(5f);
     ChatCMD.NewKey = Prefab.TextField(ChatCMD.NewKey, "Текст: ", 477f);
     GUILayout.EndVertical();
     GUILayout.EndHorizontal();
     if (Prefab.Button("Бинды", new Rect(0f, 0f, 100f, 21f)))
     {
         HotkeyTab.chat = !HotkeyTab.chat;
     }
 }
Example #2
0
 // Token: 0x06000101 RID: 257 RVA: 0x0000CF94 File Offset: 0x0000B194
 public static void Tab()
 {
     if (HotkeyTab.chat)
     {
         ChatCMD.Tab();
         return;
     }
     Prefab.ScrollView(new Rect(0f, 0f, 611f, 406f), "Бинды", ref HotkeyTab.HotkeyScroll, delegate()
     {
         foreach (KeyValuePair <string, Dictionary <string, Hotkey> > keyValuePair in HotkeyOptions.HotkeyDict)
         {
             if (!HotkeyTab.IsFirst)
             {
                 HotkeyTab.DrawSpacer(keyValuePair.Key, false);
             }
             else
             {
                 HotkeyTab.IsFirst = false;
                 HotkeyTab.DrawSpacer(keyValuePair.Key, true);
             }
             foreach (KeyValuePair <string, Hotkey> keyValuePair2 in keyValuePair.Value)
             {
                 HotkeyTab.DrawButton(keyValuePair2.Value.Name, keyValuePair2.Key);
             }
         }
     }, 20);
     if (Prefab.Button("Чат команды", new Rect(0f, 0f, 100f, 21f)))
     {
         HotkeyTab.chat = !HotkeyTab.chat;
     }
 }
 // Token: 0x06000257 RID: 599 RVA: 0x00016118 File Offset: 0x00014318
 public static void DrawSkins(SkinOptionList OptionList)
 {
     Prefab.SectionTabButton(OptionList.Type.ToString(), delegate
     {
         GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>());
         GUILayout.Space(60f);
         SkinsUtilities.SearchString = Prefab.TextField(SkinsUtilities.SearchString, "Поиск:", 480f);
         GUILayout.EndHorizontal();
         Rect area    = new Rect(70f, 40f, 540f, 395f);
         string title = OptionList.Type.ToString();
         Prefab.ScrollView(area, title, ref SkinsUtilities.ScrollPos, new System.Action(base.method_0), 20);
     }, 0f, 20);
 }
Example #4
0
 // Token: 0x06000269 RID: 617 RVA: 0x00016868 File Offset: 0x00014A68
 public static void Tab()
 {
     Prefab.ScrollView(new Rect(0f, 0f, 395f, 406f), "СТАТИСТИКА", ref StatsTab.ScrollPos, delegate()
     {
         for (int i = 0; i < StatsTab.StatLabels.Length; i++)
         {
             if (Prefab.Button(StatsTab.StatLabels[i], 350f, 25f))
             {
                 StatsTab.Selected = i;
             }
             GUILayout.Space(3f);
         }
     }, 20);
     Prefab.MenuArea(new Rect(400f, 0f, 196f, 406f), "Изменить", delegate
     {
         if (StatsTab.Selected == 0)
         {
             return;
         }
         string text = StatsTab.StatLabels[StatsTab.Selected];
         int num;
         if (!SteamUserStats.GetStat(StatsTab.StatNames[StatsTab.Selected], out num))
         {
             return;
         }
         GUILayout.Label(text, Prefab._TextStyle, Array.Empty <GUILayoutOption>());
         GUILayout.Space(4f);
         GUILayout.Label(string.Format("Текущее: {0}", num), Prefab._TextStyle, Array.Empty <GUILayoutOption>());
         GUILayout.Space(3f);
         StatsTab.Amount = Prefab.TextField(StatsTab.Amount, "Изменение: ", 50f);
         GUILayout.Space(2f);
         int num2;
         if (int.TryParse(StatsTab.Amount, out num2))
         {
             if (Prefab.Button("Добавить", 75f, 25f))
             {
                 for (int i = 1; i <= num2; i++)
                 {
                     SteamUserStats.SetStat(StatsTab.StatNames[StatsTab.Selected], num + i);
                 }
                 SteamUserStats.StoreStats();
             }
             return;
         }
     });
 }
Example #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);
            });
        }
Example #6
0
 // Token: 0x060001FE RID: 510 RVA: 0x000130F0 File Offset: 0x000112F0
 public static void Tab()
 {
     Prefab.ScrollView(new Rect(0f, 0f, 611f, 275f), "Игроки", ref PlayersTab.PlayersScroll, delegate()
     {
         for (int i = 0; i < Provider.clients.Count; i++)
         {
             Player player = Provider.clients[i].player;
             if (!(player == Player.player) && !(player == null))
             {
                 bool flag   = FriendUtilities.IsFriendly(player);
                 bool flag2  = MiscOptions.SpectatedPlayer == player;
                 bool flag3  = false;
                 bool flag4  = player == PlayersTab.SelectedPlayer;
                 string text = flag ? "<color=#00ff00ff>" : string.Empty;
                 if (Prefab.Button(string.Concat(new string[]
                 {
                     flag4 ? "<b>" : string.Empty,
                     flag2 ? "<color=#0000ffff>[НАБЛЮДЕНИЕ]</color> " : string.Empty,
                     text,
                     string.Format("{0}", player.name),
                     (flag || flag3) ? "</color>" : string.Empty,
                     flag4 ? "</b>" : string.Empty
                 }), 560f, 25f))
                 {
                     PlayersTab.SelectedPlayer = player;
                 }
                 GUILayout.Space(2f);
             }
         }
     }, 20);
     Prefab.MenuArea(new Rect(0f, 280f, 190f, 126f), "ОПЦИИ", delegate
     {
         if (PlayersTab.SelectedPlayer == null)
         {
             return;
         }
         CSteamID steamID = PlayersTab.SelectedPlayer.channel.owner.playerID.steamID;
         GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>());
         GUILayout.BeginVertical(Array.Empty <GUILayoutOption>());
         if (!PlayersTab.SelectedPlayer.quests.isMemberOfSameGroupAs(Player.player))
         {
             if (FriendUtilities.IsFriendly(PlayersTab.SelectedPlayer) && Prefab.Button("Убрать друга", 150f, 25f))
             {
                 FriendUtilities.RemoveFriend(PlayersTab.SelectedPlayer);
             }
             else if (Prefab.Button("Добавить друга", 150f, 25f))
             {
                 FriendUtilities.AddFriend(PlayersTab.SelectedPlayer);
             }
         }
         if (MiscOptions.SpectatedPlayer != PlayersTab.SelectedPlayer && Prefab.Button("Наблюдать", 150f, 25f))
         {
             MiscOptions.SpectatedPlayer = PlayersTab.SelectedPlayer;
         }
         if (MiscOptions.SpectatedPlayer == PlayersTab.SelectedPlayer && Prefab.Button("Прекратить наблюдение", 150f, 25f))
         {
             MiscOptions.SpectatedPlayer = null;
         }
         GUILayout.EndVertical();
         GUILayout.EndHorizontal();
     });
     Prefab.MenuArea(new Rect(196f, 280f, 415f, 126f), "ИНФО", delegate
     {
         if (PlayersTab.SelectedPlayer == null)
         {
             return;
         }
         GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>());
         GUILayout.BeginVertical(Array.Empty <GUILayoutOption>());
         GUILayout.Label("SteamID:", Array.Empty <GUILayoutOption>());
         GUILayout.TextField(PlayersTab.SelectedPlayer.channel.owner.playerID.steamID.ToString(), Prefab._TextStyle, Array.Empty <GUILayoutOption>());
         GUILayout.Space(2f);
         GUILayout.TextField("Местонахождение: " + LocationUtilities.GetClosestLocation(PlayersTab.SelectedPlayer.transform.position).name, Prefab._TextStyle, Array.Empty <GUILayoutOption>());
         GUILayout.Label("Оружие: " + ((PlayersTab.SelectedPlayer.equipment.asset != null) ? PlayersTab.SelectedPlayer.equipment.asset.itemName : "Нет оружия"), Prefab._TextStyle, Array.Empty <GUILayoutOption>());
         GUILayout.Label("Машина: " + ((PlayersTab.SelectedPlayer.movement.getVehicle() != null) ? PlayersTab.SelectedPlayer.movement.getVehicle().asset.name : "Нет машины"), Prefab._TextStyle, Array.Empty <GUILayoutOption>());
         GUILayout.Label("Члены группы: " + Provider.clients.Count((SteamPlayer c) => c.player != PlayersTab.SelectedPlayer && c.player.quests.isMemberOfSameGroupAs(PlayersTab.SelectedPlayer)), Prefab._TextStyle, Array.Empty <GUILayoutOption>());
         GUILayout.EndVertical();
         GUILayout.EndHorizontal();
     });
 }