1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-24 02:44:17 +00:00

Hotfix 2 for panic for icons (#507)

* Update menu.rs

* Update menu.rs

* Update save_states.rs
This commit is contained in:
jugeeya 2023-03-14 08:44:01 -07:00 committed by GitHub
parent 14bf45de4f
commit 9ea0ddb690
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 6 deletions

View file

@ -354,7 +354,7 @@ pub unsafe fn save_states(module_accessor: &mut app::BattleObjectModuleAccessor)
]
.contains(&fighter_kind);
if !is_operation_cpu(module_accessor)
if MENU.save_state_slot_enable == OnOff::On && !is_operation_cpu(module_accessor)
&& button_config::combo_passes_exclusive(
module_accessor,
button_config::ButtonCombo::PrevSaveStateSlot,
@ -375,7 +375,7 @@ pub unsafe fn save_states(module_accessor: &mut app::BattleObjectModuleAccessor)
return;
}
if !is_operation_cpu(module_accessor)
if MENU.save_state_slot_enable == OnOff::On && !is_operation_cpu(module_accessor)
&& button_config::combo_passes_exclusive(
module_accessor,
button_config::ButtonCombo::NextSaveStateSlot,

View file

@ -195,10 +195,20 @@ unsafe fn render_toggle_page(app: &App, root_pane: &mut Pane) {
let submenu_ids = app.submenu_ids();
submenu_ids.iter().for_each(|id| {
menu_button
.find_pane_by_name_recursive(id)
.unwrap()
.set_visible(false)
// TODO: Break if ID not found on release
let icon = menu_button
.find_pane_by_name_recursive(id);
if let Some(icon) = icon {
icon
.set_visible(false);
}
});
title_text.set_text_string(name);