Immediate mode renderer for libvaxis

Add flex layouts #4

open
opened by reykjalin.org edited

Or at the very least horizontal and vertical layouts that can do centering for their children.

These layouts will probably have to return a struct that will let you add elements to them and then render at the end, something like maybe

const vertical = vxim.vertical();
defer vertical.render();

vertical.addChild();
vertical.addChild();

Doesn't feel great though. Might have to do something sillier like specifying the layout of each child maybe?

const child_one = window .{.width, .height};
const child_two = window .{.width, .height};

const child_windows = vxim.vertical(.{child_one, child_two});

for (child_windows) |child| {
   // Render inside each child.
}

This second one actually seems like it might work pretty well.

sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:ph2n2oeirk7t5zjmxwfkhojk/sh.tangled.repo.issue/3m3laxecll422