blob: fbb7531a5a163367de6034978e0cbf15da80d3de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
use ratatui::{crossterm::cursor::SetCursorStyle, layout::Rect};
pub struct TuiCursor {
pub position: (u16, u16),
pub style: SetCursorStyle,
}
impl TuiCursor {
pub fn relative_to(self, rect: Rect) -> Self {
Self {
position: (rect.y + self.position.0, rect.x + self.position.1),
style: self.style,
}
}
}
|