diff --git a/core/embed/rust/src/ui/layout_eckhart/component/keyboard/keypad.rs b/core/embed/rust/src/ui/layout_eckhart/component/keyboard/keypad.rs new file mode 100644 index 0000000000..86642e75db --- /dev/null +++ b/core/embed/rust/src/ui/layout_eckhart/component/keyboard/keypad.rs @@ -0,0 +1,571 @@ +use crate::{ + trezorhal::random, + ui::{ + component::{Component, Event, EventCtx, Maybe}, + geometry::{Alignment, Insets, Offset, Rect}, + shape::Renderer, + }, +}; + +use super::{ + super::super::{ + component::button::{Button, ButtonContent, ButtonMsg, ButtonStyleSheet}, + constant::SCREEN, + theme, + }, + common::KEYPAD_VISIBLE_HEIGHT, +}; + +#[derive(PartialEq)] +pub enum KeypadButton { + Key(usize), + Erase, // Represents an erase button. + Cancel, // Represents a cancel button. + Confirm, // Represents a confirm button. + Back, // Represents a back(previous) button. +} + +pub enum ButtonState { + Enabled, + Disabled, + Hidden, +} + +const KEYPAD_MAX_KEYS: usize = 10; +type KeypadKeys = [Maybe