Example #1
0
        private void LegacyWindow(int id)
        {
            _scrollPosition = GUILayout.BeginScrollView(_scrollPosition, _gloSlider);
            GUILayout.BeginVertical();
            {
                DrawHeader();

                foreach (var mod in (_onlyShowAdditional ? _boneControllerMgr.Modifiers.Where(x => _addedBones.Contains(x.BoneName)) : _boneControllerMgr.Modifiers))
                {
                    GUILayout.BeginVertical(UnityEngine.GUI.skin.box);
                    {
#if KK
                        var modData = mod.GetModifier(MakerAPI.GetCurrentCoordinateType());
#elif EC
                        var modData = mod.GetModifier(KoikatsuCharaFile.ChaFileDefine.CoordinateType.School01);
#endif
                        var v3  = modData.ScaleModifier;
                        var len = modData.LengthModifier;

                        GUILayout.BeginHorizontal(_gloSlider);
                        {
                            GUILayout.Label(mod.BoneName, _gsLabel, GUILayout.Width(BoneNameWidth));

                            v3.x = GUILayout.HorizontalSlider(v3.x, 0f, 2f, _gsButtonReset, _gsButtonReset, _gloSliderWidth, _gloHeight);
                            v3.y = GUILayout.HorizontalSlider(v3.y, 0f, 2f, _gsButtonReset, _gsButtonReset, _gloSliderWidth, _gloHeight);
                            v3.z = GUILayout.HorizontalSlider(v3.z, 0f, 2f, _gsButtonReset, _gsButtonReset, _gloSliderWidth, _gloHeight);

                            len = GUILayout.HorizontalSlider(len, 0.1f, 2f, _gsButtonReset, _gsButtonReset, _gloSliderWidth, _gloHeight);

                            if (GUILayout.Button("X", _gsButtonReset, _gloWidth30, _gloHeight))
                            {
                                v3  = Vector3.one;
                                len = 1f;
                            }

                            modData.ScaleModifier  = v3;
                            modData.LengthModifier = len;
                        }
                        GUILayout.EndHorizontal();

                        GUILayout.BeginHorizontal(_gloSlider);
                        {
                            //GUILayout.Label("X / Y / Z / Length", gs_Label, GUILayout.Width(BoneNameWidth));
                            if (GUILayout.Toggle(mod.IsCoordinateSpecific(), "Per coordinate", GUILayout.Width(BoneNameWidth)))
                            {
                                mod.MakeCoordinateSpecific();
                            }
                            else
                            {
                                mod.MakeNonCoordinateSpecific();
                            }

                            float.TryParse(GUILayout.TextField(v3.x.ToString(CultureInfo.InvariantCulture), _gsInput, _gloSliderWidth, _gloHeight), out v3.x);
                            float.TryParse(GUILayout.TextField(v3.y.ToString(CultureInfo.InvariantCulture), _gsInput, _gloSliderWidth, _gloHeight), out v3.y);
                            float.TryParse(GUILayout.TextField(v3.z.ToString(CultureInfo.InvariantCulture), _gsInput, _gloSliderWidth, _gloHeight), out v3.z);

                            float.TryParse(GUILayout.TextField(len.ToString(CultureInfo.InvariantCulture), _gsInput, _gloSliderWidth, _gloHeight), out len);

                            GUILayout.Space(30);

                            modData.ScaleModifier  = v3;
                            modData.LengthModifier = Mathf.Max(len, 0.1f);
                        }
                        GUILayout.EndHorizontal();
                    }
                    GUILayout.EndVertical();
                }
            }
            GUILayout.EndVertical();
            GUILayout.EndScrollView();

            UnityEngine.GUI.DragWindow();
        }