i dont know why that worked

This commit is contained in:
🪞👃🪞 2024-06-16 13:58:46 +03:00
parent 4ae62c5bc2
commit b73aa8a0dc
17 changed files with 552 additions and 481 deletions

View file

@ -6,12 +6,16 @@ pub struct Plugin {
impl Plugin {
pub fn new (name: &str) -> Result<DynamicDevice<Self>, Box<dyn Error>> {
Ok(DynamicDevice::new(render, handle, |_|{}, Self {
Ok(DynamicDevice::new(render, handle, process, Self {
name: name.into()
}))
}
}
pub fn process (state: &mut Plugin, client: &Client, scope: &ProcessScope) -> Control {
Control::Continue
}
pub fn render (state: &Plugin, buf: &mut Buffer, Rect { x, y, width, height }: Rect)
-> Usually<Rect>
{
@ -27,6 +31,6 @@ pub fn render (state: &Plugin, buf: &mut Buffer, Rect { x, y, width, height }: R
Ok(Rect { x, y, width: 40, height: 7 })
}
pub fn handle (state: &mut Plugin, event: &EngineEvent) -> Result<(), Box<dyn Error>> {
pub fn handle (state: &mut Plugin, event: &AppEvent) -> Result<(), Box<dyn Error>> {
Ok(())
}