play-co / timestep

GNU General Public License v3.0
16 stars 27 forks source link

Fixed bad layout initialization #128

Closed bchevalier closed 7 years ago

bchevalier commented 7 years ago

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).

rogueSkib commented 7 years ago

Looks good, thanks @bchevalier