コード例 #1
0
 private void tbEntity_ButtonClick(int idx, int radio_group)
 {
     if (radio_group == 1)
     {
         if (idx == 2)
         {
             this.Toolbar.SetItemPushed(303, false);
             this.raise_FlagChanged(FlagType.LOCK_SELECTION, false);
         }
         this.Toolbar.SetItemPushed(idx, true);
         this.raise_ModeChanged(idx);
     }
     else if (radio_group == 2)
     {
         this.raise_DecalAction(idx);
     }
     else if (radio_group == 3)
     {
         this.raise_Action(idx);
     }
     else
     {
         Toolbar toolbar = this.Toolbar;
         bool    flag    = ((!toolbar.GetItemPushed(idx)) ? 1 : 0) != 0;
         toolbar.SetItemPushed(idx, flag);
         this.raise_FlagChanged((FlagType)idx, flag);
     }
 }
コード例 #2
0
        private void tbBrush_ButtonClick(int idx, int radio_group)
        {
            if (radio_group == 1)
            {
                this.BrushType = idx;
                this.raise_BrushTypeChanged(this.BrushType);
                if (idx != 7)
                {
                    if (idx != 1)
                    {
                        this.tbBrush.SetGroupEnable(2, true);
                        this.tbBrush.SetItemPushed(this.propFalloffType, true);
                        this.tbBrush.SetItemEnable(200, true);
                        this.tbBrush.SetItemPushed(200, this.Additive);
                        this.raise_VertexFlagChanged(200, this.Additive);
                        goto IL_DB;
                    }
                    this.tbBrush.SetGroupPushed(2, false);
                    this.tbBrush.SetGroupEnable(2, false);
                }
                else
                {
                    this.tbBrush.SetGroupEnable(2, true);
                    this.tbBrush.SetItemPushed(this.propFalloffType, true);
                }
                this.tbBrush.SetItemPushed(200, false);
                this.tbBrush.SetItemEnable(200, false);
IL_DB:
                this.tbBrush.SetItemEnable(201, true);
                this.tbBrush.SetItemPushed(201, this.LockHeight);
                this.raise_VertexFlagChanged(201, this.LockHeight);
            }
            else if (radio_group == 2)
            {
                this.tbBrush.SetItemPushed(idx, true);
                this.raise_BrushFalloffTypeChanged(idx);
            }
            else if (radio_group == 3)
            {
                Toolbar toolbar = this.tbBrush;
                bool    flag    = ((!toolbar.GetItemPushed(idx)) ? 1 : 0) != 0;
                toolbar.SetItemPushed(idx, flag);
                int additive;
                if (flag && idx == 200)
                {
                    additive = 1;
                }
                else
                {
                    additive = 0;
                }
                this.Additive = (additive != 0);
                int lockHeight;
                if (flag && idx == 201)
                {
                    lockHeight = 1;
                }
                else
                {
                    lockHeight = 0;
                }
                this.LockHeight = (lockHeight != 0);
                this.raise_VertexFlagChanged(idx, flag);
            }
            else if (radio_group == 4)
            {
                this.tbBrush.SetItemPushed(idx, true);
                if (idx == 24)
                {
                    this.tbBrush.SetGroupEnable(2, true);
                    this.tbBrush.SetItemPushed(this.propFalloffType, true);
                    this.tbBrush.SetItemEnable(200, true);
                    this.tbBrush.SetItemPushed(200, this.Additive);
                    this.raise_VertexFlagChanged(200, this.Additive);
                }
                else
                {
                    this.tbBrush.SetGroupPushed(2, false);
                    this.tbBrush.SetGroupEnable(2, false);
                    this.tbBrush.SetItemPushed(200, false);
                    this.tbBrush.SetItemEnable(200, false);
                }
                this.tbBrush.SetItemPushed(201, false);
                this.tbBrush.SetItemEnable(201, false);
                this.propSelectionType = idx;
                this.raise_SelectionTypeChanged(idx);
            }
            else if (radio_group == 5)
            {
                this.raise_InvertSelection();
            }
        }