@@ -47,6 +47,7 @@ pub enum PageIndex {
47
47
/// information fields, and settings switches.
48
48
pub struct NbglHomeAndSettings {
49
49
app_name : CString ,
50
+ tag_line : Option < CString > ,
50
51
info_contents : Vec < CString > ,
51
52
info_contents_ptr : Vec < * const c_char > ,
52
53
setting_contents : Vec < [ CString ; 2 ] > ,
@@ -74,6 +75,7 @@ impl<'a> NbglHomeAndSettings {
74
75
pub fn new ( ) -> NbglHomeAndSettings {
75
76
NbglHomeAndSettings {
76
77
app_name : CString :: new ( "" ) . unwrap ( ) ,
78
+ tag_line : None ,
77
79
info_contents : Vec :: default ( ) ,
78
80
info_contents_ptr : Vec :: default ( ) ,
79
81
setting_contents : Vec :: default ( ) ,
@@ -109,6 +111,15 @@ impl<'a> NbglHomeAndSettings {
109
111
}
110
112
}
111
113
114
+ pub fn tagline (
115
+ self ,
116
+ tagline : & ' a str ) -> NbglHomeAndSettings {
117
+ NbglHomeAndSettings {
118
+ tag_line : Some ( CString :: new ( tagline) . unwrap ( ) ) ,
119
+ ..self
120
+ }
121
+ }
122
+
112
123
pub fn settings (
113
124
self ,
114
125
nvm_data : & ' a mut AtomicStorage < [ u8 ; SETTINGS_SIZE ] > ,
@@ -202,7 +213,10 @@ impl<'a> NbglHomeAndSettings {
202
213
nbgl_useCaseHomeAndSettings (
203
214
self . app_name . as_ptr ( ) as * const c_char ,
204
215
& self . icon as * const nbgl_icon_details_t ,
205
- core:: ptr:: null ( ) ,
216
+ match self . tag_line {
217
+ None => core:: ptr:: null ( ) ,
218
+ Some ( ref tag) => tag. as_ptr ( ) as * const c_char ,
219
+ } ,
206
220
match self . start_page {
207
221
PageIndex :: Home => INIT_HOME_PAGE as u8 ,
208
222
PageIndex :: Settings ( idx) => idx,
0 commit comments