Implement more UX and cards for other distros

This commit is contained in:
2026-07-06 15:37:12 +02:00
parent 8b6c6235c2
commit 68dc13c60d
31 changed files with 759 additions and 16 deletions
@@ -0,0 +1,47 @@
using System;
using UnityEngine.UIElements;
namespace KernelPanic.UI
{
/// <summary>
/// Binds shared command-style chrome used by terminal sub-screens.
/// </summary>
public sealed class ScreenFrameController
{
private Label titleLabel;
private Label hintLabel;
public void Bind(VisualElement panel, string title, string hint, Action onBack)
{
titleLabel = panel.Q<Label>(className: "screen-frame-title");
hintLabel = panel.Q<Label>(className: "screen-frame-hint");
if (titleLabel != null)
{
titleLabel.text = title;
}
if (hintLabel != null)
{
hintLabel.text = hint;
hintLabel.RegisterCallback<ClickEvent>(_ => onBack?.Invoke());
}
}
public void SetHint(string hint)
{
if (hintLabel != null)
{
hintLabel.text = hint;
}
}
public void SetTitle(string title)
{
if (titleLabel != null)
{
titleLabel.text = title;
}
}
}
}