avm1: reference displayObjects parents if parent is a button (#12541)

This commit is contained in:
michiel2005 2023-08-05 22:32:03 +02:00 committed by GitHub
parent 66df964709
commit 690ce110d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 1 deletions

View File

@ -992,7 +992,10 @@ impl<'gc> EditText<'gc> {
let variable_path = WString::from_utf8(&var_path);
drop(var_path);
let parent = self.avm1_parent().unwrap();
let mut parent = self.avm1_parent().unwrap();
while parent.as_avm1_button().is_some() {
parent = parent.avm1_parent().unwrap();
}
activation.run_with_child_frame_for_display_object(
"[Text Field Binding]",

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -0,0 +1,8 @@
num_frames = 1
[image_comparison]
tolerance = 0
max_outliers = 12
[player_options]
with_renderer = { optional = false, sample_count = 1 }