mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +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
|
|
@ -28,7 +28,7 @@ internal class PluginCategoryManager
|
|||
new(11, "special.devIconTester", () => Locs.Category_IconTester),
|
||||
new(12, "special.dalamud", () => Locs.Category_Dalamud),
|
||||
new(13, "special.plugins", () => Locs.Category_Plugins),
|
||||
new(14, "special.profiles", () => Locs.Category_PluginProfiles, CategoryInfo.AppearCondition.ProfilesEnabled),
|
||||
new(14, "special.profiles", () => Locs.Category_PluginProfiles),
|
||||
new(FirstTagBasedCategoryId + 0, "other", () => Locs.Category_Other),
|
||||
new(FirstTagBasedCategoryId + 1, "jobs", () => Locs.Category_Jobs),
|
||||
new(FirstTagBasedCategoryId + 2, "ui", () => Locs.Category_UI),
|
||||
|
|
@ -353,11 +353,6 @@ internal class PluginCategoryManager
|
|||
/// Check if plugin testing is enabled.
|
||||
/// </summary>
|
||||
DoPluginTest,
|
||||
|
||||
/// <summary>
|
||||
/// Check if plugin profiles are enabled.
|
||||
/// </summary>
|
||||
ProfilesEnabled,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -1218,10 +1218,6 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
if (!Service<DalamudConfiguration>.Get().DoPluginTest)
|
||||
continue;
|
||||
break;
|
||||
case PluginCategoryManager.CategoryInfo.AppearCondition.ProfilesEnabled:
|
||||
if (!Service<DalamudConfiguration>.Get().ProfilesEnabled)
|
||||
continue;
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ public class SettingsTabExperimental : SettingsTab
|
|||
|
||||
new ThirdRepoSettingsEntry(),
|
||||
|
||||
/* Disabling profiles after they've been enabled doesn't make much sense, at least not if the user has already created profiles.
|
||||
new GapSettingsEntry(5, true),
|
||||
|
||||
new SettingsEntry<bool>(
|
||||
|
|
@ -55,6 +56,7 @@ public class SettingsTabExperimental : SettingsTab
|
|||
Loc.Localize("DalamudSettingsEnableProfilesHint", "Enables plugin collections, which lets you create toggleable lists of plugins."),
|
||||
c => c.ProfilesEnabled,
|
||||
(v, c) => c.ProfilesEnabled = v),
|
||||
*/
|
||||
};
|
||||
|
||||
public override string Title => Loc.Localize("DalamudSettingsExperimental", "Experimental");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue