@@ -844,7 +844,6 @@ void scene_continuity_pp_model_on_enter(void* _ctx) {
844844 ContinuityCfg * cfg = & payload -> cfg .continuity ;
845845 Submenu * submenu = ctx -> submenu ;
846846 uint32_t selected = 0 ;
847- submenu_reset (submenu );
848847 bool value = payload -> mode == PayloadModeValue ||
849848 (payload -> mode == PayloadModeBruteforce &&
850849 cfg -> data .proximity_pair .bruteforce_mode != ContinuityPpBruteforceModel );
@@ -882,7 +881,8 @@ bool scene_continuity_pp_model_on_event(void* _ctx, SceneManagerEvent event) {
882881 return false;
883882}
884883void scene_continuity_pp_model_on_exit (void * _ctx ) {
885- UNUSED (_ctx );
884+ Ctx * ctx = _ctx ;
885+ submenu_reset (ctx -> submenu );
886886}
887887
888888static void pp_model_custom_callback (void * _ctx ) {
@@ -918,7 +918,9 @@ bool scene_continuity_pp_model_custom_on_event(void* _ctx, SceneManagerEvent eve
918918 return false;
919919}
920920void scene_continuity_pp_model_custom_on_exit (void * _ctx ) {
921- UNUSED (_ctx );
921+ Ctx * ctx = _ctx ;
922+ byte_input_set_result_callback (ctx -> byte_input , NULL , NULL , NULL , NULL , 0 );
923+ byte_input_set_header_text (ctx -> byte_input , "" );
922924}
923925
924926static void pp_color_callback (void * _ctx , uint32_t index ) {
@@ -960,7 +962,6 @@ void scene_continuity_pp_color_on_enter(void* _ctx) {
960962 ContinuityCfg * cfg = & payload -> cfg .continuity ;
961963 Submenu * submenu = ctx -> submenu ;
962964 uint32_t selected = 0 ;
963- submenu_reset (submenu );
964965 bool value = payload -> mode == PayloadModeValue ||
965966 (payload -> mode == PayloadModeBruteforce &&
966967 cfg -> data .proximity_pair .bruteforce_mode != ContinuityPpBruteforceColor );
@@ -1006,7 +1007,8 @@ bool scene_continuity_pp_color_on_event(void* _ctx, SceneManagerEvent event) {
10061007 return false;
10071008}
10081009void scene_continuity_pp_color_on_exit (void * _ctx ) {
1009- UNUSED (_ctx );
1010+ Ctx * ctx = _ctx ;
1011+ submenu_reset (ctx -> submenu );
10101012}
10111013
10121014static void pp_color_custom_callback (void * _ctx ) {
@@ -1041,7 +1043,9 @@ bool scene_continuity_pp_color_custom_on_event(void* _ctx, SceneManagerEvent eve
10411043 return false;
10421044}
10431045void scene_continuity_pp_color_custom_on_exit (void * _ctx ) {
1044- UNUSED (_ctx );
1046+ Ctx * ctx = _ctx ;
1047+ byte_input_set_result_callback (ctx -> byte_input , NULL , NULL , NULL , NULL , 0 );
1048+ byte_input_set_header_text (ctx -> byte_input , "" );
10451049}
10461050
10471051static void pp_prefix_callback (void * _ctx , uint32_t index ) {
@@ -1069,7 +1073,6 @@ void scene_continuity_pp_prefix_on_enter(void* _ctx) {
10691073 Submenu * submenu = ctx -> submenu ;
10701074 uint32_t selected = 0 ;
10711075 bool found = false;
1072- submenu_reset (submenu );
10731076
10741077 submenu_add_item (submenu , "Automatic" , 0 , pp_prefix_callback , ctx );
10751078 if (cfg -> data .proximity_pair .prefix == 0x00 ) {
@@ -1099,7 +1102,8 @@ bool scene_continuity_pp_prefix_on_event(void* _ctx, SceneManagerEvent event) {
10991102 return false;
11001103}
11011104void scene_continuity_pp_prefix_on_exit (void * _ctx ) {
1102- UNUSED (_ctx );
1105+ Ctx * ctx = _ctx ;
1106+ submenu_reset (ctx -> submenu );
11031107}
11041108
11051109static void pp_prefix_custom_callback (void * _ctx ) {
@@ -1131,7 +1135,9 @@ bool scene_continuity_pp_prefix_custom_on_event(void* _ctx, SceneManagerEvent ev
11311135 return false;
11321136}
11331137void scene_continuity_pp_prefix_custom_on_exit (void * _ctx ) {
1134- UNUSED (_ctx );
1138+ Ctx * ctx = _ctx ;
1139+ byte_input_set_result_callback (ctx -> byte_input , NULL , NULL , NULL , NULL , 0 );
1140+ byte_input_set_header_text (ctx -> byte_input , "" );
11351141}
11361142
11371143static void na_action_callback (void * _ctx , uint32_t index ) {
@@ -1166,7 +1172,6 @@ void scene_continuity_na_action_on_enter(void* _ctx) {
11661172 ContinuityCfg * cfg = & payload -> cfg .continuity ;
11671173 Submenu * submenu = ctx -> submenu ;
11681174 uint32_t selected = 0 ;
1169- submenu_reset (submenu );
11701175
11711176 submenu_add_item (submenu , "Random" , 0 , na_action_callback , ctx );
11721177 if (payload -> mode == PayloadModeRandom ) {
@@ -1202,7 +1207,8 @@ bool scene_continuity_na_action_on_event(void* _ctx, SceneManagerEvent event) {
12021207 return false;
12031208}
12041209void scene_continuity_na_action_on_exit (void * _ctx ) {
1205- UNUSED (_ctx );
1210+ Ctx * ctx = _ctx ;
1211+ submenu_reset (ctx -> submenu );
12061212}
12071213
12081214static void na_action_custom_callback (void * _ctx ) {
@@ -1235,7 +1241,9 @@ bool scene_continuity_na_action_custom_on_event(void* _ctx, SceneManagerEvent ev
12351241 return false;
12361242}
12371243void scene_continuity_na_action_custom_on_exit (void * _ctx ) {
1238- UNUSED (_ctx );
1244+ Ctx * ctx = _ctx ;
1245+ byte_input_set_result_callback (ctx -> byte_input , NULL , NULL , NULL , NULL , 0 );
1246+ byte_input_set_header_text (ctx -> byte_input , "" );
12391247}
12401248
12411249static void na_flags_callback (void * _ctx ) {
@@ -1269,4 +1277,6 @@ void scene_continuity_na_flags_on_exit(void* _ctx) {
12691277 Payload * payload = & ctx -> attack -> payload ;
12701278 ContinuityCfg * cfg = & payload -> cfg .continuity ;
12711279 cfg -> data .nearby_action .flags = (ctx -> byte_store [0 ] << 0x00 );
1280+ byte_input_set_result_callback (ctx -> byte_input , NULL , NULL , NULL , NULL , 0 );
1281+ byte_input_set_header_text (ctx -> byte_input , "" );
12721282}
0 commit comments