public SkinningWeightsPropertyEditor(IPropertyEditorParams editorParams) : base(editorParams)
 {
     editorParams.DefaultValueGetter = () => new SkinningWeights();
     indexEditors   = new NumericEditBox[4];
     weightsSliders = new ThemedAreaSlider[4];
     foreach (var o in editorParams.Objects)
     {
         var prop = new Property <SkinningWeights>(o, editorParams.PropertyName).Value;
     }
     for (var i = 0; i <= 3; i++)
     {
         indexEditors[i]      = editorParams.NumericEditBoxFactory();
         indexEditors[i].Step = 1;
         weightsSliders[i]    = new ThemedAreaSlider(range: new Vector2(0, 1), labelFormat: "0.00000");
         var wrapper = new Widget {
             Layout     = new HBoxLayout(),
             LayoutCell = new LayoutCell {
                 StretchY = 0
             }
         };
         var propertyLabel = new ThemedSimpleText {
             Text       = $"Bone { char.ConvertFromUtf32(65 + i) }",
             VAlignment = VAlignment.Center,
             Padding    = new Thickness {
                 Left = 20
             },
             LayoutCell = new LayoutCell {
                 StretchX = 1.0f
             },
             ForceUncutText = false,
             OverflowMode   = TextOverflowMode.Minify,
             HitTestTarget  = false
         };
         wrapper.AddNode(propertyLabel);
         wrapper.AddNode(new Widget {
             Layout = new HBoxLayout {
                 Spacing = 4
             },
             LayoutCell = new LayoutCell {
                 StretchX = 2.0f
             },
             Nodes =
             {
                 indexEditors[i],
                 weightsSliders[i]
             }
         });
         ExpandableContent.AddNode(wrapper);
         customWarningsContainer = new Widget {
             Layout = new VBoxLayout()
         };
         ContainerWidget.AddNode(customWarningsContainer);
         var j = i;
         SetLink(i, CoalescedPropertyComponentValue(sw => sw[j].Index), CoalescedPropertyComponentValue(sw => sw[j].Weight));
     }
     CheckWarnings();
 }
 private void SetWeightValue(int index, ThemedAreaSlider slider)
 {
     DoTransaction(() => {
         SetProperty <SkinningWeights>((current) => {
             CheckWarnings();
             current[index] = new BoneWeight {
                 Index  = current[index].Index,
                 Weight = slider.Value
             };
             return(current);
         });
     });
 }