settings animated header
This commit is contained in:
@@ -69,6 +69,8 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
|||||||
private readonly UiSharedService _uiShared;
|
private readonly UiSharedService _uiShared;
|
||||||
private readonly IProgress<(int, int, FileCacheEntity)> _validationProgress;
|
private readonly IProgress<(int, int, FileCacheEntity)> _validationProgress;
|
||||||
private readonly NameplateService _nameplateService;
|
private readonly NameplateService _nameplateService;
|
||||||
|
private readonly AnimatedHeader _animatedHeader = new();
|
||||||
|
|
||||||
private (int, int, FileCacheEntity) _currentProgress;
|
private (int, int, FileCacheEntity) _currentProgress;
|
||||||
private bool _deleteAccountPopupModalShown = false;
|
private bool _deleteAccountPopupModalShown = false;
|
||||||
private bool _deleteFilesPopupModalShown = false;
|
private bool _deleteFilesPopupModalShown = false;
|
||||||
@@ -203,7 +205,10 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
|||||||
_nameplateService = nameplateService;
|
_nameplateService = nameplateService;
|
||||||
_actorObjectService = actorObjectService;
|
_actorObjectService = actorObjectService;
|
||||||
_validationProgress = new Progress<(int, int, FileCacheEntity)>(v => _currentProgress = v);
|
_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)
|
WindowBuilder.For(this)
|
||||||
.AllowPinning(true)
|
.AllowPinning(true)
|
||||||
.AllowClickthrough(false)
|
.AllowClickthrough(false)
|
||||||
@@ -239,6 +244,7 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
|||||||
|
|
||||||
public override void OnClose()
|
public override void OnClose()
|
||||||
{
|
{
|
||||||
|
_animatedHeader.ClearParticles();
|
||||||
_uiShared.EditTrackerPosition = false;
|
_uiShared.EditTrackerPosition = false;
|
||||||
_uidToAddForIgnore = string.Empty;
|
_uidToAddForIgnore = string.Empty;
|
||||||
_secretKeysConversionCts = _secretKeysConversionCts.CancelRecreate();
|
_secretKeysConversionCts = _secretKeysConversionCts.CancelRecreate();
|
||||||
@@ -253,8 +259,8 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
|||||||
|
|
||||||
protected override void DrawInternal()
|
protected override void DrawInternal()
|
||||||
{
|
{
|
||||||
|
_animatedHeader.Draw(ImGui.GetContentRegionAvail().X, (_, _) => { });
|
||||||
_ = _uiShared.DrawOtherPluginState();
|
_ = _uiShared.DrawOtherPluginState();
|
||||||
|
|
||||||
DrawSettingsContent();
|
DrawSettingsContent();
|
||||||
}
|
}
|
||||||
private static Vector3 PackedColorToVector3(uint color)
|
private static Vector3 PackedColorToVector3(uint color)
|
||||||
@@ -2151,6 +2157,8 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
|||||||
_configService.Save();
|
_configService.Save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_uiShared.DrawHelpText("This will enable particle effects in the UI.");
|
||||||
|
|
||||||
if (ImGui.Checkbox("Enable Game Right Click Menu Entries", ref enableRightClickMenu))
|
if (ImGui.Checkbox("Enable Game Right Click Menu Entries", ref enableRightClickMenu))
|
||||||
{
|
{
|
||||||
_configService.Current.EnableRightClickMenus = enableRightClickMenu;
|
_configService.Current.EnableRightClickMenus = enableRightClickMenu;
|
||||||
|
|||||||
Reference in New Issue
Block a user