internal void UpdateFromBrush(IMyVoxelBrush shape)
 {
     Elements.Clear();
     Elements.Add(m_labelSettings);
     foreach (var control in shape.GetGuiControls())
     {
         Elements.Add(control);
     }
     Elements.Add(OKButton);
 }
 internal void UpdateFromBrush(IMyVoxelBrush shape)
 {
     Elements.Clear();
     Elements.Add(m_labelSettings);
     foreach (var control in shape.GetGuiControls())
     {
         Elements.Add(control);
     }
     Elements.Add(OKButton);
 }
        public void UpdateControls()
        {
            IMyVoxelBrush shape = null;

            if (Item.Definition.Id.SubtypeName == "Box")
            {
                shape = MyBrushBox.Static;
            }
            else if (Item.Definition.Id.SubtypeName == "Capsule")
            {
                shape = MyBrushCapsule.Static;
            }
            else if (Item.Definition.Id.SubtypeName == "Ramp")
            {
                shape = MyBrushRamp.Static;
            }
            else if (Item.Definition.Id.SubtypeName == "Sphere")
            {
                shape = MyBrushSphere.Static;
            }
            else if (Item.Definition.Id.SubtypeName == "AutoLevel")
            {
                shape = MyBrushAutoLevel.Static;
            }

            if (shape != null)
            {
                Elements.Clear();
                Elements.Add(m_labelSettings);

                foreach (var control in shape.GetGuiControls())
                {
                    Elements.Add(control);
                }

                Elements.Add(OKButton);
            }
        }