rockorager/libvaxis

Adding a few more alignment widgets

Closed this issue · 2 comments

Been working on a project using libvaxis and made some functions to make child windows aligned to each corner of the window.

bottomRight sample:

pub fn bottomRight(parent: Window, cols: usize, rows: usize) Window {
    const y_off = parent.height -| rows;
    const x_off = parent.width -| cols;
    return parent.child(.{
        .x_off = x_off, 
        .y_off = y_off, 
        .width = .{ .limit = cols }, 
        .height = .{ .limit = rows }
    });
}

Was wondering if I could make a PR adding them to the alignment widget? Optionally I can also create an example that uses them.

Fixed in 7df8ca6