void Awake() { R1ID = new System.Random().Next(); R2ID = R1ID - 1; windowMain.position = SlidersPlugin.windowPosition; subType = SubType.none; onlySliderValues = SlidersPlugin.onlyBodyValues; somePart = AllParts.nullPart; deleteButton = new DeleteChara(); }
public static CharacterPart GetOptions(CharacterPart prt) { foreach (var entry in allOptions) { if (GUILayout.Button(entry.Key)) { ReSet(); prt = (CharacterPart)Activator.CreateInstance(entry.Value); } } return(prt); }
void DrawOptions() { GUILayout.Label("§>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); somePart = AllParts.GetOptions(somePart); }
void SlidersWindow(int windowID) { if (Check()) { scrollView = GUILayout.BeginScrollView(scrollView, GUILayout.Width(X - 15), GUILayout.Height(Y - (Y / 10))); GUILayout.Label("New name for chara:"); charaNewName = GUILayout.TextField(charaNewName, 30); GUILayout.Label("Body|Face preset name:"); presetName = GUILayout.TextField(presetName, 30); if (GUILayout.Button("SAVE BODY")) { SavePreset(true); presetsList = PresetList(true); } if (GUILayout.Button("SAVE FACE")) { SavePreset(false); presetsList = PresetList(false); } onlySliderValues = GUILayout.Toggle(onlySliderValues, "Load the sliders only"); if (GUILayout.Button("LOAD BODY")) { presetsList = PresetList(true); subType = SubType.BodyPresets; somePart = AllParts.nullPart; } if (GUILayout.Button("LOAD FACE")) { presetsList = PresetList(false); subType = SubType.FacePresets; somePart = AllParts.nullPart; } GUILayout.Label("§>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); somePart = AllParts.GetSlider(somePart); GUILayout.Label("§>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); somePart = AllParts.GetPart(somePart); DrawOptions(); GUILayout.EndScrollView(); if (GUILayout.Button("SAVE CHAR")) { Save(); } } else if (studioChar.charInfo.Sex == 0) { GUILayout.Label("Select a female character!"); GUILayout.Label("New name for char:"); charaNewName = GUILayout.TextField(charaNewName, 30); if (GUILayout.Button("SAVE MALE CHAR")) { Save(); } DrawOptions(); } else { GUILayout.Label("Select a character!"); DrawOptions(); } GUI.DragWindow(); }