fix(ui): complete retail indicator detail panels
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>
This commit is contained in:
parent
a96767ba6d
commit
d1d603105f
24 changed files with 3696 additions and 147 deletions
|
|
@ -79,9 +79,9 @@ public sealed class RetailPanelUiControllerTests
|
|||
public void MainPanels_ShareOneCanonicalPlacementAcrossMoveCloseAndSwitch()
|
||||
{
|
||||
var root = new UiRoot { Width = 1280f, Height = 720f };
|
||||
RetailWindowHandle inventory = Mount(root, WindowNames.Inventory, 40f, 60f);
|
||||
RetailWindowHandle character = Mount(root, WindowNames.Character, 540f, 18f);
|
||||
RetailWindowHandle spellbook = Mount(root, WindowNames.Spellbook, 18f, 18f);
|
||||
RetailWindowHandle inventory = Mount(root, WindowNames.Inventory, 40f, 60f, 360f);
|
||||
RetailWindowHandle character = Mount(root, WindowNames.Character, 540f, 18f, 500f);
|
||||
RetailWindowHandle spellbook = Mount(root, WindowNames.Spellbook, 18f, 18f, 420f);
|
||||
using var controller = Create(root);
|
||||
controller.RegisterMainPanel(7u, WindowNames.Inventory, inventory);
|
||||
controller.RegisterMainPanel(11u, WindowNames.Character, character);
|
||||
|
|
@ -94,9 +94,12 @@ public sealed class RetailPanelUiControllerTests
|
|||
|
||||
controller.SetPanelVisibility(7u, visible: true);
|
||||
inventory.MoveTo(312f, 147f);
|
||||
inventory.ResizeTo(310f, 540f);
|
||||
|
||||
Assert.Equal((312f, 147f), (character.Left, character.Top));
|
||||
Assert.Equal((312f, 147f), (spellbook.Left, spellbook.Top));
|
||||
Assert.Equal((310f, 540f), (character.Width, character.Height));
|
||||
Assert.Equal((310f, 540f), (spellbook.Width, spellbook.Height));
|
||||
Assert.True(characterMoves > 0);
|
||||
Assert.True(spellbookMoves > 0);
|
||||
|
||||
|
|
@ -104,12 +107,14 @@ public sealed class RetailPanelUiControllerTests
|
|||
Assert.False(inventory.IsVisible);
|
||||
Assert.True(character.IsVisible);
|
||||
Assert.Equal((312f, 147f), (character.Left, character.Top));
|
||||
Assert.Equal((310f, 540f), (character.Width, character.Height));
|
||||
|
||||
controller.SetPanelVisibility(11u, visible: false);
|
||||
controller.SetPanelVisibility(13u, visible: true);
|
||||
Assert.False(character.IsVisible);
|
||||
Assert.True(spellbook.IsVisible);
|
||||
Assert.Equal((312f, 147f), (spellbook.Left, spellbook.Top));
|
||||
Assert.Equal((310f, 540f), (spellbook.Width, spellbook.Height));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
@ -130,15 +135,18 @@ public sealed class RetailPanelUiControllerTests
|
|||
|
||||
controller.SetPanelVisibility(7u, visible: true);
|
||||
inventory.MoveTo(280f, 120f);
|
||||
inventory.ResizeTo(310f, 600f);
|
||||
controller.SetPanelVisibility(4u, visible: true);
|
||||
|
||||
Assert.Equal((280f, 120f), (effect.Left, effect.Top));
|
||||
Assert.Equal((310f, 600f), (effect.Width, effect.Height));
|
||||
Assert.False(inventory.IsVisible);
|
||||
Assert.True(effect.IsVisible);
|
||||
|
||||
controller.SetPanelVisibility(4u, visible: false);
|
||||
Assert.True(inventory.IsVisible);
|
||||
Assert.Equal((280f, 120f), (inventory.Left, inventory.Top));
|
||||
Assert.Equal((310f, 600f), (inventory.Width, inventory.Height));
|
||||
|
||||
controller.SetPanelVisibility(11u, visible: true);
|
||||
Assert.Equal((280f, 120f), (character.Left, character.Top));
|
||||
|
|
@ -165,9 +173,10 @@ public sealed class RetailPanelUiControllerTests
|
|||
UiRoot root,
|
||||
string name,
|
||||
float left,
|
||||
float top)
|
||||
float top,
|
||||
float contentHeight = 500f)
|
||||
{
|
||||
var content = new UiPanel { Width = 300f, Height = 500f };
|
||||
var content = new UiPanel { Width = 300f, Height = contentHeight };
|
||||
return RetailWindowFrame.Mount(
|
||||
root,
|
||||
content,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue