feat(ui): port retail component book rows
Instantiate gmSpellComponentUI category and component entries from LayoutDesc 0x21000033 instead of synthesizing catalog rows. Preserve localized category titles, authored textures and geometry, live icon/count/desired bindings, selected-object synchronization, and retail's inclusive 0..5000 desired-level contract. Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
parent
15bb61e05d
commit
a1175e6aac
13 changed files with 2395 additions and 60 deletions
23
src/AcDream.App/UI/UiTextureElement.cs
Normal file
23
src/AcDream.App/UI/UiTextureElement.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using System.Numerics;
|
||||
using AcDream.App.Rendering;
|
||||
|
||||
namespace AcDream.App.UI;
|
||||
|
||||
/// <summary>
|
||||
/// Runtime-owned texture content inside an authored retained-UI region. LayoutDesc
|
||||
/// still owns the region's geometry and chrome; controllers supply only the live
|
||||
/// texture handle (for example a composed item icon).
|
||||
/// </summary>
|
||||
public sealed class UiTextureElement : UiElement
|
||||
{
|
||||
public UiTextureElement() => ClickThrough = true;
|
||||
|
||||
public uint Texture { get; set; }
|
||||
public Vector4 Tint { get; set; } = Vector4.One;
|
||||
|
||||
protected override void OnDraw(UiRenderContext ctx)
|
||||
{
|
||||
if (Texture != 0u)
|
||||
ctx.DrawSprite(Texture, 0f, 0f, Width, Height, 0f, 0f, 1f, 1f, Tint);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue