Also fixed issue where updating the laying through the updateOpts method would not have the desired effect.
Tested on Puzzle bubble blitz and Everwing but would be better if game devs could double check!
(could not test Cats due to incompatibility with MovieClip version -> work in progress)
Note: I did not rerun perf benchmarks but I would not imagine this changes to have a measurable impact.
I realized that there might be a better way to refactor the layout extension: by having a Layout class with all those layout properties and have BoxLayout inherit from it. The only issue is that those properties should be settable through the style, therefore the ViewBacking should act as a proxy. This solution might actually be best for performance and also a step toward changing the layout API if we wanted to (my opinion is that the layout properties should not be set through the style and rather be a separate entity).
Also fixed issue where updating the laying through the
updateOpts
method would not have the desired effect.Tested on Puzzle bubble blitz and Everwing but would be better if game devs could double check! (could not test Cats due to incompatibility with
MovieClip
version -> work in progress)Note: I did not rerun perf benchmarks but I would not imagine this changes to have a measurable impact.
I realized that there might be a better way to refactor the layout extension: by having a
Layout
class with all those layout properties and haveBoxLayout
inherit from it. The only issue is that those properties should be settable through the style, therefore theViewBacking
should act as a proxy. This solution might actually be best for performance and also a step toward changing the layout API if we wanted to (my opinion is that the layout properties should not be set through the style and rather be a separate entity).