refacor: creation & drawing of headers

This commit is contained in:
Jack Wills
2022-07-22 20:38:22 +00:00
parent 96ca208197
commit a70d6fa968
5 changed files with 278 additions and 335 deletions
+4 -4
View File
@@ -221,16 +221,16 @@ impl GuiState {
}
/// Insert selectable gui panel into area map
/// Remove each time, as terminal may have been resized!
/// Remove each time, as terminal may have been resized!
pub fn insert_into_panel_map(&mut self, panel: SelectablePanel, area: Rect) {
self.panel_map.remove(&panel);
self.panel_map.remove(&panel);
self.panel_map.insert(panel, area);
}
/// Insert selectable gui panel into area map
/// Remove each time, as terminal may have been resized!
/// Remove each time, as terminal may have been resized!
pub fn insert_into_header_map(&mut self, header: Header, area: Rect) {
self.heading_map.remove(&header);
self.heading_map.remove(&header);
self.heading_map.insert(header, area);
}