core: Fix avm2button bounding box
This commit is contained in:
parent
18fb5064d3
commit
6b76af2d40
|
@ -617,7 +617,8 @@ impl<'gc> TDisplayObject<'gc> for Avm2Button<'gc> {
|
|||
// Add the bounds of the child, dictated by current state
|
||||
let state = self.0.read().state;
|
||||
if let Some(child) = self.get_state_child(state.into()) {
|
||||
let child_bounds = child.bounds_with_transform(matrix);
|
||||
let matrix = *matrix * *child.base().matrix();
|
||||
let child_bounds = child.bounds_with_transform(&matrix);
|
||||
bounds = bounds.union(&child_bounds);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
package {
|
||||
|
||||
import flash.display.MovieClip;
|
||||
|
||||
|
||||
public class Test extends MovieClip {
|
||||
|
||||
|
||||
public function Test() {
|
||||
trace(button.getBounds(this));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
(x=188.8, y=112.6, w=91.64999999999998, h=21.200000000000017)
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,5 @@
|
|||
num_frames = 1
|
||||
|
||||
[approximations]
|
||||
number_patterns = ["\\(x=(.+?), y=(.+?), w=(.+?), h=(.+?)\\)"]
|
||||
epsilon = 0.01
|
Loading…
Reference in New Issue