How are scrolloffsets handled for item containers?

Hi there

how does the ParseInterface code handle containers with scroll? Because when I try to reproduce something similar items get displayed at incorrect positions when the inventory is not at the top most scroll position, see screenshot:

kind regards

1 Like

The parsed GUI API gives you the totalDisplayRegion for all nodes, including the parents of the node you see outside of the viewport in this example.

By using the totalDisplayRegion from the parent/container nodes, you can check if the child node is outside the viewport.
If you detect its outside, you can filter it out to avoid having your bot trying to interact with it.

I see the parsing framework already includes a derived property totalDisplayRegionVisible here:

totalDisplayRegionVisible contains a subregion of totalDisplayRegion. I see it considers occlusion (like another window of the game client GUI in front that prevents interaction with the UI element in question) but I am not sure it also already includes cropping by scrollable container.

As you can see in the screenshot, the regions of the scroll bar and the scroll handle are also included. Some bots use these regions to compute the scroll location in the viewport and also to scroll up or down to make other items visible.