mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +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 struct ManagedPromptWithTextResponse {
|
||||||
pub token: [u32; 4],
|
pub token: [u32; 4],
|
||||||
pub prompt: xous_ipc::String::<1024>,
|
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,
|
pub fields: u32,
|
||||||
/// placeholders
|
/// placeholders
|
||||||
pub placeholders: Option<[Option<xous_ipc::String::<256>>; 10]>,
|
pub placeholders: Option<[Option<xous_ipc::String::<256>>; 10]>,
|
||||||
|
|
|
||||||
|
|
@ -82,11 +82,10 @@ fn xmain() -> ! {
|
||||||
let mut dr: Option<xous::MessageEnvelope> = None;
|
let mut dr: Option<xous::MessageEnvelope> = None;
|
||||||
|
|
||||||
// build the core data structure here
|
// build the core data structure here
|
||||||
let text_action = TextEntry {
|
let mut text_action: TextEntry = Default::default();
|
||||||
action_conn: renderer_cid,
|
text_action.action_conn = renderer_cid;
|
||||||
action_opcode: Opcode::TextEntryReturn.to_u32().unwrap(),
|
text_action.action_opcode = Opcode::TextEntryReturn.to_u32().unwrap();
|
||||||
..Default::default()
|
|
||||||
};
|
|
||||||
let mut fixed_items = Vec::<ItemName>::new();
|
let mut fixed_items = Vec::<ItemName>::new();
|
||||||
let notification = gam::modal::Notification::new(
|
let notification = gam::modal::Notification::new(
|
||||||
renderer_cid,
|
renderer_cid,
|
||||||
|
|
@ -106,7 +105,7 @@ fn xmain() -> ! {
|
||||||
let mut renderer_modal =
|
let mut renderer_modal =
|
||||||
Modal::new(
|
Modal::new(
|
||||||
gam::SHARED_MODAL_NAME,
|
gam::SHARED_MODAL_NAME,
|
||||||
ActionType::TextEntry(text_action),
|
ActionType::TextEntry(text_action.clone()),
|
||||||
Some("Placeholder"),
|
Some("Placeholder"),
|
||||||
None,
|
None,
|
||||||
GlyphStyle::Regular,
|
GlyphStyle::Regular,
|
||||||
|
|
@ -305,7 +304,7 @@ fn xmain() -> ! {
|
||||||
#[cfg(feature="tts")]
|
#[cfg(feature="tts")]
|
||||||
tts.tts_simple(config.prompt.as_str().unwrap()).unwrap();
|
tts.tts_simple(config.prompt.as_str().unwrap()).unwrap();
|
||||||
renderer_modal.modify(
|
renderer_modal.modify(
|
||||||
Some(ActionType::TextEntry(text_action)),
|
Some(ActionType::TextEntry(text_action.clone())),
|
||||||
Some(config.prompt.as_str().unwrap()), false,
|
Some(config.prompt.as_str().unwrap()), false,
|
||||||
None, true, None
|
None, true, None
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue