mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2024-11-27 20:34:03 +00:00
Hotfix 2 for panic for icons (#507)
* Update menu.rs * Update menu.rs * Update save_states.rs
This commit is contained in:
parent
14bf45de4f
commit
9ea0ddb690
2 changed files with 16 additions and 6 deletions
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue