fix(ui): complete retail inventory scroll polish
Preserve pixel scroll offsets across inventory rebuilds, crop partially visible rows with nested geometry/UV clips, and replace the obsolete 560px resize ceiling with available screen height. Keep retail's row-sized wheel step while allowing continuous scrollbar thumb positions. Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
parent
ea72c395c9
commit
15aa3b9aff
15 changed files with 379 additions and 34 deletions
|
|
@ -291,6 +291,21 @@ public class InventoryControllerTests
|
|||
Assert.Same(grid.Scroll, bar.Model); // the bar drives the grid's scroll
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Inventory_refresh_preserves_contents_pixel_scroll_offset()
|
||||
{
|
||||
var (layout, grid, _, _, _, _, _, _) = BuildLayout();
|
||||
var objects = new ClientObjectTable();
|
||||
objects.AddOrUpdate(new ClientObject { ObjectId = Player, ItemsCapacity = 102 });
|
||||
Bind(layout, objects);
|
||||
grid.Scroll.SetScrollY(40);
|
||||
|
||||
objects.UpdateIntProperty(Player, 5u, 1000);
|
||||
|
||||
Assert.Equal(40, grid.Scroll.ScrollY);
|
||||
Assert.Equal(-8f, grid.GetItem(6)!.Top);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Contents_grid_pads_empty_slots_to_main_pack_capacity()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue