Add options for changelog display.

This commit is contained in:
Ottermandias 2022-09-15 18:31:35 +02:00
parent ce73385333
commit 1dae7fe036
3 changed files with 10 additions and 6 deletions

@ -1 +1 @@
Subproject commit 44dc1f51fe7900a1fe0e3368c4c5c00b6f866325
Subproject commit 2b4b78b03d679144440d35b30830608b6d2bcb79

View file

@ -7,6 +7,7 @@ using Newtonsoft.Json;
using OtterGui;
using OtterGui.Classes;
using OtterGui.Filesystem;
using OtterGui.Widgets;
using Penumbra.Import;
using Penumbra.Mods;
using Penumbra.UI;
@ -21,6 +22,7 @@ public partial class Configuration : IPluginConfiguration
public int Version { get; set; } = Constants.CurrentVersion;
public int LastSeenVersion { get; set; } = ConfigWindow.LastChangelogVersion;
public ChangeLogDisplayType ChangeLogDisplayType { get; set; } = ChangeLogDisplayType.New;
public bool EnableMods { get; set; } = true;
public string ModDirectory { get; set; } = string.Empty;

View file

@ -8,11 +8,13 @@ public partial class ConfigWindow
public static Changelog CreateChangelog()
{
var ret = new Changelog( "Penumbra Changelog", () => Penumbra.Config.LastSeenVersion, version =>
{
Penumbra.Config.LastSeenVersion = version;
Penumbra.Config.Save();
} );
var ret = new Changelog( "Penumbra Changelog", () => ( Penumbra.Config.LastSeenVersion, Penumbra.Config.ChangeLogDisplayType ),
( version, type ) =>
{
Penumbra.Config.LastSeenVersion = version;
Penumbra.Config.ChangeLogDisplayType = type;
Penumbra.Config.Save();
} );
Add5_7_0( ret );
Add5_7_1( ret );