Port the authored effect row template, remaining-time and selection details, synchronize the full gmPanelUI child geometry, and route the burden indicator to Character Information panel 3. Co-authored-by: OpenAI Codex <codex@openai.com>
68 lines
2.2 KiB
C#
68 lines
2.2 KiB
C#
namespace AcDream.App.UI;
|
|
|
|
/// <summary>
|
|
/// Retail <c>gmPanelUI</c> panel ids carried by DAT property <c>0x10000029</c>.
|
|
/// The toolbar exposes only a subset of these ids; Helpful/Harmful effects use
|
|
/// the authored <c>gmUIElement_EffectsIndicator</c> buttons instead.
|
|
/// </summary>
|
|
public static class RetailPanelCatalog
|
|
{
|
|
public const uint CharacterInformation = 3u;
|
|
public const uint PositiveEffects = 4u;
|
|
public const uint NegativeEffects = 5u;
|
|
public const uint Inventory = 7u;
|
|
public const uint LinkStatus = 8u;
|
|
public const uint MiniGame = 9u;
|
|
public const uint Character = 11u;
|
|
public const uint Magic = 13u;
|
|
public const uint Vitae = 15u;
|
|
|
|
private static readonly (uint PanelId, string WindowName)[] Mounted =
|
|
{
|
|
(CharacterInformation, WindowNames.CharacterInformation),
|
|
(PositiveEffects, WindowNames.PositiveEffects),
|
|
(NegativeEffects, WindowNames.NegativeEffects),
|
|
(Inventory, WindowNames.Inventory),
|
|
(LinkStatus, WindowNames.LinkStatus),
|
|
(MiniGame, WindowNames.MiniGame),
|
|
(Character, WindowNames.Character),
|
|
(Magic, WindowNames.Spellbook),
|
|
(Vitae, WindowNames.Vitae),
|
|
};
|
|
|
|
private static readonly (uint PanelId, string WindowName)[] Toolbar =
|
|
{
|
|
(Inventory, WindowNames.Inventory),
|
|
(Character, WindowNames.Character),
|
|
(Magic, WindowNames.Spellbook),
|
|
};
|
|
|
|
public static IReadOnlyList<(uint PanelId, string WindowName)> MountedPanels => Mounted;
|
|
public static IReadOnlyList<(uint PanelId, string WindowName)> ToolbarPanels => Toolbar;
|
|
|
|
public static bool TryGetWindowName(uint panelId, out string windowName)
|
|
{
|
|
foreach (var entry in Mounted)
|
|
{
|
|
if (entry.PanelId != panelId) continue;
|
|
windowName = entry.WindowName;
|
|
return true;
|
|
}
|
|
|
|
windowName = string.Empty;
|
|
return false;
|
|
}
|
|
|
|
public static bool TryGetPanelId(string windowName, out uint panelId)
|
|
{
|
|
foreach (var entry in Mounted)
|
|
{
|
|
if (!string.Equals(entry.WindowName, windowName, StringComparison.Ordinal)) continue;
|
|
panelId = entry.PanelId;
|
|
return true;
|
|
}
|
|
|
|
panelId = 0;
|
|
return false;
|
|
}
|
|
}
|