diff options
| author | lukeflo | 2024-11-15 15:56:57 +0100 |
|---|---|---|
| committer | lukeflo | 2024-11-15 15:56:57 +0100 |
| commit | 511d380da8e198c01cd73fe9da35d557584a0023 (patch) | |
| tree | f385c11fb10ebed45656207cce602b7d7f17494c /src/tui/popup.rs | |
| parent | b9a2a79b5ae1315c03029adf37661deb9140b8dd (diff) | |
| download | bibiman-511d380da8e198c01cd73fe9da35d557584a0023.tar.gz bibiman-511d380da8e198c01cd73fe9da35d557584a0023.zip | |
selection popup: not impl as trait...
Diffstat (limited to 'src/tui/popup.rs')
| -rw-r--r-- | src/tui/popup.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tui/popup.rs b/src/tui/popup.rs index 08abfb0..7c54b94 100644 --- a/src/tui/popup.rs +++ b/src/tui/popup.rs @@ -28,7 +28,6 @@ pub enum PopupKind { Help, Message, Selection, - Search, } #[derive(Debug, Default)] @@ -111,6 +110,12 @@ impl PopupArea { self.is_popup = true; } + pub fn popup_selection(&mut self, items: Vec<String>) { + self.popup_list = items; + self.popup_kind = Some(PopupKind::Selection); + self.is_popup = true + } + pub fn popup_scroll_down(&mut self) { self.popup_scroll_pos = self.popup_scroll_pos.saturating_add(1) } |
