From 6c1cc77aaa5912e7c7996a08559b7c0095617dce Mon Sep 17 00:00:00 2001 From: choco Date: Tue, 23 Dec 2025 17:36:36 +0100 Subject: [PATCH] settings animated header --- LightlessSync/UI/SettingsUi.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/LightlessSync/UI/SettingsUi.cs b/LightlessSync/UI/SettingsUi.cs index 580849e..91f69d5 100644 --- a/LightlessSync/UI/SettingsUi.cs +++ b/LightlessSync/UI/SettingsUi.cs @@ -69,6 +69,8 @@ public class SettingsUi : WindowMediatorSubscriberBase private readonly UiSharedService _uiShared; private readonly IProgress<(int, int, FileCacheEntity)> _validationProgress; private readonly NameplateService _nameplateService; + private readonly AnimatedHeader _animatedHeader = new(); + private (int, int, FileCacheEntity) _currentProgress; private bool _deleteAccountPopupModalShown = false; private bool _deleteFilesPopupModalShown = false; @@ -203,7 +205,10 @@ public class SettingsUi : WindowMediatorSubscriberBase _nameplateService = nameplateService; _actorObjectService = actorObjectService; _validationProgress = new Progress<(int, int, FileCacheEntity)>(v => _currentProgress = v); - + _animatedHeader.Height = 120f; + _animatedHeader.EnableBottomGradient = true; + _animatedHeader.GradientHeight = 250f; + _animatedHeader.EnableParticles = _configService.Current.EnableParticleEffects; WindowBuilder.For(this) .AllowPinning(true) .AllowClickthrough(false) @@ -239,6 +244,7 @@ public class SettingsUi : WindowMediatorSubscriberBase public override void OnClose() { + _animatedHeader.ClearParticles(); _uiShared.EditTrackerPosition = false; _uidToAddForIgnore = string.Empty; _secretKeysConversionCts = _secretKeysConversionCts.CancelRecreate(); @@ -253,8 +259,8 @@ public class SettingsUi : WindowMediatorSubscriberBase protected override void DrawInternal() { + _animatedHeader.Draw(ImGui.GetContentRegionAvail().X, (_, _) => { }); _ = _uiShared.DrawOtherPluginState(); - DrawSettingsContent(); } private static Vector3 PackedColorToVector3(uint color) @@ -2151,6 +2157,8 @@ public class SettingsUi : WindowMediatorSubscriberBase _configService.Save(); } + _uiShared.DrawHelpText("This will enable particle effects in the UI."); + if (ImGui.Checkbox("Enable Game Right Click Menu Entries", ref enableRightClickMenu)) { _configService.Current.EnableRightClickMenus = enableRightClickMenu;