Иконка ресурса

FREE IQChat : 2.14.54 2.14.54

Нет прав для скачивания
C#:
using Facepunch;
using Oxide.Core.Plugins;
using CompanionServer;
using UnityEngine;
using System;
using Newtonsoft.Json;
using System.Linq;
using Oxide.Core.Libraries;
using System.IO;
using System.Text.RegularExpressions;
using Oxide.Core;
using UnityEngine.Networking;
using Oxide.Core.Libraries.Covalence;
using Newtonsoft.Json.Linq;
using System.Text;
using Oxide.Game.Rust.Cui;
using System.Collections.Generic;
using System.Collections;
using ConVar;
///Скачано с дискорд сервера Rust Edit [PRO+]
///discord.gg/9vyTXsJyKR
namespace Oxide.Plugins {
    [Info("IQChat", "discord.gg/9vyTXsJyKR", "2.14.54")]
    [Description("The most pleasant chat for your server from the IQ system")]
    class IQChat : RustPlugin {
        public void AnwserMessage(BasePlayer player, String Message) {
            Configuration.AnswerMessage Anwser = config.AnswerMessages;
            if (!Anwser.UseAnswer) return;
            foreach (KeyValuePair<String, Configuration.LanguageController> Anwsers in Anwser.AnswerMessageList) if (Message.Contains(Anwsers.Key.ToLower())) ReplySystem(player, GetMessages(player, Anwsers.Value.LanguageMessages));
        }
        private String GetMessageInArgs(BasePlayer Sender, String[] arg) {
            if (arg == null || arg.Length == 0) {
                if (Sender != null) ReplySystem(Sender, GetLang("FUNC_MESSAGE_NO_ARG_BROADCAST", Sender.UserIDString));
                else PrintWarning(GetLang("FUNC_MESSAGE_NO_ARG_BROADCAST"));
                return null;
            }
            String Message = String.Empty;
            foreach (String msg in arg) Message += " " + msg;
            return Message;
        }
        private class InterfaceBuilder {
            public static InterfaceBuilder Instance;
            public const String UI_Chat_Context = "UI_IQCHAT_CONTEXT";
            public const String UI_Chat_Context_Visual_Nick = "UI_IQCHAT_CONTEXT_VISUAL_NICK";
            public const String UI_Chat_Alert = "UI_IQCHAT_ALERT";
            public Dictionary<String, String> Interfaces;
            public InterfaceBuilder() {
                Instance = this;
                Interfaces = new Dictionary<String, String>();
                BuildingStaticContext();
                BuildingVisualNick();
                BuildingCheckBox();
                BuildingModerationStatic();
                BuildingMuteAllChat();
                BuildingMuteAllVoice();
                BuildingSlider();
                BuildingSliderUpdateArgument();
                BuildingDropList();
                BuildingOpenDropList();
                BuildingElementDropList();
                BuildingElementDropListTakeLine();
                BuildingAlertUI();
                BuildingMuteAndIgnore();
                BuildingMuteAndIgnorePlayerPanel();
                BuildingMuteAndIgnorePlayer();
                BuildingMuteAndIgnorePages();
                BuildingMuteAndIgnorePanelAlert();
                BuildingIgnoreAlert();
                BuildingMuteAlert();
                BuildingMuteAlert_DropList_Title();
                BuildingMuteAlert_DropList_Reason();
            }
            public static void AddInterface(String name, String json) {
                if (Instance.Interfaces.ContainsKey(name)) {
                    _.PrintError($"Error! Tried to add existing cui elements! -> {name}");
                    return;
                }
                Instance.Interfaces.Add(name, json);
            }
            public static string GetInterface(String name) {
                string json = string.Empty;
                if (Instance.Interfaces.TryGetValue(name, out json) == false) {
                    _.PrintWarning($"Warning! UI elements not found by name! -> {name}");
                }
                return json;
            }
            public static void DestroyAll() {
                for (var i = 0; i < BasePlayer.activePlayerList.Count; i++) {
                    var player = BasePlayer.activePlayerList[i];
                    CuiHelper.DestroyUi(player, UI_Chat_Context);
                    CuiHelper.DestroyUi(player, UI_Chat_Context_Visual_Nick);
                    CuiHelper.DestroyUi(player, UI_Chat_Alert);
                    CuiHelper.DestroyUi(player, "MUTE_AND_IGNORE_PANEL_ALERT");
                }
            }
            private void BuildingVisualNick() {
                CuiElementContainer container = new CuiElementContainer();
                container.Add(new CuiElement {
                    Name = UI_Chat_Context_Visual_Nick, Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%NICK_DISPLAY%", Font = "robotocondensed-regular.ttf", FontSize = 7, Align = TextAnchor.MiddleLeft, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-135.769 -89.558", OffsetMax = "-12.644 -77.176"
                        }
                    }
                }
                );
                AddInterface("UI_Chat_Context_Visual_Nick", container.ToJson());
            }
            private void BuildingStaticContext() {
                Configuration.ControllerParameters Controller = config.ControllerParameter;
                if(Controller == null) {
                    _.PrintWarning("Ошибка генерации интерфейса, null значение в конфигурации, свяжитесь с разработчиком");
                    return;
                }
                CuiElementContainer container = new CuiElementContainer();
                container.Add(new CuiPanel {
                    CursorEnabled = true, RectTransform = {
                        AnchorMin = "1 0.5", AnchorMax = "1 0.5", OffsetMin = "-379 -217", OffsetMax = "-31 217"
                    }
                    , Image = {
                        Color = "0 0 0 0"
                    }
                }
                , "Overlay", UI_Chat_Context);
                container.Add(new CuiElement {
                    Name = "ImageContext", Parent = UI_Chat_Context, Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = "%IMG_BACKGROUND%"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0 0", AnchorMax = "1 1"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "TitleLabel", Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%TITLE%", Font = "robotocondensed-regular.ttf", FontSize = 17, Align = TextAnchor.MiddleLeft, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-149.429 166.408", OffsetMax = "-14.788 189.564"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "DescriptionLabel", Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%SETTING_ELEMENT%", Font = "robotocondensed-regular.ttf", FontSize = 8, Align = TextAnchor.MiddleLeft, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-149.429 112.021", OffsetMax = "152.881 131.787"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "InformationLabel", Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%INFORMATION%", Font = "robotocondensed-regular.ttf", FontSize = 8, Align = TextAnchor.MiddleLeft, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-149.429 -53.432", OffsetMax = "-32.905 -39.808"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "InformationIcon", Parent = UI_Chat_Context, Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_INFORMATION_ICON")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-14.788 -52.12", OffsetMax = "-3.788 -41.12"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "SettingLabel", Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%SETTINGS%", Font = "robotocondensed-regular.ttf", FontSize = 8, Align = TextAnchor.MiddleLeft, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "11.075 -53.432", OffsetMax = "126.125 -39.808"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "SettingIcon", Parent = UI_Chat_Context, Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_SETTING_ICON")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "141.88 -52.12", OffsetMax = "152.88 -41.12"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "SettingPM", Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%SETTINGS_PM%", Font = "robotocondensed-regular.ttf", FontSize = 8, Align = TextAnchor.MiddleLeft, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "11.075 -70.712", OffsetMax = "126.125 -57.088"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "SettingAlertChat", Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%SETTINGS_ALERT%", Font = "robotocondensed-regular.ttf", FontSize = 8, Align = TextAnchor.MiddleLeft, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "11.075 -82.412", OffsetMax = "126.125 -68.788"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "SettingNoticyChat", Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%SETTINGS_ALERT_PM%", Font = "robotocondensed-regular.ttf", FontSize = 8, Align = TextAnchor.MiddleLeft, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "11.075 -94.412", OffsetMax = "126.125 -80.788"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "SettingSoundAlert", Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%SETTINGS_SOUNDS%", Font = "robotocondensed-regular.ttf", FontSize = 8, Align = TextAnchor.MiddleLeft, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "11.075 -106.412", OffsetMax = "126.125 -92.788"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "MuteStatus", Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%MUTE_STATUS_PLAYER%", Font = "robotocondensed-regular.ttf", FontSize = 11, Align = TextAnchor.MiddleCenter, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-143.174 -131.59", OffsetMax = "-120.611 -114.967"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "MuteStatusTitle", Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%MUTE_STATUS_TITLE%", Font = "robotocondensed-regular.ttf", FontSize = 7, Align = TextAnchor.MiddleCenter, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-143.174 -141.429", OffsetMax = "-89.127 -132.508"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "CountIgnored", Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%IGNORED_STATUS_COUNT%", Font = "robotocondensed-regular.ttf", FontSize = 7, Align = TextAnchor.UpperLeft, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-66.98 -131.715", OffsetMax = "-11.09 -116.831"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "IgonoredTitle", Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%IGNORED_STATUS_TITLE%", Font = "robotocondensed-regular.ttf", FontSize = 7, Align = TextAnchor.UpperLeft, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-66.98 -142.04", OffsetMax = "-19.967 -132.537"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "IgnoredIcon", Parent = UI_Chat_Context, Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_IGNORE_INFO_ICON")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-19.483 -115.225", OffsetMax = "-11.762 -107.814"
                        }
                    }
                }
                );
                container.Add(new CuiButton {
                    RectTransform = {
                        AnchorMin = "0 0", AnchorMax = "1 1"
                    }
                    , Button = {
                        Command = $"newui.cmd action.mute.ignore open {SelectedAction.Ignore}", Color = "0 0 0 0"
                    }
                    , Text = {
                        Text = ""
                    }
                }
                , "IgnoredIcon", "CLOSE_IGNORED");
                container.Add(new CuiElement {
                    Name = "TitleNickPanel", Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%NICK_DISPLAY_TITLE%", Font = "robotocondensed-regular.ttf", FontSize = 10, Align = TextAnchor.MiddleLeft, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-135.769 -78.878", OffsetMax = "-85.632 -64.613"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "NickTitle", Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%SLIDER_NICK_COLOR_TITLE%", Font = "robotocondensed-regular.ttf", FontSize = 10, Align = TextAnchor.MiddleLeft, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "22.591 76.362", OffsetMax = "80.629 92.278"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "ChatMessageTitle", Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%SLIDER_MESSAGE_COLOR_TITLE%", Font = "robotocondensed-regular.ttf", FontSize = 10, Align = TextAnchor.MiddleLeft, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-136.591 9.362", OffsetMax = "-78.045 24.278"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "PrefixTitle", Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%SLIDER_PREFIX_TITLE%", Font = "robotocondensed-regular.ttf", FontSize = 10, Align = TextAnchor.MiddleLeft, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-136.591 77.362", OffsetMax = "-89.949 93.278"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "RankTitle", Parent = UI_Chat_Context, Components = {
                        new CuiTextComponent {
                            Text = "%SLIDER_IQRANK_TITLE%", Font = "robotocondensed-regular.ttf", FontSize = 10, Align = TextAnchor.MiddleLeft, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "22.825 9.242", OffsetMax = "81.375 25.158"
                        }
                    }
                }
                );
                container.Add(new CuiButton {
                    RectTransform = {
                        AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "123.62 166", OffsetMax = "153.62 196"
                    }
                    , Button = {
                        Close = UI_Chat_Context, Color = "0 0 0 0"
                    }
                    , Text = {
                        Text = ""
                    }
                }
                , UI_Chat_Context, "CLOSE_UI_Chat_Context");
                AddInterface("UI_Chat_Context", container.ToJson());
            }
            private void BuildingCheckBox() {
                CuiElementContainer container = new CuiElementContainer();
                container.Add(new CuiElement {
                    Name = "%NAME_CHECK_BOX%", Parent = UI_Chat_Context, Components = {
                        new CuiRawImageComponent {
                            Color = "%COLOR%", Png = ImageUi.GetImage("IQCHAT_ELEMENT_SETTING_CHECK_BOX")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "%OFFSET_MIN%", OffsetMax = "%OFFSET_MAX%"
                        }
                    }
                }
                );
                container.Add(new CuiButton {
                    RectTransform = {
                        AnchorMin = "0 0", AnchorMax = "1 1"
                    }
                    , Button = {
                        Command = "%COMMAND_TURNED%", Color = "0 0 0 0"
                    }
                    , Text = {
                        Text = ""
                    }
                }
                , "%NAME_CHECK_BOX%", "CHECK_BOX_TURNED");
                AddInterface("UI_Chat_Context_CheckBox", container.ToJson());
            }
            private void BuildingSlider() {
                CuiElementContainer container = new CuiElementContainer();
                String NameSlider = "%NAME%";
                container.Add(new CuiElement {
                    Name = NameSlider, Parent = UI_Chat_Context, Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_ELEMENT_SLIDER_ICON")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "%OFFSET_MIN%" , OffsetMax = "%OFFSET_MAX%"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "Left", Parent = NameSlider, Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_ELEMENT_SLIDER_LEFT_ICON")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-53.9 -4.5", OffsetMax = "-48.9 4.5"
                        }
                    }
                }
                );
                container.Add(new CuiButton {
                    RectTransform = {
                        AnchorMin = "0 0", AnchorMax = "1 1"
                    }
                    , Button = {
                        Command = "%COMMAND_LEFT_SLIDE%", Color = "0 0 0 0"
                    }
                    , Text = {
                        Text = ""
                    }
                }
                , "Left", "LEFT_SLIDER_BTN");
                container.Add(new CuiElement {
                    Name = "Right", Parent = NameSlider, Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_ELEMENT_SLIDER_RIGHT_ICON")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "48.92 -4.5", OffsetMax = "53.92 4.5"
                        }
                    }
                }
                );
                container.Add(new CuiButton {
                    RectTransform = {
                        AnchorMin = "0 0", AnchorMax = "1 1"
                    }
                    , Button = {
                        Command = "%COMMAND_RIGHT_SLIDE%", Color = "0 0 0 0"
                    }
                    , Text = {
                        Text = ""
                    }
                }
                , "Right", "RIGHT_SLIDER_BTN");
                AddInterface("UI_Chat_Slider", container.ToJson());
            }
            private void BuildingSliderUpdateArgument() {
                CuiElementContainer container = new CuiElementContainer();
                String ParentSlider = "%PARENT%";
                String NameArgument = "%NAME%";
                container.Add(new CuiElement {
                    Name = NameArgument, Parent = ParentSlider, Components = {
                        new CuiTextComponent {
                            Text = "%ARGUMENT%", Font = "robotocondensed-regular.ttf", FontSize = 9, Align = TextAnchor.MiddleCenter, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-41.929 -6.801", OffsetMax = "41.929 6.801"
                        }
                    }
                }
                );
                AddInterface("UI_Chat_Slider_Update_Argument", container.ToJson());
            }
            private void BuildingMuteAndIgnore() {
                CuiElementContainer container = new CuiElementContainer();
                container.Add(new CuiElement {
                    Name = "MuteAndIgnoredPanel", Parent = UI_Chat_Context, Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_MUTE_AND_IGNORE_PANEL")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-1007.864 -220.114", OffsetMax = "-167.374 219.063"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "TitlesPanel", Parent = "MuteAndIgnoredPanel", Components = {
                        new CuiTextComponent {
                            Text = "%TITLE%", Font = "robotocondensed-regular.ttf", FontSize = 20, Align = TextAnchor.MiddleRight, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "60.217 164.031", OffsetMax = "356.114 190.962"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "IconPanel", Parent = "MuteAndIgnoredPanel", Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_MUTE_AND_IGNORE_ICON")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "357.5 170", OffsetMax = "373.5 185"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "SearchPanel", Parent = "MuteAndIgnoredPanel", Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_MUTE_AND_IGNORE_SEARCH")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-385.8 161.244", OffsetMax = "-186.349 192.58"
                        }
                    }
                }
                );
                string SearchName = "";
                container.Add(new CuiElement {
                    Parent = "SearchPanel", Name = "SearchPanel" + ".Input.Current", Components = {
                        new CuiInputFieldComponent {
                            Text = SearchName, FontSize = 14, Command = $"newui.cmd action.mute.ignore search.controller %ACTION_TYPE% {SearchName}", Align = TextAnchor.MiddleCenter, Color = "1 1 1 0.5", CharsLimit = 15
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0 0", AnchorMax = "1 1"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "PanelPages", Parent = "MuteAndIgnoredPanel", Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_MUTE_AND_IGNORE_PAGE_PANEL")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-179.196 161.242", OffsetMax = "-121.119 192.578"
                        }
                    }
                }
                );
                AddInterface("UI_Chat_Mute_And_Ignore", container.ToJson());
            }
            private void BuildingMuteAndIgnorePlayerPanel() {
                CuiElementContainer container = new CuiElementContainer();
                container.Add(new CuiPanel {
                    CursorEnabled = true, RectTransform = {
                        AnchorMin = "0 0", AnchorMax = "1 0.85"
                    }
                    , Image = {
                        Color = "0 0 0 0"
                    }
                }
                , "MuteAndIgnoredPanel", "MuteIgnorePanelContent");
                AddInterface("UI_Chat_Mute_And_Ignore_Panel_Content", container.ToJson());
            }
            private void BuildingMuteAndIgnorePlayer() {
                CuiElementContainer container = new CuiElementContainer();
                container.Add(new CuiElement {
                    Name = "PANEL_PLAYER", Parent = "MuteIgnorePanelContent", Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_MUTE_AND_IGNORE_PLAYER")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "%OFFSET_MIN%", OffsetMax = "%OFFSET_MAX%"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "NickName", Parent = "PANEL_PLAYER", Components = {
                        new CuiTextComponent {
                            Text = "%DISPLAY_NAME%", Font = "robotocondensed-regular.ttf", FontSize = 12, Align = TextAnchor.MiddleLeft, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-77.391 -17.245", OffsetMax = "91.582 17.244"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "StatusPanel", Parent = "PANEL_PLAYER", Components = {
                        new CuiRawImageComponent {
                            Color = "%COLOR%", Png = ImageUi.GetImage("IQCHAT_MUTE_AND_IGNORE_PLAYER_STATUS")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-92.231 -11.655", OffsetMax = "-87.503 10.44"
                        }
                    }
                }
                );
                container.Add(new CuiButton {
                    RectTransform = {
                        AnchorMin = "0 0", AnchorMax = "1 1"
                    }
                    , Button = {
                        Command = "%COMMAND_ACTION%", Color = "0 0 0 0"
                    }
                    , Text = {
                        Text = ""
                    }
                }
                , "PANEL_PLAYER");
                AddInterface("UI_Chat_Mute_And_Ignore_Player", container.ToJson());
            }
            private void BuildingMuteAndIgnorePages() {
                CuiElementContainer container = new CuiElementContainer();
                container.Add(new CuiElement {
                    Name = "PageCount", Parent = "PanelPages", Components = {
                        new CuiTextComponent {
                            Text = "%PAGE%", Font = "robotocondensed-regular.ttf", FontSize = 14, Align = TextAnchor.MiddleCenter, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-11.03 -15.668", OffsetMax = "11.03 15.668"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "LeftPage", Parent = "PanelPages", Components = {
                        new CuiRawImageComponent {
                            Color = "%COLOR_LEFT%", Png = ImageUi.GetImage("IQCHAT_ELEMENT_SLIDER_LEFT_ICON")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-18 -7", OffsetMax = "-13 6"
                        }
                    }
                }
                );
                container.Add(new CuiButton {
                    RectTransform = {
                        AnchorMin = "0 0", AnchorMax = "1 1"
                    }
                    , Button = {
                        Command = "%COMMAND_LEFT%", Color = "0 0 0 0"
                    }
                    , Text = {
                        Text = ""
                    }
                }
                , "LeftPage");
                container.Add(new CuiElement {
                    Name = "RightPage", Parent = "PanelPages", Components = {
                        new CuiRawImageComponent {
                            Color = "%COLOR_RIGHT%", Png = ImageUi.GetImage("IQCHAT_ELEMENT_SLIDER_RIGHT_ICON")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "14 -7", OffsetMax = "19 6"
                        }
                    }
                }
                );
                container.Add(new CuiButton {
                    RectTransform = {
                        AnchorMin = "0 0", AnchorMax = "1 1"
                    }
                    , Button = {
                        Command = "%COMMAND_RIGHT%", Color = "0 0 0 0"
                    }
                    , Text = {
                        Text = ""
                    }
                }
                , "RightPage");
                AddInterface("UI_Chat_Mute_And_Ignore_Pages", container.ToJson());
            }
            private void BuildingMuteAndIgnorePanelAlert() {
                CuiElementContainer container = new CuiElementContainer();
                container.Add(new CuiPanel {
                    CursorEnabled = true, RectTransform = {
                        AnchorMin = "0 0", AnchorMax = "1 1"
                    }
                    , Image = {
                        Color = "0 0 0 0.25", Material = "assets/content/ui/uibackgroundblur-ingamemenu.mat"
                    }
                }
                , "Overlay", "MUTE_AND_IGNORE_PANEL_ALERT");
                container.Add(new CuiButton {
                    RectTransform = {
                        AnchorMin = "0 0", AnchorMax = "1 1"
                    }
                    , Button = {
                        Close = "MUTE_AND_IGNORE_PANEL_ALERT", Color = "0 0 0 0"
                    }
                    , Text = {
                        Text = ""
                    }
                }
                , "MUTE_AND_IGNORE_PANEL_ALERT");
                AddInterface("UI_Chat_Mute_And_Ignore_Alert_Panel", container.ToJson());
            }
            private void BuildingMuteAlert() {
                CuiElementContainer container = new CuiElementContainer();
                container.Add(new CuiElement {
                    Name = "AlertMute", Parent = "MUTE_AND_IGNORE_PANEL_ALERT", Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_MUTE_ALERT_PANEL")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-199.832 -274.669", OffsetMax = "199.832 274.669"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "AlertMuteIcon", Parent = "AlertMute", Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_MUTE_ALERT_ICON")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-67 204.8", OffsetMax = "67 339.8"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "AlertMuteTitles", Parent = "AlertMute", Components = {
                        new CuiTextComponent {
                            Text = "%TITLE%", Font = "robotocondensed-regular.ttf", FontSize = 25, Align = TextAnchor.MiddleCenter, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-199.828 142.57", OffsetMax = "199.832 179.43"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "AlertMuteTakeChat", Parent = "AlertMute", Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_IGNORE_ALERT_BUTTON_YES")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-99.998 87.944", OffsetMax = "100.002 117.944"
                        }
                    }
                }
                );
                container.Add(new CuiButton {
                    RectTransform = {
                        AnchorMin = "0 0", AnchorMax = "1 1"
                    }
                    , Button = {
                        Command = "%COMMAND_TAKE_ACTION_MUTE_CHAT%", Color = "0 0 0 0"
                    }
                    , Text = {
                        Text = "%BUTTON_TAKE_CHAT_ACTION%", Align = TextAnchor.MiddleCenter, FontSize = 18, Color = "0.1294118 0.145098 0.1647059 1"
                    }
                }
                , "AlertMuteTakeChat", "BUTTON_TAKE_CHAT");
                container.Add(new CuiElement {
                    Name = "AlertMuteTakeVoice", Parent = "AlertMute", Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_IGNORE_ALERT_BUTTON_YES")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-100 49.70", OffsetMax = "100 79.70"
                        }
                        //
                    }
                }
                );
                container.Add(new CuiButton {
                    RectTransform = {
                        AnchorMin = "0 0", AnchorMax = "1 1"
                    }
                    , Button = {
                        Command = "%COMMAND_TAKE_ACTION_MUTE_VOICE%", Color = "0 0 0 0"
                    }
                    , Text = {
                        Text = "%BUTTON_TAKE_VOICE_ACTION%", Align = TextAnchor.MiddleCenter, FontSize = 18, Color = "0.1294118 0.145098 0.1647059 1"
                    }
                }
                , "AlertMuteTakeVoice", "BUTTON_TAKE_VOICE");
                AddInterface("UI_Chat_Mute_Alert", container.ToJson());
            }
            private void BuildingMuteAlert_DropList_Title() {
                CuiElementContainer container = new CuiElementContainer();
                container.Add(new CuiElement {
                    Name = "AlertMuteTitleReason", Parent = "AlertMute", Components = {
                        new CuiTextComponent {
                            Text = "%TITLE%", Font = "robotocondensed-regular.ttf", FontSize = 22, Align = TextAnchor.MiddleCenter, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-199.828 -9.430", OffsetMax = "199.832 27.430"
                        }
                    }
                }
                );
                container.Add(new CuiPanel {
                    CursorEnabled = false, Image = {
                        Color = "1 1 1 0"
                    }
                    , RectTransform = {
                        AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-147.497 -265.5440", OffsetMax = "147.503 -24.70"
                    }
                }
                , "AlertMute", "PanelMuteReason");
                AddInterface("UI_Chat_Mute_Alert_DropList_Title", container.ToJson());
            }
            private void BuildingMuteAlert_DropList_Reason() {
                CuiElementContainer container = new CuiElementContainer();
                container.Add(new CuiElement {
                    Name = "Reason", Parent = "PanelMuteReason", Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_MUTE_ALERT_PANEL_REASON")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "%OFFSET_MIN%", OffsetMax = "%OFFSET_MAX%"
                        }
                    }
                }
                );
                container.Add(new CuiButton {
                    RectTransform = {
                        AnchorMin = "0 0", AnchorMax = "1 1"
                    }
                    , Button = {
                        Command = "%COMMAND_REASON%", Color = "0 0 0 0"
                    }
                    , Text = {
                        Text = "%REASON%", Align = TextAnchor.MiddleCenter, FontSize = 13, Color = "1 1 1 1"
                    }
                }
                , "Reason");
                AddInterface("UI_Chat_Mute_Alert_DropList_Reason", container.ToJson());
            }
            private void BuildingIgnoreAlert() {
                CuiElementContainer container = new CuiElementContainer();
                container.Add(new CuiElement {
                    Name = "AlertIgnore", Parent = "MUTE_AND_IGNORE_PANEL_ALERT", Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_IGNORE_ALERT_PANEL")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-236.5 -134", OffsetMax = "236.5 134"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "AlertIgnoreIcon", Parent = "AlertIgnore", Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_IGNORE_ALERT_ICON")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-66.5 64.8", OffsetMax = "66.5 198.8"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "AlertIgnoreTitle", Parent = "AlertIgnore", Components = {
                        new CuiTextComponent {
                            Text = "%TITLE%", Font = "robotocondensed-regular.ttf", FontSize = 22, Align = TextAnchor.UpperCenter, Color = "1 1 1 1"
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-231 -55.003268", OffsetMax = "229.421 33.983268"
                        }
                    }
                }
                );
                container.Add(new CuiElement {
                    Name = "AlertIgnoreYes", Parent = "AlertIgnore", Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_IGNORE_ALERT_BUTTON_YES")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "-178 -115", OffsetMax = "-22 -77"
                        }
                    }
                }
                );
                container.Add(new CuiButton {
                    RectTransform = {
                        AnchorMin = "0 0", AnchorMax = "1 1"
                    }
                    , Button = {
                        Close = "MUTE_AND_IGNORE_PANEL_ALERT", Command = "%COMMAND%", Color = "0 0 0 0"
                    }
                    , Text = {
                        Text = "%BUTTON_YES%", Align = TextAnchor.MiddleCenter, FontSize = 18, Color = "0.1294118 0.145098 0.1647059 1"
                    }
                }
                , "AlertIgnoreYes", "BUTTON_YES");
                container.Add(new CuiElement {
                    Name = "AlertIgnoreNo", Parent = "AlertIgnore", Components = {
                        new CuiRawImageComponent {
                            Color = "1 1 1 1", Png = ImageUi.GetImage("IQCHAT_IGNORE_ALERT_BUTTON_NO")
                        }
                        , new CuiRectTransformComponent {
                            AnchorMin = "0.5 0.5", AnchorMax = "0.5 0.5", OffsetMin = "22 -115", OffsetMax = "178 -77"
                        }
                    }
                }
                );
                container.Add(new CuiButton {
                    RectTransform = {
                        AnchorMin = "0 0", Anc
// ... [Code preview truncated due to length. Full source in attached file] ...

Автор
15FPS
Скачиваний
0
Просмотры
1
Первый выпуск
Обновление
Оценка
0.00 звёзд 0 оценок
Сверху