mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
gam: add dirty bool to TextEntryPayloads
Useful to filter out unused entries.
This commit is contained in:
parent
ec9fdb0e42
commit
c702025283
1 changed files with 4 additions and 4 deletions
|
|
@ -72,7 +72,7 @@ impl ItemName {
|
|||
|
||||
#[derive(Debug, rkyv::Archive, rkyv::Serialize, rkyv::Deserialize, Copy, Clone, Eq, PartialEq, Default)]
|
||||
pub struct TextEntryPayload {
|
||||
pub id: u32,
|
||||
dirty: bool,
|
||||
pub content: String::<256>,
|
||||
pub placeholder: Option<String::<256>>,
|
||||
}
|
||||
|
|
@ -80,14 +80,14 @@ pub struct TextEntryPayload {
|
|||
impl TextEntryPayload {
|
||||
pub fn new() -> Self {
|
||||
TextEntryPayload{
|
||||
id: Default::default(),
|
||||
dirty: Default::default(),
|
||||
content: Default::default(),
|
||||
placeholder: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new_with_fields(id: u32, content: String::<256>, placeholder: Option<String::<256>>) -> Self {
|
||||
TextEntryPayload { id: id, content: content, placeholder: placeholder }
|
||||
pub fn new_with_fields(content: String::<256>, placeholder: Option<String::<256>>) -> Self {
|
||||
TextEntryPayload { dirty: false, content: content, placeholder: placeholder }
|
||||
}
|
||||
/// Ensures that 0's are written to the storage of this struct, and not optimized out; important for password fields.
|
||||
pub fn volatile_clear(&mut self) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue