public bool Draw(ParamCharaController controller) { bool changedEnabled = false; bool changedParams = false; ParamHipCustom param = controller.paramCustom.paramHip; //Enabled GUI.skin.label.fontSize = 12; changedEnabled = enabled.Draw(ref param.enabled, Style.ToggleMiddle); GUILayout.Space(Style.defaultSpace); //Gravity changedParams = changedParams | gravity.Draw(ref param.gravity); /*Hip1 * GUILayout.Label(ParamHipCustom.Bones[0], Style.LabedMiddle); * changedParams = changedParams | irc01.Draw(ref param.paramBones[ParamHipCustom.Bones[0]].IsRotationCalc); * changedParams = changedParams | damping01.Draw(ref param.paramBones[ParamHipCustom.Bones[0]].Damping); * changedParams = changedParams | elasticity01.Draw(ref param.paramBones[ParamHipCustom.Bones[0]].Elasticity); * changedParams = changedParams | stiffness01.Draw(ref param.paramBones[ParamHipCustom.Bones[0]].Stiffness); * changedParams = changedParams | inert01.Draw(ref param.paramBones[ParamHipCustom.Bones[0]].Inert); */ //Hip2 GUILayout.Label(ParamHipCustom.Bones[1], Style.LabedMiddleSubject); GUILayout.Space(Style.defaultSpace); GUI.skin.label.fontSize = 12; changedParams = changedParams | irc02.Draw(ref param.paramBones[ParamHipCustom.Bones[1]].IsRotationCalc); changedParams = changedParams | damping02.Draw(ref param.paramBones[ParamHipCustom.Bones[1]].Damping); changedParams = changedParams | elasticity02.Draw(ref param.paramBones[ParamHipCustom.Bones[1]].Elasticity); changedParams = changedParams | stiffness02.Draw(ref param.paramBones[ParamHipCustom.Bones[1]].Stiffness); changedParams = changedParams | inert02.Draw(ref param.paramBones[ParamHipCustom.Bones[1]].Inert); GUILayout.Space(Style.defaultSpace); if (changedEnabled) { controller.changedInfo.SetInfo(ChaFileDefine.CoordinateType.School01, ParamCharaController.ParamsKind.Hip, true, false); } else if (changedParams) { controller.changedInfo.SetInfo(ChaFileDefine.CoordinateType.School01, ParamCharaController.ParamsKind.Hip, false, true); } return(changedParams | changedEnabled); }
public bool Draw(ParamCharaController controller, ChaFileDefine.CoordinateType coordinate, ParamCharaController.ParamsKind kind) { if (controller.paramCustom == null) { return(false); } //ParamBustCustom param ParamBustCustom param = null; if (kind == ParamCharaController.ParamsKind.Naked) { param = controller.paramCustom.paramBustNaked; } else if (kind == ParamCharaController.ParamsKind.Bra || kind == ParamCharaController.ParamsKind.Tops) { param = controller.paramCustom.paramBust[coordinate][kind]; } else { return(false); } bool changedEnabled = false; bool changedParam = false; //Enabled changedEnabled = enabled.Draw(ref param.enabled, Style.ToggleMiddle); //GUILayout.Label("Parameters", Style.LabedMiddleSubject); GUILayout.Space(Style.defaultSpace); changedParam = changedParam | gravity.Draw(ref param.gravity); /*Bust01 * GUILayout.Label(ParamBustCustom.Bones[0],Style.LabedMiddle); * irc01.Draw(); //If IsRotationCalc of Bust01 changed, bust animation is broken. * changedParam = changedParam | damping01.Draw(ref param.paramBones[ParamBustCustom.Bones[0]].Damping); * changedParam = changedParam | elasticity01.Draw(ref param.paramBones[ParamBustCustom.Bones[0]].Elasticity); * changedParam = changedParam | stiffness01.Draw(ref param.paramBones[ParamBustCustom.Bones[0]].Stiffness); * changedParam = changedParam | inert01.Draw(ref param.paramBones[ParamBustCustom.Bones[0]].Inert); * GUILayout.Space(Style.defaultSpace); */ //Bust02 GUILayout.Label(ParamBustCustom.Bones[1], Style.LabedMiddleSubject); GUILayout.Space(Style.defaultSpace); GUI.skin.label.fontSize = 12; changedParam = changedParam | irc02.Draw(ref param.paramBones[ParamBustCustom.Bones[1]].IsRotationCalc); changedParam = changedParam | damping02.Draw(ref param.paramBones[ParamBustCustom.Bones[1]].Damping); changedParam = changedParam | elasticity02.Draw(ref param.paramBones[ParamBustCustom.Bones[1]].Elasticity); changedParam = changedParam | stiffness02.Draw(ref param.paramBones[ParamBustCustom.Bones[1]].Stiffness); changedParam = changedParam | inert02.Draw(ref param.paramBones[ParamBustCustom.Bones[1]].Inert); GUILayout.Space(Style.defaultSpace); //Bust03 GUILayout.Label(ParamBustCustom.Bones[2], Style.LabedMiddleSubject); GUILayout.Space(Style.defaultSpace); GUI.skin.label.fontSize = 12; changedParam = changedParam | irc03.Draw(ref param.paramBones[ParamBustCustom.Bones[2]].IsRotationCalc); changedParam = changedParam | damping03.Draw(ref param.paramBones[ParamBustCustom.Bones[2]].Damping); changedParam = changedParam | elasticity03.Draw(ref param.paramBones[ParamBustCustom.Bones[2]].Elasticity); changedParam = changedParam | stiffness03.Draw(ref param.paramBones[ParamBustCustom.Bones[2]].Stiffness); changedParam = changedParam | inert03.Draw(ref param.paramBones[ParamBustCustom.Bones[2]].Inert); GUILayout.Space(Style.defaultSpace); if (changedEnabled) { controller.changedInfo.SetInfo(coordinate, kind, true, false); } else if (changedParam) { controller.changedInfo.SetInfo(coordinate, kind, false, true); } return(changedParam | changedEnabled); }