Android pause menu fix

This commit is contained in:
dawnDus 2022-04-24 18:25:37 -04:00
parent 5fdd9676cb
commit 7dcf30f854
No known key found for this signature in database
GPG Key ID: 972AABDE81848F21
2 changed files with 9 additions and 5 deletions

View File

@ -625,6 +625,7 @@ impl Menu {
|| state.touch_controls.consume_click_in(entry_bounds) =>
{
state.sound_manager.play_sfx(18);
self.selected = idx;
return MenuSelectionResult::Selected(idx, entry);
}
MenuEntry::Options(_, _, _) | MenuEntry::OptionsBar(_, _)

View File

@ -1391,16 +1391,16 @@ impl GameScene {
&self.npc_list,
&mut self.boss,
&mut self.inventory_player1,
);
);
self.player2.tick_npc_collisions(
TargetPlayer::Player2,
state,
&self.npc_list,
&mut self.boss,
&mut self.inventory_player2,
);
);
}
for npc in self.npc_list.iter_alive() {
if !npc.npc_flags.ignore_solidity() {
npc.tick_map_collisions(state, &self.npc_list, &mut self.stage);
@ -1697,8 +1697,11 @@ impl Scene for GameScene {
self.player2.controller.update(state, ctx)?;
self.player2.controller.update_trigger();
state.touch_controls.control_type =
if state.control_flags.control_enabled() { TouchControlType::Controls } else { TouchControlType::None };
state.touch_controls.control_type = if state.control_flags.control_enabled() && !self.pause_menu.is_paused() {
TouchControlType::Controls
} else {
TouchControlType::None
};
if state.settings.touch_controls {
state.touch_controls.interact_icon = false;