worked on rendering code

worked on code for libgui for rendering a user interface
This commit is contained in:
FantasyPvP
2023-04-28 00:10:20 +01:00
parent 78144a4f60
commit 0c39711875
16 changed files with 340 additions and 15 deletions
+1 -1
View File
@@ -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
View File
@@ -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;
+4 -1
View File
@@ -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(),
+3 -3
View File
@@ -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"))); },
}
};