- Created Dialog widget
- standard information dialog works TODO: implement more complex dialogs where multiple options can be selected
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user