DVUI

placeOnScreen

Adjust start rect based on screen and spawner (like a context menu).

When adding a floating widget or window, often we want to guarantee that it is visible. Additionally, if start is logically connected to a spawning rect (like a context menu spawning a submenu), then jump to the opposite side if needed.

Parameters

#
screen:Rect.Natural
Rect.Natural
spawner:Rect.Natural
Rect.Natural
avoid:PlaceOnScreenAvoid
PlaceOnScreenAvoid
start:Rect.Natural
Rect.Natural