1
0
mirror of https://github.com/originalnicodr/CinematicUnityExplorer.git synced 2026-10-10 04:53:15 +08:00

Turn off the animator toggle on the bones manager when modifying one of the sliders or input fields.

This commit is contained in:
originalnicodr
2024-06-18 18:42:57 -03:00
parent d9ebe5819c
commit dae6930b43
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -16,6 +16,7 @@ namespace UnityExplorer.UI.Panels
ComponentControl rotationControl;
ComponentControl scaleControl;
public AxisComponentControl CurrentSlidingAxisControl { get; set; }
public BonesManager Owner;
// ICell
public float DefaultHeight => 25f;
@@ -26,9 +27,10 @@ namespace UnityExplorer.UI.Panels
public void Enable() => UIRoot.SetActive(true);
public void Disable() => UIRoot.SetActive(false);
public void SetBone(Transform bone){
public void SetBone(Transform bone, BonesManager bonesManager){
this.bone = bone;
boneName.text = bone.name;
Owner = bonesManager;
}
public virtual GameObject CreateContent(GameObject parent)
@@ -70,6 +72,8 @@ namespace UnityExplorer.UI.Panels
}
AxisControlOperation(control.slider.value, control.parent, control.axis);
if (Owner.turnOffAnimatorToggle.isOn) Owner.turnOffAnimatorToggle.isOn = false;
}
public void AxisControlOperation(float value, ComponentControl parent, int axis)
@@ -189,6 +193,7 @@ namespace UnityExplorer.UI.Panels
}
Owner.UpdateTransformControlValues(true);
if (Owner.Owner.turnOffAnimatorToggle.isOn) Owner.Owner.turnOffAnimatorToggle.isOn = false;
}
void IncrementInput_OnEndEdit(string value)
+1 -1
View File
@@ -65,7 +65,7 @@ namespace UnityExplorer.UI.Panels
}
Transform bone = bones[index];
cell.SetBone(bone);
cell.SetBone(bone, this);
cell.UpdateTransformControlValues(true);
}