private void DrawNewCharacterCollection() { ImGui.InputTextWithHint("##New Character", "New Character Name", ref _newCharacterName, 32); ImGui.SameLine(); if (ImGuiCustom.DisableButton("Create New Character Collection", _newCharacterName.Length > 0)) { _manager.Collections.CreateCharacterCollection(_newCharacterName); _currentCharacterIndices[_newCharacterName] = 0; _newCharacterName = string.Empty; } ImGuiCustom.HoverTooltip( "A character collection will be used whenever you manually redraw a character with the Name you have set up.\n" + "If you enable automatic character redraws in the Settings tab, penumbra will try to use Character collections for corresponding characters automatically.\n"); }
private void DrawNewCollectionInput() { ImGui.InputTextWithHint("##New Collection", "New Collection", ref _newCollectionName, 64); using var style = ImGuiRaii.PushStyle(ImGuiStyleVar.Alpha, 0.5f, _newCollectionName.Length == 0); if (ImGui.Button("Create New Empty Collection") && _newCollectionName.Length > 0) { CreateNewCollection(new Dictionary <string, ModSettings>()); } ImGui.SameLine(); if (ImGui.Button("Duplicate Current Collection") && _newCollectionName.Length > 0) { CreateNewCollection(_manager.Collections.CurrentCollection.Settings); } style.Pop(); var deleteCondition = _manager.Collections.Collections.Count > 1 && _manager.Collections.CurrentCollection.Name != ModCollection.DefaultCollection; ImGui.SameLine(); if (ImGuiCustom.DisableButton("Delete Current Collection", deleteCondition)) { _manager.Collections.RemoveCollection(_manager.Collections.CurrentCollection.Name); SetCurrentCollection(_manager.Collections.CurrentCollection, true); UpdateNames(); } if (Penumbra.Config.ShowAdvanced) { ImGui.SameLine(); DrawCleanCollectionButton(); } }