Files
darkfi/bin
lunar-mining 0756fbefb9 ui: generalize and tidy render functions
we reduce boilerplate by creating a new generic function called draw().
variables are initialized in draw_outbound(), draw_inbound(), and
draw_manual() and are then sent to draw().

dynamic resizing is enabled by returning the total frame length like so:

    let len = draw_outbound(...)
    let len = draw_inbound(..., len)

it would be cleaner to store this value in a struct. however this is non
trivial to implement.

ui::ui() cannot be async and therefore cannot use mutexes due to its use
in the following non-async function from external library tui::Terminal:

    terminal.draw(|f| {
        ui::ui(f, view.clone());
    })?;

however ui::ui() is called within the async function render(), which
means values set inside ui::ui() may be overwritten during async calls.
2022-03-12 11:43:55 +01:00
..
2022-02-12 20:18:54 -05:00
2022-01-25 23:50:27 +01:00