diff options
author | ClementTsang <cjhtsang@uwaterloo.ca> | 2020-04-19 23:39:24 -0400 |
---|---|---|
committer | ClementTsang <cjhtsang@uwaterloo.ca> | 2020-04-19 23:39:24 -0400 |
commit | 057467874605cdb30ac5afb1ef5a11481c6dc405 (patch) | |
tree | 8f12b526b8be6cfaca9b77d7ad1267682fc2cb7b /src/canvas.rs | |
parent | 83dad154b97e016654b6742103a4fcd8a355079e (diff) |
Move to stateful except for CPU
Diffstat (limited to 'src/canvas.rs')
-rw-r--r-- | src/canvas.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/canvas.rs b/src/canvas.rs index d4db433d..9e4aaf30 100644 --- a/src/canvas.rs +++ b/src/canvas.rs @@ -69,10 +69,11 @@ pub struct Painter { layout_constraints: Vec<Vec<Vec<Vec<Constraint>>>>, widget_layout: BottomLayout, derived_widget_draw_locs: Vec<Vec<Vec<Vec<Rect>>>>, + table_height_offset: i64, } impl Painter { - pub fn init(widget_layout: BottomLayout) -> Self { + pub fn init(widget_layout: BottomLayout, table_gap: u16) -> Self { // Now for modularity; we have to also initialize the base layouts! // We want to do this ONCE and reuse; after this we can just construct // based on the console size. @@ -154,6 +155,7 @@ impl Painter { layout_constraints, widget_layout, derived_widget_draw_locs: Vec::new(), + table_height_offset: 4 + table_gap as i64, } } |