public static int ShowBoneMapping(int shownBodyView, AvatarControl.BodyPartFeedback bodyPartCallback, AvatarSetupTool.BoneWrapper[] bones, SerializedObject serializedObject, AvatarMappingEditor editor)
{
GUILayout.BeginHorizontal(new GUILayoutOption[0]);
GUILayout.FlexibleSpace();
if (AvatarControl.styles.Silhouettes[shownBodyView].image)
{
Rect rect = GUILayoutUtility.GetRect(AvatarControl.styles.Silhouettes[shownBodyView], GUIStyle.none, new GUILayoutOption[]
{
GUILayout.MaxWidth((float)AvatarControl.styles.Silhouettes[shownBodyView].image.width)
});
AvatarControl.DrawBodyParts(rect, shownBodyView, bodyPartCallback);
for (int i = 0; i < bones.Length; i++)
{
AvatarControl.DrawBone(shownBodyView, i, rect, bones[i], serializedObject, editor);
}
}
else
{
GUILayout.Label("texture missing,\nfix me!", new GUILayoutOption[0]);
}
GUILayout.FlexibleSpace();
GUILayout.EndHorizontal();
Rect lastRect = GUILayoutUtility.GetLastRect();
string[] array = new string[]
{
"Body",
"Head",
"Left Hand",
"Right Hand"
};
lastRect.x += 5f;
lastRect.width = 70f;
lastRect.yMin = lastRect.yMax - 69f;
lastRect.height = 16f;
for (int j = 0; j < array.Length; j++)
{
if (GUI.Toggle(lastRect, shownBodyView == j, array[j], EditorStyles.miniButton))
{
shownBodyView = j;
}
lastRect.y += 16f;
}
return(shownBodyView);
}