mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
adapt interface to newer modals
This commit is contained in:
parent
8123393a7d
commit
8dd41a1ffa
2 changed files with 6 additions and 12 deletions
|
|
@ -28,11 +28,6 @@ pub struct ManagedListItem {
|
|||
pub struct ManagedPromptWithTextResponse {
|
||||
pub token: [u32; 4],
|
||||
pub prompt: xous_ipc::String::<1024>,
|
||||
/// SID of a validator
|
||||
pub validator: Option<[u32; 4]>,
|
||||
/// the opcode to pass the validator
|
||||
pub validator_op: u32,
|
||||
/// the amount of fields to read
|
||||
pub fields: u32,
|
||||
/// placeholders
|
||||
pub placeholders: Option<[Option<xous_ipc::String::<256>>; 10]>,
|
||||
|
|
|
|||
|
|
@ -82,11 +82,10 @@ fn xmain() -> ! {
|
|||
let mut dr: Option<xous::MessageEnvelope> = None;
|
||||
|
||||
// build the core data structure here
|
||||
let text_action = TextEntry {
|
||||
action_conn: renderer_cid,
|
||||
action_opcode: Opcode::TextEntryReturn.to_u32().unwrap(),
|
||||
..Default::default()
|
||||
};
|
||||
let mut text_action: TextEntry = Default::default();
|
||||
text_action.action_conn = renderer_cid;
|
||||
text_action.action_opcode = Opcode::TextEntryReturn.to_u32().unwrap();
|
||||
|
||||
let mut fixed_items = Vec::<ItemName>::new();
|
||||
let notification = gam::modal::Notification::new(
|
||||
renderer_cid,
|
||||
|
|
@ -106,7 +105,7 @@ fn xmain() -> ! {
|
|||
let mut renderer_modal =
|
||||
Modal::new(
|
||||
gam::SHARED_MODAL_NAME,
|
||||
ActionType::TextEntry(text_action),
|
||||
ActionType::TextEntry(text_action.clone()),
|
||||
Some("Placeholder"),
|
||||
None,
|
||||
GlyphStyle::Regular,
|
||||
|
|
@ -305,7 +304,7 @@ fn xmain() -> ! {
|
|||
#[cfg(feature="tts")]
|
||||
tts.tts_simple(config.prompt.as_str().unwrap()).unwrap();
|
||||
renderer_modal.modify(
|
||||
Some(ActionType::TextEntry(text_action)),
|
||||
Some(ActionType::TextEntry(text_action.clone())),
|
||||
Some(config.prompt.as_str().unwrap()), false,
|
||||
None, true, None
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue