- Created Dialog widget

- standard information dialog works
TODO:
  implement more complex dialogs where multiple options can be selected
This commit is contained in:
FantasyPvP
2024-03-21 00:12:53 +00:00
parent e80df5100f
commit 6505d219de
8 changed files with 171 additions and 37 deletions
+1
View File
@@ -52,6 +52,7 @@ pub struct ScreenChar {
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum RenderError {
OutOfBounds(bool, bool), // (bool, bool) refers to x and y respectively
TooSmall,
InvalidCharacter,
InvalidColour,
InvalidRenderMode,
+2
View File
@@ -49,6 +49,7 @@ pub enum KeyStroke {
Left,
Right,
None,
Enter
}
impl KeyStroke {
@@ -65,6 +66,7 @@ impl KeyStroke {
KeyCode::Backspace => KeyStroke::Backspace,
KeyCode::ArrowLeft => KeyStroke::Left,
KeyCode::ArrowRight => KeyStroke::Right,
KeyCode::Enter => KeyStroke::Enter,
_ => KeyStroke::None,
}
}
+1 -1
View File
@@ -5,7 +5,7 @@ use alloc::{string::String};
lazy_static! {
pub static ref OS: Mutex<SysInfo> = Mutex::new(SysInfo {
os: String::from("CrystalOS Alpha"),
version: String::from("0.2.1"),
version: String::from("0.2.2"),
});
}