elcritch / figuro

Experimental UI Library for Nim
64 stars 1 forks source link

Layers #24

Closed elcritch closed 1 year ago

elcritch commented 1 year ago

This PR re-enables layering using ZLevel on Figuro nodes. Child nodes inherit their parents level but can change it.

Layers which differ from the default level of ZLevel(0) become detached from from their parent during the rendering phase. The rendering engine then draws them per layer. Events are handled and are aware of layers where higher layers will block lower zlevel items from receiving events. This is useful for widgets like pop-ups and menus.