public void DoCategory(TreeNode_ThingCategory node, int indentLevel, int openMask)
        {
            base.OpenCloseWidget(node, indentLevel, openMask);
            base.LabelLeft(node.LabelCap, node.catDef.description, indentLevel);
            MultiCheckboxState multiCheckboxState = this.AllowanceStateOf(node);

            if (Widgets.CheckboxMulti(new Vector2(this.LabelWidth, this.curY), multiCheckboxState, this.lineHeight))
            {
                bool allow = multiCheckboxState == MultiCheckboxState.Off;
                this.filter.SetAllow(node.catDef, allow, this.forceHiddenDefs, this.hiddenSpecialFilters);
            }
            base.EndLine();
            if (node.IsOpen(openMask))
            {
                this.DoCategoryChildren(node, indentLevel + 1, openMask, false);
            }
        }
        public void DoCategory(TreeNode_ThingCategory node, int indentLevel, int openMask, Map map)
        {
            OpenCloseWidget(node, indentLevel, openMask);
            LabelLeft(node.LabelCap, node.catDef.description, indentLevel);
            MultiCheckboxState multiCheckboxState  = AllowanceStateOf(node);
            MultiCheckboxState multiCheckboxState2 = Widgets.CheckboxMulti(new Rect(LabelWidth, curY, lineHeight, lineHeight), multiCheckboxState, paintable: true);

            if (multiCheckboxState != multiCheckboxState2)
            {
                filter.SetAllow(node.catDef, multiCheckboxState2 == MultiCheckboxState.On, forceHiddenDefs, hiddenSpecialFilters);
            }
            EndLine();
            if (node.IsOpen(openMask))
            {
                DoCategoryChildren(node, indentLevel + 1, openMask, map);
            }
        }
Example #3
0
        public void DoCategory(TreeNode_ThingCategory node, int indentLevel, int openMask, Map map)
        {
            base.OpenCloseWidget(node, indentLevel, openMask);
            base.LabelLeft(node.LabelCap, node.catDef.description, indentLevel, 0f);
            MultiCheckboxState multiCheckboxState  = this.AllowanceStateOf(node);
            MultiCheckboxState multiCheckboxState2 = Widgets.CheckboxMulti(new Rect(this.LabelWidth, this.curY, this.lineHeight, this.lineHeight), multiCheckboxState, true);

            if (multiCheckboxState != multiCheckboxState2)
            {
                this.filter.SetAllow(node.catDef, multiCheckboxState2 == MultiCheckboxState.On, this.forceHiddenDefs, this.hiddenSpecialFilters);
            }
            base.EndLine();
            if (node.IsOpen(openMask))
            {
                this.DoCategoryChildren(node, indentLevel + 1, openMask, map, false);
            }
        }