worked on rendering code
worked on code for libgui for rendering a user interface
This commit is contained in:
@@ -109,7 +109,7 @@ impl Application for GameLoop {
|
||||
}
|
||||
|
||||
fn random() -> u64 {
|
||||
let mut r = random::Random::int(0, 125) as u64;
|
||||
let r = random::Random::int(0, 125) as u64;
|
||||
r
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -3,5 +3,5 @@ pub mod crystal_rpg;
|
||||
pub mod crystalfetch;
|
||||
pub mod rickroll;
|
||||
pub mod shell;
|
||||
pub mod shellrewrite;
|
||||
//pub mod shellrewrite;
|
||||
pub mod tasks;
|
||||
|
||||
@@ -131,7 +131,10 @@ async fn exec() -> Result<(), Error> {
|
||||
use crate::std::io;
|
||||
io::mkfs();
|
||||
}
|
||||
|
||||
"test_features" => {
|
||||
use crate::user::lib::libgui;
|
||||
libgui::libgui_core::test_elements();
|
||||
}
|
||||
_ => {
|
||||
return Err(Error::UnknownCommand(
|
||||
"command not yet implemented".to_string(),
|
||||
|
||||
@@ -131,14 +131,14 @@ impl TaskList {
|
||||
}
|
||||
pub fn add(&mut self, content: String) -> Result<(), Error> {
|
||||
let task = Task::new(self.next(), content);
|
||||
let id = task.taskid.clone();
|
||||
let _id = task.taskid.clone();
|
||||
self.tasks.push(task);
|
||||
Ok(())
|
||||
}
|
||||
pub fn remove(&mut self, id: usize) -> Result<(), Error> {
|
||||
pub fn remove(&mut self, _id: usize) -> Result<(), Error> {
|
||||
for (i, task) in self.tasks.clone().iter().enumerate() {
|
||||
match task.taskid {
|
||||
id => { self.tasks.remove(i); },
|
||||
_id => { self.tasks.remove(i); },
|
||||
_ => { return Err(Error::CommandFailed(String::from("this task does not exist"))); },
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user