Closed with-heart closed 5 months ago
One of the hard parts about this is that svg
(or canvas
) doesn't lend itself to z-ordered rendering. There's no such thing as z-index
for SVGs which means we have to rely instead of order of rendering: elements rendered later are displayed on top of elements rendered earlier.
The other hard part is the awkwardness of the structure of *panel.json
files. Widgets can be nested within other widgets, and any widget can define either:
ZPlane
: basically just z-index
, absolute z
positionZPlaneLocalOffset
: not entirely sure but I think it means the widget's z
position is relative to the ZPlane
of its parentEssentially what I plan to try first is:
id
id
values based on ZPlane
+ZPlaneLocalOffset
id
sI think this is gonna cause things to become a confusing mess for a bit but that's fine—we can refactor later once we figure out cleaner ways for handling this.
Now that I'm mostly done fucking around with rearranging things in the repo (hopefully), we can start working on the actual app functionality. For this issue, we just want to render the panels as static
svg
images within the large UIsvg
.Since we're using the default game files to start, it'll look like the regular AoE2 UI when finished.