optimized main loop

Adds colour to the text display
This commit is contained in:
2025-04-22 08:56:18 -04:00
parent 9201c67108
commit 4ec95af6d0
6 changed files with 810 additions and 144 deletions
+13
View File
@@ -1,5 +1,10 @@
use std::net::Ipv4Addr;
use std::time::SystemTime;
use ratatui::buffer::Buffer;
use ratatui::layout::Rect;
use ratatui::prelude::{StatefulWidget, Style};
use ratatui::style::Color;
use ratatui::widgets::Widget;
#[derive(Clone, Debug)]
pub struct TargetState {
@@ -21,3 +26,11 @@ impl Default for TargetState {
}
}
}
struct TargetStateWidget;
impl StatefulWidget for TargetStateWidget {
type State = TargetStateWidget;
fn render(self, area: Rect, buf: &mut Buffer, state: &mut Self::State) {
buf.set_string(area.left(),area.top(),"This is the string set ", Style::default().fg(Color::Red));
}
}