public static void CreateCustomControls() { // Craete controls in tabs foreach (Transform categoryTransfrom in GameObject.Find("CvsMenuTree").transform) { CreateCustomControlsInCategory(categoryTransfrom); } // Create sidebar controls if (_sidebarEntries.Any()) { var sidebarTop = GameObject.Find("CustomScene/CustomRoot/FrontUIGroup/CvsDraw/Top").transform; var sep = new SidebarSeparator(KoikatuAPI.Instance); sep.CreateControl(sidebarTop); foreach (var sidebarEntry in _sidebarEntries) { sidebarEntry.CreateControl(sidebarTop); } KoikatuAPI.Logger.LogDebug( $"Added {_sidebarEntries.Count} custom controls " + "to Control Panel sidebar"); } if (_accessoryWindowEntries.Any()) { CreateCustomAccessoryWindowControls(); } MakerLoadToggle.CreateCustomToggles(); MakerCoordinateLoadToggle.CreateCustomToggles(); }
public static void CreateCustomControls() { // Create controls in tabs var editMode = Object.FindObjectOfType <EditMode>(); foreach (Transform categoryTransfrom in editMode.transform.Find("Canvas").transform) { CreateCustomControlsInCategory(categoryTransfrom); } var sidebarToggles = _sidebarEntries.OfType <SidebarToggle>().ToList(); if (sidebarToggles.Any()) { CreateSidebarToggles(sidebarToggles); } if (_accessoryWindowEntries.Any()) { CreateCustomAccessoryWindowControls(); } MakerLoadToggle.CreateCustomToggles(); MakerCoordinateLoadToggle.CreateCustomToggles(); }
public static void CreateCustomControls() { // Craete controls in tabs foreach (var window in Object.FindObjectsOfType <CvsSelectWindow>()) { CreateCustomControlsInCategory(window); } if (_accessoryWindowEntries.Any()) { CreateCustomAccessoryWindowControls(); } /*// Create sidebar controls * if (_sidebarEntries.Any()) * { * var sidebarTop = GameObject.Find("CustomScene/CustomRoot/FrontUIGroup/CvsDraw/Top").transform; * * var sep = new SidebarSeparator(KoikatuAPI.Instance); * sep.CreateControl(sidebarTop); * * foreach (var sidebarEntry in _sidebarEntries) * sidebarEntry.CreateControl(sidebarTop); * * KoikatuAPI.Logger.LogDebug( * $"Added {_sidebarEntries.Count} custom controls " + * "to Control Panel sidebar"); * }*/ MakerLoadToggle.CreateCustomToggles(); MakerCoordinateLoadToggle.CreateCustomToggles(); FixAccessoryTextScaling(); }
private static void OnCreateCustomControls() { CreateCustomControls(); MakerLoadToggle.CreateCustomToggles(); MakerCoordinateLoadToggle.CreateCustomToggles(); #if KK // Fix some plugins failing to update interface and losing state if (IsInsideClassMaker()) { OnChaFileLoaded(new ChaFileLoadedEventArgs(null, (byte)GetMakerSex(), true, true, true, true, true, GetCharacterControl().chaFile, LastLoadedChaFile)); } #endif }
public static void CreateCustomControls() { // Craete controls in tabs foreach (var window in Object.FindObjectsOfType <CvsSelectWindow>()) { CreateCustomControlsInCategory(window); } if (_accessoryWindowEntries.Any()) { CreateCustomAccessoryWindowControls(); } if (_sidebarEntries.Any()) { KoikatuAPI.Instance.StartCoroutine(CreateSidebarWindow()); } MakerLoadToggle.CreateCustomToggles(); MakerCoordinateLoadToggle.CreateCustomToggles(); FixAccessoryTextScaling(); }