From fd204d404bf0ddb97c5b7915d9c560524c538586 Mon Sep 17 00:00:00 2001 From: sawyer bristol Date: Thu, 26 Jun 2025 14:50:14 -0600 Subject: [PATCH] colored text works! --- src/display.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/display.rs b/src/display.rs index ba18ada..7d1bafc 100644 --- a/src/display.rs +++ b/src/display.rs @@ -12,8 +12,12 @@ use embedded_graphics::{ }; use embedded_hal_bus::spi::ExclusiveDevice; use mousefood::prelude::*; -use ratatui::{Frame, Terminal, widgets::Paragraph}; -use st7365p_lcd::{Orientation, ST7365P}; +use ratatui::{ + Frame, Terminal, + style::{Color, Style}, + widgets::Paragraph, +}; +use st7365p_lcd::ST7365P; #[embassy_executor::task] pub async fn display_task( @@ -27,7 +31,7 @@ pub async fn display_task( spi_device, Output::new(data, Level::Low), Some(Output::new(reset, Level::High)), - true, + false, true, 320, 320, @@ -50,7 +54,7 @@ pub async fn display_task( } fn draw(frame: &mut Frame) { - let greeting = Paragraph::new("Hello World!\nLine2"); + let greeting = Paragraph::new("Hello World!\nLine2").style(Style::new().red()); frame.render_widget(greeting, frame.area()); }