broken cbfa to fix for a while
This commit is contained in:
@@ -5,10 +5,8 @@ use alloc::vec::Vec;
|
||||
use alloc::boxed::Box;
|
||||
use crate::std::application::{Application, Error};
|
||||
use async_trait::async_trait;
|
||||
use crate::kernel::render::{Color, ColorCode};
|
||||
use crate::{println, serial_println};
|
||||
use crate::std::frame::{ColouredChar, Frame, Position, Dimensions, RenderError};
|
||||
use crate::std::io::{KeyStroke, Screen, Stdin};
|
||||
use crate::std::io::{KeyStroke, Screen, Stdin, Color, ColorCode};
|
||||
use crate::std::time::wait;
|
||||
use crate::user::bin::snake::Game;
|
||||
|
||||
|
||||
+12
-6
@@ -2,16 +2,22 @@ use alloc::string::{String, ToString};
|
||||
use alloc::{format, vec};
|
||||
use alloc::vec::Vec;
|
||||
use alloc::boxed::Box;
|
||||
use alloc::sync::Arc;
|
||||
use async_trait::async_trait;
|
||||
use spin::Mutex;
|
||||
use crate::{println, serial_println};
|
||||
use crate::kernel::render::{ColorCode, RenderError};
|
||||
use crate::std::io::{ColorCode};
|
||||
use crate::shell::command_handler;
|
||||
use crate::std::application::{Application, Error};
|
||||
use crate::std::frame::{self, Frame, Position, Dimensions, ColouredChar};
|
||||
use crate::std::frame::{self, Frame, Position, Dimensions, ColouredChar, RenderError};
|
||||
use crate::std::io::{Color, KeyStroke, Screen, Stdin};
|
||||
use crate::user::lib::libgui::cg_core::{CgComponent, CgTextEdit};
|
||||
use crate::user::lib::libgui::cg_inputs::CgLineEdit;
|
||||
use crate::user::lib::libgui::cg_widgets::CgContainer;
|
||||
|
||||
use crate::user::lib::libgui::{
|
||||
cg_core::{CgComponent, CgTextInput, CgInputHandler, CgContainer},
|
||||
cg_widgets::CgContainerWidget,
|
||||
cg_inputs::CgLineEdit,
|
||||
};
|
||||
|
||||
use super::calc;
|
||||
|
||||
const OFFSET_X: i64 = 39;
|
||||
@@ -73,7 +79,7 @@ impl Application for Grapher {
|
||||
let mut commandresult = String::new();
|
||||
|
||||
while let c = Stdin::keystroke().await {
|
||||
let mut container = CgContainer::new(
|
||||
let mut container = CgContainerWidget::new(
|
||||
Position::new(0, 0),
|
||||
Dimensions::new(80, 25),
|
||||
true,
|
||||
|
||||
@@ -6,13 +6,11 @@ use core::cell::RefCell;
|
||||
use async_trait::async_trait;
|
||||
use crate::std::io::{Color, KeyStroke, Screen, Stdin};
|
||||
use crate::std::time;
|
||||
use crate::kernel::tasks::keyboard::KEYBOARD;
|
||||
use crossbeam_queue::SegQueue;
|
||||
use lazy_static::lazy_static;
|
||||
use crate::kernel::render::{ColorCode, ScreenChar};
|
||||
use crate::{println, serial_println};
|
||||
use crate::std::application::{Application, Error};
|
||||
use crate::std::frame::{ColouredChar, Dimensions, Frame, RenderError};
|
||||
use crate::std::frame::{ColouredChar, Dimensions, Frame, RenderError, ColorCode};
|
||||
use crate::std::random::Random;
|
||||
use crate::system::std::frame;
|
||||
use super::super::lib::coords::{Line, Position, Direction};
|
||||
|
||||
@@ -3,7 +3,7 @@ use alloc::boxed::Box;
|
||||
use alloc::string::String;
|
||||
use alloc::vec;
|
||||
use alloc::vec::Vec;
|
||||
use crate::kernel::render::ScreenChar;
|
||||
use crate::std::frame::{ColouredChar};
|
||||
use crate::{serial_print, serial_println};
|
||||
use crate::std::application::{Application, Error};
|
||||
use crate::std::io::Screen;
|
||||
@@ -13,7 +13,7 @@ use crate::user::lib::coords::{Direction, Position, PositionReal};
|
||||
pub(crate) struct TetrisEngine {
|
||||
score: u32,
|
||||
next: TetrisPiece,
|
||||
completed_frame: [[ScreenChar; 80]; 25], // this frame does not contain falling blocks, only static ones
|
||||
completed_frame: [[ColouredChar; 80]; 25], // this frame does not contain falling blocks, only static ones
|
||||
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ impl Application for TetrisEngine {
|
||||
Self {
|
||||
score: 0,
|
||||
next: TetrisPiece::new(PieceType::OPiece),
|
||||
completed_frame: [[ScreenChar::null(); 80]; 25],
|
||||
completed_frame: [[ColouredChar::null(); 80]; 25],
|
||||
}
|
||||
}
|
||||
async fn run(&mut self, args: Vec<String>) -> Result<(), Error> {
|
||||
|
||||
Reference in New Issue
Block a user