Example #1
0
        public ChannelViewBuilder()
        {
            CategoryNodeView quickSettingsNode = CreateCategories("Quick Settings");

            _newChannelEnabledNode = AddCheckbox("Enable New Channel By Default", LogFilter.Instance.IsChannelEnabledByDefault(), OnChannelEnableByDefaultChanged, quickSettingsNode);
            _nonChannelEnabledNode = AddCheckbox("Show Non-Channel Logs", LogFilter.Instance.IsShowNonChannel(), OnShowNonChannelChanged, quickSettingsNode);
            AddButton("Enable All", "action", EnableAll, quickSettingsNode);
            AddButton("Disable All", "action", DisableAll, quickSettingsNode);
            _channelCategoryNode = CreateCategories("Channels");
        }
Example #2
0
        protected CategoryNodeView CreateCategory(string name, string icon, string iconClose, string id, Node parentNode)
        {
            CategoryNodeView node = (CategoryNodeView)parentNode.FindChildByName(name);

            if (node == null)
            {
                node            = new CategoryNodeView();
                node.name       = name;
                node.icon       = icon;
                node.iconClose  = iconClose;
                node.id         = id;
                node.expandable = true;
                node.callback  += OnCategoryToggled;
                parentNode.AddNode(node);
            }
            return(node);
        }
Example #3
0
        public CommandViewBuilder(List <Command> commands)
        {
            _commands = commands;
            foreach (var command in _commands)
            {
                CategoryNodeView currentNode = CreateCategories(command.info.categories);
                AddButton(command.info.name, "command", OnCommandSelected, currentNode);
            }

            CategoryPlayerPrefs.LoadCategoryStates(_rootNode, ClassName);

            if (LogConsoleSettings.Instance.useCategoryColor)
            {
                NodeColor.AdjustIconColor(_rootNode);
            }

            _rootNode.Sort(DefaultCompareNode);
        }