From 99da64d2a09a2138437b72993a497eb0c2c4ae81 Mon Sep 17 00:00:00 2001 From: jugeeya Date: Sun, 26 Mar 2023 16:09:17 -0700 Subject: [PATCH] Break if layout doesn't contain icon; switch current/all default load in menu (#511) * Return to break if layout doesn't contain icon; switch current/all default load in menu * Update menu.rs * unwrap_or_else * fix * Update menu.rs * Updated save_state_slot_enable icon --------- Co-authored-by: Matthew Edell --- src/common/menu.rs | 6 +++--- src/static/layout.arc | Bin 1941688 -> 1974496 bytes src/training/ui/menu.rs | 29 ++++++++--------------------- 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/src/common/menu.rs b/src/common/menu.rs index d4cc525..1332c3c 100644 --- a/src/common/menu.rs +++ b/src/common/menu.rs @@ -317,7 +317,7 @@ pub unsafe fn quick_menu_loop() { received_input = true; }); button_presses.y.read_press().then(|| { - app.reset_current_submenu(); + app.reset_all_submenus(); received_input = true; }); button_presses.l.read_press().then(|| { @@ -330,7 +330,7 @@ pub unsafe fn quick_menu_loop() { if is_gcc { app.next_tab(); } else { - app.reset_all_submenus(); + app.reset_current_submenu(); } received_input = true; }); @@ -344,7 +344,7 @@ pub unsafe fn quick_menu_loop() { if !is_gcc { app.next_tab(); } else { - app.reset_all_submenus(); + app.reset_current_submenu(); } received_input = true; }); diff --git a/src/static/layout.arc b/src/static/layout.arc index 2db0d62125a382d8b30b7ec85d7f61dd092e89fe..11231bccb374ba29bf74011f94061ab879a78e05 100644 GIT binary patch delta 15452 zcmdUWX?Rpsw)Q$FfvQSXk_wqBLqP>WD@+DZ42Tef)-Z)IC=pQtf<&b;v|NZ|1w~0C zN)TZOMG3YIQE3c7;i}i|Bo3{3R zD~RDQ?r*G~awy{xNEg-2)Q&jx3G&LuV-=>Go5d%#&A6NJy`lEM%;>%nZB zo>&$$z5<-}+#WU!zWD5VUH$xn+=FI91&iYSFZd+5%|;Hrxn zKlB=N=+)D0THQ5o(N1vI%VyX#<>;`7-vMX+WQk3WPicJYBXHK6?|@9nTXGbf^^^FG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ki9$>!nkTRax?yHylLWSto3Ne>x9>-1! z{XdCZha`YoAtn>eYYs~RA%&Ps6k;;bJokv?2NYs5QHZ%j^JZ*_xB_%c%6BQmT%vi! zhpPW4Q5_VnVMrk+6U}puO96g`m`oI6GSNJSeGLalD75gU5Od5W3eo63mHb+Tm`fC5 zF3~*ur0V}k3J!jLLtThg%}4k_kJb$ISMfjD8x9Rc?0$i zT!ENEi~|ZW4qTM-OM;igpj;uw0fiU`G*7!M`Pm9F4k*Mppm`Mg01nWk5aWPCj02h% zUzPkah4@JnVjR#sn2psj*PLI7sy5I~kY8Cc$Hxu|`OPA8ep$%KF98|(ogO2&W=1|fW{j5!@*yvCKDV{-l?!Mm{=K^FJSlasnT7GV;kKBOgvO z@_8d8pCdBz(I6uq`7!b-9wVR5G4g>MBOjzO^4S<8A9peG2^J%tOsV;wPn$S_Pmvg7 zQ9(ZIVa~@ljC?G^$R{m~e1gKrha!x8&cVn>7mR!)!N{i!jC^{)7>x;H&p%ux@IIb1 icz@2wTW&_)N;C5An2~qAjJ%O$tV@J%TI<>W;{O4MyP1~& diff --git a/src/training/ui/menu.rs b/src/training/ui/menu.rs index b880ea0..294e1af 100644 --- a/src/training/ui/menu.rs +++ b/src/training/ui/menu.rs @@ -112,13 +112,10 @@ unsafe fn render_submenu_page(app: &App, root_pane: &mut Pane) { // Hide all icon images, and strategically mark the icon that // corresponds with a particular button to be visible. submenu_ids.iter().for_each(|id| { - // TODO: Break if ID not found on release - let icon = menu_button - .find_pane_by_name_recursive(id); - if let Some(icon) = icon { - icon + menu_button + .find_pane_by_name_recursive(id) + .unwrap_or_else(|| panic!("Unable to find icon {} in layout.arc", id)) .set_visible(id == &submenu.submenu_id); - } }); menu_button @@ -195,20 +192,10 @@ unsafe fn render_toggle_page(app: &App, root_pane: &mut Pane) { let submenu_ids = app.submenu_ids(); submenu_ids.iter().for_each(|id| { - // TODO: Break if ID not found on release - - let icon = menu_button - - .find_pane_by_name_recursive(id); - - if let Some(icon) = icon { - - icon - + menu_button + .find_pane_by_name_recursive(id) + .unwrap_or_else(|| panic!("Unable to find icon {} in layout.arc", id)) .set_visible(false); - - } - }); title_text.set_text_string(name); @@ -431,9 +418,9 @@ pub unsafe fn draw(root_pane: &mut Pane) { let (left_tab_key, right_tab_key, save_defaults_key, reset_current_key, reset_all_key) = if is_gcc { - (l_key, r_key, x_key, y_key, z_key) + (l_key, r_key, x_key, z_key, y_key) } else { - (zl_key, zr_key, x_key, y_key, r_key) + (zl_key, zr_key, x_key, r_key, y_key) }; [