mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-29 20:03:41 +01:00
chore: make profiles category visible by default, ask before enabling
This commit is contained in:
parent
412d94e437
commit
3a922e4d58
4 changed files with 35 additions and 10 deletions
|
|
@ -50,6 +50,12 @@ internal class ProfileManagerWidget
|
|||
/// </summary>
|
||||
public void Draw()
|
||||
{
|
||||
if (!Service<DalamudConfiguration>.Get().ProfilesEnabled)
|
||||
{
|
||||
this.DrawChoice();
|
||||
return;
|
||||
}
|
||||
|
||||
var tutorialTitle = Locs.TutorialTitle + "###collectionsTutorWindow";
|
||||
var tutorialId = ImGui.GetID(tutorialTitle);
|
||||
this.DrawTutorial(tutorialTitle);
|
||||
|
|
@ -76,6 +82,23 @@ internal class ProfileManagerWidget
|
|||
this.pickerSearch = string.Empty;
|
||||
}
|
||||
|
||||
private void DrawChoice()
|
||||
{
|
||||
ImGuiHelpers.ScaledDummy(60);
|
||||
ImGuiHelpers.CenteredText(Locs.Choice1);
|
||||
ImGuiHelpers.CenteredText(Locs.Choice2);
|
||||
ImGuiHelpers.ScaledDummy(20);
|
||||
|
||||
var buttonWidth = ImGui.GetWindowWidth() / 3;
|
||||
ImGuiHelpers.CenterCursorFor((int)buttonWidth);
|
||||
if (ImGui.Button(Locs.ChoiceConfirmation, new Vector2(buttonWidth, 40 * ImGuiHelpers.GlobalScale)))
|
||||
{
|
||||
var config = Service<DalamudConfiguration>.Get();
|
||||
config.ProfilesEnabled = true;
|
||||
config.QueueSave();
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawTutorial(string modalTitle)
|
||||
{
|
||||
var open = true;
|
||||
|
|
@ -606,6 +629,15 @@ internal class ProfileManagerWidget
|
|||
public static string TutorialCommandsEnd =>
|
||||
Loc.Localize("ProfileManagerTutorialCommandsEnd", "If you run multiple of these commands, they will be executed in order.");
|
||||
|
||||
public static string Choice1 =>
|
||||
Loc.Localize("ProfileManagerChoice1", "Plugin collections are a new feature that allow you to group plugins into collections which can be toggled and shared.");
|
||||
|
||||
public static string Choice2 =>
|
||||
Loc.Localize("ProfileManagerChoice2", "They are experimental and may still contain bugs. Do you want to enable them now?");
|
||||
|
||||
public static string ChoiceConfirmation =>
|
||||
Loc.Localize("ProfileManagerChoiceConfirmation", "Yes, enable Plugin Collections");
|
||||
|
||||
public static string NotInstalled(string name) =>
|
||||
Loc.Localize("ProfileManagerNotInstalled", "{0} (Not Installed)").Format(name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue