From 391b3a9dfb9c628c9b16813f5fa79f0b6bb03099 Mon Sep 17 00:00:00 2001 From: CUB3D Date: Sun, 11 Dec 2022 18:50:33 +0000 Subject: [PATCH] avm2: Selecting the child of a SimpleButton should select the button, not the child This fixes ingame menu buttons in BLOCnog --- core/src/display_object/avm2_button.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/display_object/avm2_button.rs b/core/src/display_object/avm2_button.rs index 753616ba9..bbc3b0080 100644 --- a/core/src/display_object/avm2_button.rs +++ b/core/src/display_object/avm2_button.rs @@ -814,7 +814,8 @@ impl<'gc> TInteractiveObject<'gc> for Avm2Button<'gc> { .as_interactive() .and_then(|c| c.mouse_pick(context, point, require_button_mode)); if mouse_pick.is_some() { - return mouse_pick; + // Selecting a child of a button is equivalent to selecting the button itself + return Some((*self).into()); } }