mirror of
https://github.com/itsjunetime/tdf.git
synced 2026-06-01 23:51:46 -04:00
Initial commit since things seem pretty solid
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
use ratatui::widgets::Widget;
|
||||
|
||||
pub struct Skip {
|
||||
skip: bool
|
||||
}
|
||||
|
||||
impl Skip {
|
||||
pub fn new(skip: bool) -> Self {
|
||||
Self { skip }
|
||||
}
|
||||
}
|
||||
|
||||
impl Widget for Skip {
|
||||
fn render(self, area: ratatui::prelude::Rect, buf: &mut ratatui::prelude::Buffer) {
|
||||
for x in area.x..(area.x + area.width) {
|
||||
for y in area.y..(area.y + area.height) {
|
||||
buf.get_mut(x, y).skip = self.skip;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user