This was specifically identified with the Panel layout but probably affects all other layout views as well.
While StardewUI always respects explicit z-index and has the correct behavior (highest z-index draws on top and receives pointer events), the implicit order when no z-index is specified acts differently, with the last child in the list drawing on top but being the last to receive events, i.e. being blocked by earlier children with no z-index.
It's not wrong, per se, but it could reasonably be called confusing and inconsistent.
Solution: Whenever iterating children for event purposes, traverse in reverse order after accounting for z-index. This can hopefully be done in the View base itself without requiring special logic for every layout.
This was specifically identified with the
Panel
layout but probably affects all other layout views as well.While StardewUI always respects explicit
z-index
and has the correct behavior (highest z-index draws on top and receives pointer events), the implicit order when no z-index is specified acts differently, with the last child in the list drawing on top but being the last to receive events, i.e. being blocked by earlier children with no z-index.It's not wrong, per se, but it could reasonably be called confusing and inconsistent.
Solution: Whenever iterating children for event purposes, traverse in reverse order after accounting for z-index. This can hopefully be done in the
View
base itself without requiring special logic for every layout.