core: `Avm2Button` always runs a frame on set children, even if it's not the current state

This commit is contained in:
David Wendt 2021-05-03 18:45:47 -04:00 committed by Mike Welsh
parent bf1fb93b83
commit 208c191d88
1 changed files with 9 additions and 1 deletions

View File

@ -310,7 +310,15 @@ impl<'gc> Avm2Button<'gc> {
if let Some(child) = child {
child.frame_constructed(context);
}
}
if let Some(child) = child {
child.run_frame(context);
}
if swf::ButtonState::from(self.0.read().state) == state {
if let Some(child) = child {
child.run_frame_scripts(context);
child.exit_frame(context);
}