animated header main menu redesign test

This commit is contained in:
choco
2025-12-23 00:48:47 +01:00
parent 3222133aa0
commit 4e03b381dc
3 changed files with 14 additions and 4 deletions

View File

@@ -68,6 +68,7 @@ public class CompactUi : WindowMediatorSubscriberBase
private bool _wasOpen;
private float _windowContentWidth;
private readonly SeluneBrush _seluneBrush = new();
private readonly AnimatedHeader _animatedHeader = new() { Height = 120f, EnableBottomGradient = false };
private const float _connectButtonHighlightThickness = 14f;
private Pair? _focusedPair;
private Pair? _pendingFocusPair;
@@ -153,6 +154,7 @@ public class CompactUi : WindowMediatorSubscriberBase
public override void OnClose()
{
ForceReleaseFocus();
_animatedHeader.ClearParticles();
base.OnClose();
}
@@ -164,6 +166,13 @@ public class CompactUi : WindowMediatorSubscriberBase
using var selune = Selune.Begin(_seluneBrush, drawList, windowPos, windowSize);
_windowContentWidth = UiSharedService.GetWindowContentRegionWidth();
// Draw animated header background (just the gradient/particles, content drawn by existing methods)
var startCursorY = ImGui.GetCursorPosY();
_animatedHeader.Draw(_windowContentWidth, (_, _) => { });
// Reset cursor to draw content on top of the header background
ImGui.SetCursorPosY(startCursorY);
if (!_apiController.IsCurrentVersion)
{
var ver = _apiController.CurrentClientVersion;