core: DisplayObject clip depth can only be set on initial placement
This commit is contained in:
parent
32252b2ed4
commit
8bf0114fdf
|
@ -1274,9 +1274,6 @@ pub trait TDisplayObject<'gc>:
|
||||||
if let Some(color_transform) = &place_object.color_transform {
|
if let Some(color_transform) = &place_object.color_transform {
|
||||||
self.set_color_transform(context.gc_context, &color_transform.clone().into());
|
self.set_color_transform(context.gc_context, &color_transform.clone().into());
|
||||||
}
|
}
|
||||||
if let Some(clip_depth) = place_object.clip_depth {
|
|
||||||
self.set_clip_depth(context.gc_context, clip_depth.into());
|
|
||||||
}
|
|
||||||
if let Some(ratio) = place_object.ratio {
|
if let Some(ratio) = place_object.ratio {
|
||||||
if let Some(mut morph_shape) = self.as_morph_shape() {
|
if let Some(mut morph_shape) = self.as_morph_shape() {
|
||||||
morph_shape.set_ratio(context.gc_context, ratio);
|
morph_shape.set_ratio(context.gc_context, ratio);
|
||||||
|
@ -1327,7 +1324,7 @@ pub trait TDisplayObject<'gc>:
|
||||||
self.set_opaque_background(context.gc_context, color);
|
self.set_opaque_background(context.gc_context, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Purposely omitted: name
|
// Purposely omitted: name, clip_depth
|
||||||
// These properties are only set on initial placement in `MovieClip::instantiate_child`
|
// These properties are only set on initial placement in `MovieClip::instantiate_child`
|
||||||
// and can not be modified by subsequent PlaceObject tags.
|
// and can not be modified by subsequent PlaceObject tags.
|
||||||
// TODO: Others will go here eventually.
|
// TODO: Others will go here eventually.
|
||||||
|
|
|
@ -1138,6 +1138,9 @@ impl<'gc> MovieClip<'gc> {
|
||||||
AvmString::new_utf8(context.gc_context, name),
|
AvmString::new_utf8(context.gc_context, name),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if let Some(clip_depth) = place_object.clip_depth {
|
||||||
|
child.set_clip_depth(context.gc_context, clip_depth.into());
|
||||||
|
}
|
||||||
|
|
||||||
// Run first frame.
|
// Run first frame.
|
||||||
child.construct_frame(context);
|
child.construct_frame(context);
|
||||||
|
@ -3319,6 +3322,8 @@ impl<'a> GotoPlaceObject<'a> {
|
||||||
if place_object.background_color.is_none() {
|
if place_object.background_color.is_none() {
|
||||||
place_object.background_color = Some(Color::from_rgba(0));
|
place_object.background_color = Some(Color::from_rgba(0));
|
||||||
}
|
}
|
||||||
|
// Deliberately omitted:
|
||||||
|
// clip_depth: Can only be set on initial creation
|
||||||
// `is_visible` purposely skipped; flag carries over during rewind.
|
// `is_visible` purposely skipped; flag carries over during rewind.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3376,7 +3381,8 @@ impl<'a> GotoPlaceObject<'a> {
|
||||||
cur_place.background_color = next_place.background_color.take();
|
cur_place.background_color = next_place.background_color.take();
|
||||||
}
|
}
|
||||||
// Deliberately omitted: (can only be set once on instantiation)
|
// Deliberately omitted: (can only be set once on instantiation)
|
||||||
// name
|
// clip_depth
|
||||||
|
// name:
|
||||||
// TODO: Other stuff.
|
// TODO: Other stuff.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue