Added ability to automatically set editor preview character to current character on login

Also refactored some things
This commit is contained in:
RisaDev
2024-04-13 01:55:27 +03:00
parent f88f3db2b3
commit 07f89334c1
5 changed files with 95 additions and 50 deletions

View File

@@ -194,6 +194,7 @@ public class SettingsTab
DrawHideWindowInCutscene();
DrawFoldersDefaultOpen();
DrawSetPreviewToCurrentCharacterOnLogin();
if (Widget.DoubleModifierSelector("Template Deletion Modifier",
"A modifier you need to hold while clicking the Delete Template button for it to take effect.", 100 * ImGuiHelpers.GlobalScale,
@@ -225,6 +226,18 @@ public class SettingsTab
}
}
private void DrawSetPreviewToCurrentCharacterOnLogin()
{
var isChecked = _configuration.EditorConfiguration.SetPreviewToCurrentCharacterOnLogin;
if (CtrlHelper.CheckboxWithTextAndHelp("##setpreviewcharaonlogin", "Automatically Set Current Character as Editor Preview Character",
"Controls whether editor character will be automatically set to the current character during login.", ref isChecked))
{
_configuration.EditorConfiguration.SetPreviewToCurrentCharacterOnLogin = isChecked;
_configuration.Save();
}
}
#endregion
#region Advanced Settings